Skip to content
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

Using custom tiles #502

Closed
hamidhadi opened this issue Feb 10, 2017 · 5 comments
Closed

Using custom tiles #502

hamidhadi opened this issue Feb 10, 2017 · 5 comments

Comments

@hamidhadi
Copy link

How can I get custom tiles from my server?

@RobertSasak
Copy link
Contributor

See my answer in #630 .

@hamidhadi
Copy link
Author

@RobertSasak Thank you. Is there any way to load custom vector tiles?

@RobertSasak
Copy link
Contributor

I believe you need to provide url to your vector tiles source

"mapbox-streets": {
  "type": "vector",
  "url": "mapbox://mapbox.mapbox-streets-v6"
}

https://www.mapbox.com/mapbox-gl-js/style-spec/#sources-vector

@smoll
Copy link

smoll commented Nov 20, 2017

Hey @RobertSasak I noticed you mentioned you're using your own server to host mbtiles/rasters for download/accessing offline and was just wondering: have you had any luck pointing react-native-mapbox-gl at a local file instead of having it manage the download from a remote server for you? My use case is I'm already downloading a big zip file containing a bunch of things like images and other metadata, and it would be easier if I could just prepackage the offline-available tiles. Tried taking a look at the native code but I didn't see any place I could override a local path...

@RobertSasak
Copy link
Contributor

I'm sorry I have not tried it myself. Perhaps you can use file:// or assets://. I would start reading here
mapbox/mapbox-gl-native#579

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants