Open tylergaw opened 5 years ago
This is a great example, we can get it worked into the v7 branch
@nitaliano so v7 branch is still maintained? ;)
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.
This PR
Adds a new example
ThirdPartyVectorTileSource.js
showing how to useVectorSource
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 ofVectorSource
. I was incorrectly trying to use the tile url directly.How to Test
cd example && npm i
npm start
react-native run-ios
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