Topic: Pre-Download Tiles in another scene

Hello,

I'm new to this plugin and wonder if there is a way to download an amount of tiles inside a rectangle.

In my app a user downloads maybe 20 lat/lon values from my database. These should be rendered as markers on a map.
I can calculate a rectangle where all the markers would fit in and add an offset to it.

Now it would be great if I could download all the needed tiles for a given maptype into the cache folder (maybe with a progress bar?) so I can use them later in my map scene and people won't need internet connection.
That would be great.

I think a workaround could be to load a map behind my UI somewhere in the UI-only-scene and load all the tiles from there?

I appreciate any help. :-)

Cheers,
Robert

Re: Pre-Download Tiles in another scene

Hello.

You can do this, but unfortunately, only manually, because the tile classes and the WWW wrapper require a map in the scene.
You can see URL of the selected provider in OnlineMapsProvider class.

If you want to use the built-in implementation of the cache, keep in mind that it uses the atlas of tiles. The current implementation of the atlas you can see in OnlineMapsCache.FileCacheAtlas.Save. This is a quite simple structure.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.