Separe dbCache para diferentes áreas con mapbox
Frecuentes
Visto 54 equipos
0
I'm creating an app that caches map areas for offline use. I have a single tilesource with many possible areas of interest, and I want to be able to remove cache for a specific area but not other areas.
What would be the best way to cache the different areas to a database in this case?
Also, is it possible to have more than one background cache process?
1 Respuestas
0
We have not tried more than one background process. It probably won't be great due to performance reasons, but you should be able to do it technically.
I would use different tile sources for different areas with the current setup. A tile source currently is meant to be cleared all-or-nothing. This could be modified in custom changes to the (open source) SDK but doesn't do that out of the box.
contestado el 28 de mayo de 14 a las 23:05
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas caching mapbox tilecache or haz tu propia pregunta.
As I understand it each tileSource has its own Map ID. So if I want to allow cache of 20 areas separately (out of the box), I would need 20 of map IDs? - User24578
If you set it up that way, yes, each tile source would be a separate map ID. But I would just recommend subclassing your tile source class (
RMMapboxSource
or whatever) to allow setting of a custom cache identifier. You can then instantiate multiple sources with the same map ID but keep their caches separate. - Incaico