- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Feature Request] Allow loadTileAtPath prop for LocalTile #2007
Comments
I actually managed to get offline maps working in Expo. However, this feature might still be good for some use cases. |
Great article, thanks for taking the time to explain your solution in details :) I will probably use it in a near future. |
Awesome work! This saved me, I was working for hours and couldn't figure out why localtile didn't work. I had a question about your tile fetching though. It looks like you make a separate request for each tile. For performance, I'm hoping to download a compressed file, then uncompress in one go. I see expo doesn't have that feature and using a different library would require a detachment. Do you have any thoughts on this? Did you have to worry about performance? |
Also, looking at the source code, I believe the idea you suggested is not possible because the loading has to be done on the native side, not javascript. If so, I think this issue can be closed? |
A great feature would be the possibility to pass a loadTileAtPath prop that takes a function that allows you to load tiles with whatever means you want.
In some cases there is no direct access to the filesystem, or you want to get tile tiles from a local database etc.
A example would be when developing in Expo, as they only expose their own filesystem api that does not work when passed in to LocalTile.
Example usage
Looking at the source code the LocalTile looks like it already uses the native version of this, but just fetches the tile from the filesystem.
Would be great to be able to pass our own functions here that returns the tile, then the developer can customise how to fetch the tile if there is some special way that it needs to be done (Expo filesystem, database, some map service that needs some math done to x, y, z to get the correct tile etc).
The text was updated successfully, but these errors were encountered: