-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
displaying geojson tiles from a remote server #2120
Comments
Tiled GeoJSON isn't supported. If you want to use tiled data, you need to provide it in vector tile format. |
Any chance this will be supported in the future? Tilestache MVT generation is MUCH more processor intensive than GeoJSON generation under certain conditions... to the point where it is pegging our server and failing. That's a separate problem, of course, but tiled GeoJSON in MapboxGL would be a welcome workaround. |
I'm looking to do the same thing. We are transitioning a Leaflet app to GL and were previously using a variation of this plugin: https://github.com/glenrobertson/leaflet-tilelayer-geojson @jfirebaugh Is there a raw tile layer in GL that we could extend to build a similar plugin? The thought would be to fetch the GeoJSON for the various tiles and then assemble them using a single GeoJSON source. I'm just not sure how to get the tile locations in GL to be able to fetch the data. |
Hi!
I am trying to display geojson tiles, that I get from my tilestache server, using mapboxgl.
I got it working in the case of pbf tiles, but wasn't able to find how I can request geojson tiles from my remote server. This is the script i use to add my geojson source, and it gives me an error that the property "tiles" is not valid.
var style = {
"version": 8,
"sources" : {
"terrain-data" : {
"type" : "geojson",
"tiles": ['http://127.0.0.1:8080/damage_blocks/{z}/{x}/{y}.json'],
"maxzoom": 10
}
},
"layers" : [
{
"id": "background",
"type": "background",
"paint": {
"background-color": "#41afa5"
}
}, {
'id': 'terrain-data-layer',
'type': 'fill',
'source': 'terrain-data',
'source-layer': 'damage_blocks',
'paint': {
'fill-color': '#ff69b4',
'fill-opacity': 0.8
}
}]
};
var map = new mapboxgl.Map({
container: 'map',
//style: 'mapbox://styles/mapbox/streets-v8',
style : style,
zoom: 10,
center: [-122.447303, 37.753574]
});
The text was updated successfully, but these errors were encountered: