Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Folium cannot read VectorTiles #937

Closed
yukexie opened this issue Aug 22, 2018 · 1 comment
Closed

Folium cannot read VectorTiles #937

yukexie opened this issue Aug 22, 2018 · 1 comment
Labels
enhancement Feature request or idea about how to make folium better

Comments

@yukexie
Copy link

yukexie commented Aug 22, 2018

import folium
from folium import plugins

vectorTilesPBF= "http://openapi-dev.aurin.org.au/public/gwc/service/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&LAYER=aurin:GCCSA_2011_AUST&STYLE=&TILEMATRIX=EPSG:900913:{z}&TILEMATRIXSET=EPSG:900913&FORMAT=application/x-protobuf;type=mapbox-vector&TILECOL={x}&TILEROW={y}"
   
vectorTilesJSON= "http://openapi-dev.aurin.org.au/public/gwc/service/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&LAYER=aurin:GCCSA_2011_AUST&STYLE=&TILEMATRIX=EPSG:900913:{z}&TILEMATRIXSET=EPSG:900913&FORMAT=application/json;type=geojson&TILECOL={x}&TILEROW={y}"
    
rasterTiles= "http://openapi-dev.aurin.org.au/public/gwc/service/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&LAYER=aurin:GCCSA_2011_AUST&STYLE=&TILEMATRIX=EPSG:900913:{z}&TILEMATRIXSET=EPSG:900913&FORMAT=image/png&TILECOL={x}&TILEROW={y}"    

m= folium.Map(tiles=None, location=[-37, 140],
           zoom_start=6)

m.add_tile_layer(vectorTilesPBF, attr="test")
m'''

Hi, I tried the code above to read different format of spatial data, it works well with raster tiles but showing nothing with geojson and PBF format, not even the base map.

I saw leaflet mapboxvectortiles only available in 0.7.x version and I tried previous folium version 1.5 that fit leaflet 0.7.0 as well but still doesn't work.

Is there any plugins in folium can deal with these vector tiles?

Thanks

@Conengmo Conengmo added the enhancement Feature request or idea about how to make folium better label Sep 3, 2018
@Conengmo Conengmo added the work in progress Work is in progress on a PR, check the PR to see its status label Sep 29, 2018
@ocefpaf
Copy link
Member

ocefpaf commented Nov 9, 2018

Indeed folium does not support it. There is a PR open for it but I believe it should be an external plugin. Happy to be convinced otherwise. See #943

@ocefpaf ocefpaf closed this as completed Nov 9, 2018
@Conengmo Conengmo removed the work in progress Work is in progress on a PR, check the PR to see its status label Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request or idea about how to make folium better
Projects
None yet
Development

No branches or pull requests

3 participants