nitaliano / react-native-mapbox-gl

A Mapbox GL react native module for creating custom maps
Other
2.16k stars 697 forks source link

Adds Example of VectorSource with a Third Party Tileset #1449

Open tylergaw opened 5 years ago

tylergaw commented 5 years ago

This PR

Adds a new example ThirdPartyVectorTileSource.js showing how to use VectorSource to consume a custom tileset. In https://github.com/mapbox/react-native-mapbox-gl/issues/1448 I described an issue I ran into trying to do this. It's not an issue with the library, but I was confused by what I needed to do.

The key thing that I missed from the docs was that I needed to use a TileJSON file for the url property of VectorSource. I was incorrectly trying to use the tile url directly.

How to Test

The example should show a map centered on Chicago with green lines indicating...I'm not real sure what the data is, but there should be a bunch of green lines.

example screenshot

example
nitaliano commented 5 years ago

This is a great example, we can get it worked into the v7 branch

StasDoskalenko commented 5 years ago

@nitaliano so v7 branch is still maintained? ;)

nitaliano commented 5 years ago

Yes, I'm working on it again. IDK how much official support this repo will get(most likely none) but I plan to keep helping maintaining it along with others in the community.