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

Uudised

Viimane: Thu, 15 Mar 2012 14:51:08
Teema: Vabad töökohad pakkuda
Veel uudiseid »

remove places and repaint

4 replies [Last post]
Emilio
User offline. Last seen 2 years 28 weeks ago. Offline
Joined: 03/20/2009

Every time I remove places from the map using the

removeAllPlaces() method, the places are removed but the images still there. I call the repaint() method but nothing changes. The places are only removed when I change the zoom or move the map...

Any help will be appreciated :)

jaak
User offline. Last seen 4 days 19 hours ago. Offline
Joined: 06/19/2008

I do not understand really: what images are there when places are removed? From where they are removed ?

/JaakL

Emilio
User offline. Last seen 2 years 28 weeks ago. Offline
Joined: 03/20/2009

Sorry, maybe my explanation was not so good :).
I try to remove the images that represent the places (an icon representing an hotel...) from the map screen. When I call the removeAllPlaces() method the places are removed (the user can not interact more with the places, click on a place etc...) but the images (that represent the places still there). I was hopping that calling repaint() will solve the problem, but the places are only removed after I zoom in/out or move the screen.

Maybe is something wrong with my code, but if someone has the same problem any help will be appreciated.

Two images are attached to clarify the problem.

Thanks.

showing Placesshowing Places

After removeAllPlaces: The image representing the places still showing, but the places are not there...After removeAllPlaces: The image representing the places still showing, but the places are not there...

Emilio
User offline. Last seen 2 years 28 weeks ago. Offline
Joined: 03/20/2009

I have found a workarround, is not the best way, but works for me: Zoom out and in faster to force the map to repaint

mapDisplay.setZoom(mapDisplay.getZoom()+1);
mapDisplay.setZoom(mapDisplay.getZoom()-1);

Cheers!

jaak
User offline. Last seen 4 days 19 hours ago. Offline
Joined: 06/19/2008

Actually there it was a bug in library with this method. Please take a look to latest PA version from http://nutiteq.com/beta/lib , it should be fixed there.

/JaakL