-
Notifications
You must be signed in to change notification settings - Fork 0
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
Figure out how to use vector tiles #9
Comments
This is it: <MapboxGL.VectorSource
id="nationalParkBoundaries"
url="https://tiles.nst.guide/nationalpark/tile.json"
onPress={event => console.log(event.nativeEvent.payload.properties)}
ref={source => {
this._vectorSource = source;
}}
>
<MapboxGL.FillLayer
id="nationalParkFill"
sourceLayerID="nationalpark"
style={layerStyles.nationalParkFill}
visibility="visible"
/>
</MapboxGL.VectorSource> The key is that you also need the I think with Tippecanoe, usually the layer name is the same as what the file name was. But if you can't figure it out, this tool will tell you the layer names. |
Fixed in 27a3ac8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
100% should figure out how to use vector tiles. Testing
on the wilderness boundaries takes the file size from 17MB to 2.7MB. That's an 85% drop!
Using
mbview
to inspect this in the browser, it's important to note that you can still get metadata out of the tiles!! I can hover over a wilderness area and see its attributes. So using vector tiles looks like an obvious improvement with no real drawback.The text was updated successfully, but these errors were encountered: