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

MBTiles #19

Open
1ec5 opened this issue Jan 10, 2018 · 2 comments
Open

MBTiles #19

1ec5 opened this issue Jan 10, 2018 · 2 comments

Comments

@1ec5
Copy link
Contributor

1ec5 commented Jan 10, 2018

An MBTiles source could be implemented as a plugin to the map SDK.

Although MBTiles is a Mapbox-supported tile container format, the Mapbox Maps SDK doesn’t support it out of the box as a way to sideload offline maps. mapbox/mapbox-gl-native#6862 (comment) explains the situation in more detail.

Fortunately, iOS map SDK v4.0.0 will introduce MGLComputedShapeSource for supplying tiles to the rendering engine on demand. It should therefore be possible to implement MBTiles support in a plugin that adds a computed shape source to the map.

See mapbox/mbxmapkit#3 for tips on how this feature was implemented in the legacy Mapbox iOS SDK (source code no longer publicly accessible).

/ref mapbox/mapbox-gl-native#9983
/cc @mapbox/maps-ios

@1ec5
Copy link
Contributor Author

1ec5 commented Jan 10, 2018

Note that this plugin request pertains only to the use of MBTiles as a container for vector tiles. Using MBTiles as a container for static tiles would be blocked by mapbox/mapbox-gl-native#7471.

@1ec5
Copy link
Contributor Author

1ec5 commented Jan 23, 2018

mapbox/mapbox-gl-native#10494 (comment) discusses the challenges involved in implementing MBTiles support atop mbgl. On iOS, we aren’t normally quite as concerned about overhead converting between C++ and platform-specific data types, but converting vector data from MVT to MGLShape to mbgl’s representation is a pretty roundabout approach. Leaving this issue open for now, because we could still use a plugin to prototype MBTiles support for non-performance-critical use cases.

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

No branches or pull requests

1 participant