how to update mapoverlay as location changes?

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

how to update mapoverlay as location changes?

Postby hitendra » Sat Jan 08, 2011 5:47 am

hi,

can anyone tell me how i can change mapoverlay as the location changes?

rightnow i am able to display on current location.but what happens if the location change it shows me old locationas(overlay item i.e image icon) well new location.

i want that if the location changes the map should only shows the current location(image icon).the old overlay item (image icon)should be removed.

thankx
hitendra
Freshman
Freshman
 
Posts: 4
Joined: Fri Dec 31, 2010 9:53 am

Top

Re: how to update mapoverlay as location changes?

Postby BlakeJ » Sat Jan 08, 2011 6:06 am

I believe this will help:
http://blogs.itemis.de/frey/2009/04/07/location-based-services-on-android-part-2/
specifically
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.         if (overlays.size() > 0) {
  2.                         for (Iterator iterator = overlays.iterator(); iterator.hasNext();) {
  3.                                 iterator.next();
  4.                                 iterator.remove();
  5.                         }
  6.                 }
  7.  
  8.  
Parsed in 0.031 seconds, using GeSHi 1.0.8.4
BlakeJ
Junior Developer
Junior Developer
 
Posts: 10
Joined: Sat Sep 04, 2010 8:45 am

Re: how to update mapoverlay as location changes?

Postby hitendra » Sat Jan 08, 2011 7:14 am

thankx
i have already done it with the given reference.
hitendra
Freshman
Freshman
 
Posts: 4
Joined: Fri Dec 31, 2010 9:53 am

Top

Return to Map Problems

Who is online

Users browsing this forum: No registered users and 4 guests