-
Notifications
You must be signed in to change notification settings - Fork 1.3k
MBTiles source #6862
Comments
Hi Mapbox team @incanus @boundsj @jfirebaugh. Can somebody clarify the current state & future plans for MBTiles in the mobile SDKs? Earlier comments indicated that MBTile support was likely: There seemed to be progress here #2939, but it was closed in favour of #3715 which doesn't seem to include MBTile support. The marketing and help page copy currently implies that MBTiles are supported:
https://www.mapbox.com/help/define-mbtiles/
My questions are:
More background on my client's use case: |
First, to address the OP:
We have discussed internally recently, and things along the lines of your (@JesseCrocker) work in #6940 are more generically useful given that you can provide a tile as needed from whatever format you like. We are hesitant to broaden the source API options given that we still have yet to port image (#1350) and video (#601) sources from our own spec across from GL JS. @robmaceachern To answer your questions, OTOH here is how I would clarify:
So to answer your questions @robmaceachern, I'm afraid there are no good approaches right now. Helping shepherd #6940 would be the best way to get flexible local access to tiles into the SDKs (especially Android), at which point you could just serve up SQLite-based tiles easily with some minor linkage code. I hope this clarifies. This just hasn't been on our radar for a while given many other priorities around internal/GL JS parity, performance and stability, and new work like 3D extrusions. |
In case anybody is interested, I've managed to display MBTiles in an https://gist.github.com/namannik/3b7c8b69c2d0768d0c2b48d2ed5ff71c |
hai @namannik, can u help me? i use your class, but in let tileImage = UIImage(data: tileData) always return nil ( i use let path = Bundle.main.path(forResource: "countries", ofType: "mbtiles") to get path), thanks before |
Hi, @dije. I've made some changes so it won't matter if Any other discussion about MGLMapView+MBTiles.swift should take place over on the gist's page to not confuse this issue's discussion. |
Thanks for the answer @namannik, ill go check latest gist, and try again |
@dije In this case, replace MGLRaterSource with MGLVectorSource should works, if you have other question or feedback, let's discuss in the gist |
Building on @JesseCrocker’s work in #6940, MGLComputedShapeSource will ship with Android map SDK v6.0.0, iOS map SDK v4.0.0, and macOS map SDK v0.7.0. That should in theory make it possible to implement an MBTiles-backed vector source. It’s more likely that this source would be implemented as a plugin than going straight into the SDK proper, so I opened mapbox/mapbox-plugins-ios#19. An MBTiles-backed raster source, meanwhile, is blocked by #7471. |
I don't agree that MGLComputedShapeSource eliminates the need for an MBTiles source that works with vector tiles, because unless something has changed recently there are no publicly exposed classes/methods for parsing vector tiles, so the app developer would still have to implement that, and MGLComputedShapeSource has no way to provide data in multiple layers, which is common in vector tiles. But if support for MBTiles is not going to make it into the core SDK it seems like a great feature for a plugin, because it can be implemented in a self contained fashion by a class that implements |
Thanks, those are good points. I didn’t mean to rule out eventually adding MBTiles support to the SDK in some form – any plugin can potentially be folded into the SDK at a later date. But I figure mapbox/mapbox-plugins-ios#19 is a first step towards making that possible. |
Even if there was a decoder for vector tiles, #10494 would still be needed before you got blocked by the multiple layers issue. |
@asheemmamoowala Referenced by Docs, I thought they were already added in sdk after v5.2.1. Is there anything I missed? |
@typebrook Sorry for the confusion. These classes are not included in the released SDK as yet. The docs should not have those classes visible yet. |
Hi, |
@namannik @JanC @asheemmamoowala Lines 78 to 79 in 982fcc9
Am I thinking wrong? |
closing issue because im guessing this is never going to happen. |
@typebrook Did you ever come up with a workaround to getting your app able to request MBTiles hosted on localhost while offline? |
Using a custom NSURLProtocol that handles a custom URL scheme like |
Im trying to use an MBTiles file as a source for tiles in an iOS application. It looks like there is currently no support for this.
Is this a planned feature?
If i were to implement it would the PR be considered for merging?
The text was updated successfully, but these errors were encountered: