mapbox / mapbox-gl-js

Interactive, thoroughly customizable maps in the browser, powered by vector tiles and WebGL
https://docs.mapbox.com/mapbox-gl-js/
Other
11.22k stars 2.23k forks source link

holes while using pbf mapbox vector tile custom source #2609

Closed rishabhjain30 closed 8 years ago

rishabhjain30 commented 8 years ago

mapbox-gl-js version:0.18.0

jsbin link - https://jsbin.com/ninukexacu/edit?html,output

Holes at lower zoom levels near boundaries of vector features.

lucaswoj commented 8 years ago

This looks like a problem with your vector tiles themselves, not mapbox-gl-js. Any thoughts @jakepruitt @mapsam?

rishabhjain30 commented 8 years ago

@lucaswoj but it works well with Leaflet.MapboxVectorTile.

mapsam commented 8 years ago

👋 @rishabhjain30 how are you creating/serving your vector tiles? It looks like you are are serving from a custom source.

https://maraudersapi.socialcops.com/services/shapefile/india_states/vector-tiles/{z}/{x}/{y}.pbf

it works well with Leaflet.MapboxVectorTile

can you link us to a working version of this?

rishabhjain30 commented 8 years ago

@mapsam I am using PGRestAPI to create these vector tiles which basically uses node-mapnik.

Working version: https://mopng.socialcops.com/

Here I am using Leaflet.MapboxVectorTile with the same tile source.

mapsam commented 8 years ago

@rishabhjain30 just taking a quick glance at PGRestAPI - looks like they are on a very old version of Node Mapnik - current stable version is 3.5.13, which introduces a large number of changes to how Mapbox Vector Tiles are encoded. This may be the issue - but I cannot confirm at the moment.

rishabhjain30 commented 8 years ago

@mapsam Thanks. Though it seems to be working correctly when the tiles are fetched from a mbtiles file rather than being dynamically generated from a shapefile.

stackTom commented 8 years ago

I have a similar issue when serving mbtiles using this mbtile server: https://github.com/klokantech/tileserver-php Utilizing mapbox tile servers leads to no hole in the rendering of my data, but using that custom server leads to holes. Also, while using that custom server, I can serve from a mamp-based localhost, but not on a fresh apache install in linux (Uncaught Error: Unimplemented type: 3), as described here: https://github.com/mapbox/mapbox-gl-js/issues/2606

stirringhalo commented 8 years ago

I would love to know how you fixed this @stackTom !

stackTom commented 8 years ago

@stirringhalo Which issue, the holes in the rendered data, or the Uncaught Error: Unimplemented Type 3?

lucaswoj commented 8 years ago

This appears to be an error in the tileserver, not GL JS