Map API

Nutiteq Maps Lib SDK enables developing advanced mobile mapping applications.
Platforms: Android, RIM BlackBerry, Java ME (J2ME)
Download maps API SDK »
Untitled Document

Products

» View demos
» Downloads

Latest news

Last at Tue, 3 Apr 2012 23:31:42
Topic: MapXT SDK evaluation
See more news »

How to Show stored Tiles

4 replies [Last post]
Kishore
User offline. Last seen 1 year 11 weeks ago. Offline
Joined: 01/31/2011

Hi All,

How to retrieve the Tiles stored in sdcard and display as Map?

Thanks,
Kishore

Regards,
Kishore

jaak
User offline. Last seen 14 hours 42 min ago. Offline
Joined: 06/19/2008

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

Kishore
User offline. Last seen 1 year 11 weeks ago. Offline
Joined: 01/31/2011

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?

Regards,
Kishore

jaak
User offline. Last seen 14 hours 42 min ago. Offline
Joined: 06/19/2008

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.

/JaakL

alexniac
User offline. Last seen 40 weeks 3 days ago. Offline
Joined: 08/08/2011

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