-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
pluginThis issue/PR is about an existing or new pluginThis issue/PR is about an existing or new plugin
Description
Describe the bug
The vector tile layer does not render when zoom level is great than 14.
@iwpnd
import folium
from folium.plugins import VectorGridProtobuf
url = "https://vectortiles3.geo.admin.ch/tiles/ch.swisstopo.leichte-basiskarte.vt/v1.0.0/{z}/{x}/{y}.pbf"
m = folium.Map(location=[46.8, 8.2], zoom_start=14)
options = {'maxNativeZoom': 20, 'maxZoom': 20}
# options = {'max_native_zoom': 20, 'max_zoom': 20} #not working either
vc = VectorGridProtobuf(url, "vector tile", options)
m.add_child(vc)
mExpected behavior
The vector tile layer should render in a zoom level much larger than 14 so that we can see the details of vector data.
Environment (please complete the following information):
- Python version: 3.9
- folium version: 0.13.0
Possible solutions
The leaflet VectorGrid.Protobuf example appears to have the maxNativeZoom parameter. I am not sure if the folium plugin can pass the maxNativeZoom and maxZoom parameters to VectorGrid.Protobuf.
L.vectorGrid.protobuf("https://free-{s}.tilehosting.com/data/v3/{z}/{x}/{y}.pbf.pict?key={key}", {
vectorTileLayerStyles: { ... },
subdomains: "0123",
key: 'abcdefghi01234567890',
maxNativeZoom: 14
}).addTo(map);Relevant issues
microsoft/PlanetaryComputer#175 @TomAugspurger
iwpnd
Metadata
Metadata
Assignees
Labels
pluginThis issue/PR is about an existing or new pluginThis issue/PR is about an existing or new plugin
