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, 6 Dec 2011 18:37:53
Topic: New BlackBerry sample app
See more news »

Change Color of the Red Tiles

9 replies [Last post]
ems_project_fh-kiel
User offline. Last seen 1 year 50 weeks ago. Offline
Joined: 12/12/2009

Hello,

Is it possible to change the color of the red tiles?
I use offline map, my JAR is about 20MB.
I suggest to delete map tiles to save storage.
Thanks for your help

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

GeoMap has method setMissingTileImage(Image missingTile). Sample with solid color fill:


final GeoMap offlineMap = new MyJaredOpenStreetMap("/res/raw/",
256, 1, 16);
final Image missing = Image.createImage(offlineMap.getTileSize(),
offlineMap.getTileSize());
final Graphics graphics = missing.getGraphics();
graphics.setColor(0xFF000000);
graphics.fillRect(0, 0, offlineMap.getTileSize(), offlineMap.getTileSize());
offlineMap.setMissingTileImage(missing);
mapComponent.setMap(offlineMap);

/JaakL

Kishore
User offline. Last seen 49 weeks 2 days ago. Offline
Joined: 01/31/2011

What is that "MyJaredOpenStreetMap" ???

Regards,
Kishore

Kishore
User offline. Last seen 49 weeks 2 days ago. Offline
Joined: 01/31/2011

What is that "MyJaredOpenStreetMap" ???

Regards,
Kishore

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

It is just a sample, actually any GeoMap has setMissingTileImage method.

/JaakL

Kishore
User offline. Last seen 49 weeks 2 days ago. Offline
Joined: 01/31/2011

Thanks Jaak.

But I have doubt like where do I pass parameters like "/res/raw/", 256, 1 and 16, to get the image from raw resource?

Do I need to inherit the GeoMap?

Regards,
Kishore

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

Posting http://www.nutiteq.ee/map-problem-mapclicked-problem-addplace-problem has source of it attached. The issue with SDK bundled JaredOpenStreetMap was that it assumes file names with style zoom_x_y.png, but Android SDK (at least some versions of it) hates filenames starting with number. So myjared uses file names starting with "t".

Actually, when I look to the code, it looks equal using bundled class, then you do not need this MyJaredOpenStreetmap, and also Android SDK should be happy:

final GeoMap offlineMap = new JaredOpenStreetMap("/res/raw/t",
256, 1, 16);

/JaakL

Kishore
User offline. Last seen 49 weeks 2 days ago. Offline
Joined: 01/31/2011

Hi Jaak,

Thanks.
Setting of different color in place of Red color in tiles, not working properly.

If I set that, then all over the specified color is coming in stead of Maps. :-(

How to solve that ?

Regards,
Kishore

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

I would need application project package to see what is happening there.

/JaakL

Kishore
User offline. Last seen 49 weeks 2 days ago. Offline
Joined: 01/31/2011

Hi Jaak,

If You need to see my app code, I will send you shortly. Thanks for your response.

Regards,
Kishore