-
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
How do I convert geometry to pbf for rendering with mapbox-gl-js #8321
Comments
It's hard to say what exactly is wrong in your PBF encoding given that there's no sample in the ticket, so I guess it's a matter of reading through the Vector Tile Spec 2.1 (modern GL JS versions require conforming to at least 2.0) and seeing if you missed anything. Looking at the images — maybe the polygons are encoded as linestrings, or don't have the last closing point or |
For a sample code converting geometry into vector tiles, you can check out https://github.com/mapbox/vt-pbf |
|
@zxp209 there were similar issues reported earlier for an older version of PostGIS — #7767 and #7797, and their issue was incorrect winding order of polygons. Here's the same issue reported in |
@mourner Thank you very much! |
mapbox-gl-js version:1.0.0
Question
I have a map webservice .I organize geometry as vector-tile.
I convert gps to pixel x y .Following is my code:
TILE_SIZE=256
zoom is tile level
Then I encode the data .mapbox-gl.js is able to decode the pbf data to geojson,but when I render the pbf, 3d building lost the front face .Following is image.
image1
image2
When I use mapbox-gl-js (version 0.4) ,rendering was fine.
How do I build the pbf that can be rendered by version 1.0.0 correctly.Are there some examples?
Thanks!
Links to related documentation
The text was updated successfully, but these errors were encountered: