Hi All,
How to retrieve the Tiles stored in sdcard and display as Map?
Thanks,
Kishore
Thanks a lot Jaak.
I implemented and its working fine.
I have a small doubt. In the constructor of StoredMap class, what is the first String Parameter, we are passing, here it is "OpenStreetMap". What kind of String I can pass there?
Map files have directories something like: /sdcard/maps/OpenStreetMap_0/ . Here you see part of search path is map type name "OpenStreetMap". This string must be the same as in the constructor.
Hello.
I'm new and I'm very interested about the way to use Nutiteq.
I'd like to make an Android App who could display some offline maps.
So, I stored this tile maps in the SDCard at the directory /sdcard/osmdroid/IGN.
Then, the format is the following : /10/515/646.png
etc...
When I use the code you wrote ( mapComponent.setFileSystem(new AndroidFileSystem());
StoredMap storedMap=new StoredMap("OpenStreetMap", "/sdcard/osmdroid/IGN/", true);
mapComponent.setMap(storedMap);), I only have red tiles on the screen.
Did i forget something ? Thanks a lot for your reply.
Alex
Basically there are two steps:
a) store maps to sdcard in suitable format (so-called MGMaps offline maps format), to e.g. mymaps folder
b) add following lines to your code (in case of Android, other platforms vary a bit):
mapComponent.setFileSystem(new AndroidFileSystem()); StoredMap storedMap=new StoredMap("OpenStreetMap", "/sdcard/mymaps/", true); mapComponent.setMap(storedMap);There are several places to get you on with it:
a) read developer guide
b) j2me package has sample app "storedmaps" with code
c) search the forum for more guides and troubleshooting tips.
/JaakL