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?

User24578
  • 25
  • 1
  • 5

1 Answers1

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.

incanus
  • 5,100
  • 1
  • 13
  • 20
  • 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 Jun 01 '14 at 16:02
  • 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. – incanus Aug 05 '14 at 16:33