-
-
Notifications
You must be signed in to change notification settings - Fork 81
Open
Description
ALL software version info
Software Version Info
bokeh 3.5.2 py311h746a85d_0
cartopy 0.22.0 py311h786e728_0
geoviews 1.13.0 py311haa95532_0
geoviews-core 1.13.0 py311haa95532_0
holoviews 1.19.1 py311haa95532_0
numpy 1.26.4 py311hdab7c0b_0
Description of expected behavior and the observed behavior
When adding tile in geoviews, I expect the attribution of the underlying Bokeh model to show at the bottom right corner of the map, just like with any built-in tile server. However, it is not the case when I'm using custom tile server such as the French one. I think this might be a bug.
(Discussed at discourse post)
Complete, minimal, self-contained example code that reproduces the issue
from bokeh.plotting import figure, show
from bokeh.io import output_notebook
from bokeh.models import WMTSTileSource
output_notebook()
import cartopy.crs as ccrs
import numpy as np
import geoviews as gv
gv.extension('bokeh')
x_bounds=(2.14572, 2.61568)
y_bounds=(48.68763, 49.01233)
google_mercator_bbox = ccrs.GOOGLE_MERCATOR.transform_points(
ccrs.PlateCarree(), x=np.array(x_bounds), y=np.array(y_bounds)
)[:, :-1].flatten()
PLANIGNV2_tile_provider = WMTSTileSource(url="https://data.geopf.fr/tms/1.0.0/GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2/{Z}/{X}/{Y}.png",
name='PLAN IGN',
attribution=""" <a href="https://www.ign.fr/" target="_blank">© IGN</a> maps""",
max_zoom=19)
# This shows the attributions at the bottom of the map
plan_ign_v2 = figure(x_range=(google_mercator_bbox[0], google_mercator_bbox[2]),
y_range=(google_mercator_bbox[1], google_mercator_bbox[3]),
min_width=800, min_height=400,
x_axis_type='mercator', y_axis_type='mercator',
active_drag='pan', active_scroll='wheel_zoom', match_aspect=True)
plan_ign_v2.add_tile(local_PLANIGNV2_tile_provider)
show(plan_ign_v2)
# The attribution is not visible using gv.WMTS()
gv.WMTS(PLANIGNV2_tile_provider).opts(active_tools=['wheel_zoom'], min_height=500, min_width=800,
xlim=(google_mercator_bbox[0], google_mercator_bbox[2]),
ylim=(google_mercator_bbox[1], google_mercator_bbox[3]))
# However it's there with the built-in OSM tile sources
gv.tile_sources.OSM().opts(active_tools=['wheel_zoom'], min_height=500, min_width=800,
xlim=(google_mercator_bbox[0], google_mercator_bbox[2]),
ylim=(google_mercator_bbox[1], google_mercator_bbox[3]))Screenshots
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels


