Auto refresh MapActivity with overlay

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

Auto refresh MapActivity with overlay

Postby Mick » Tue May 20, 2008 3:24 pm

Hello :)

I am looking for how to refresh my map with its overlay (so make the draw method) every xxx seconds ??

Thanks :)
Mick.
Mick
Freshman
Freshman
 
Posts: 6
Joined: Mon Mar 24, 2008 9:59 am
Location: France

Top

Postby plusminus » Tue May 20, 2008 5:38 pm

Hello Mick,

as far as I know there is nothing available by default.
Maybe create a Thread (Runnable) that calls invalidate() every X seconds (don't forget to stop the thread when closing the app)

Regards,
plusminus
Last edited by plusminus on Thu May 22, 2008 5:45 pm, edited 1 time in total.
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby Mick » Thu May 22, 2008 2:11 pm

Thanks,
cop3rfi3ld helped me :
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. this.runOnUIThread(new Runnable() {
  2.  
  3.                                                 @Override
  4.  
  5.                                                 public void run() {
  6.  
  7.                                                         mapViewFromXML.invalidate();
  8.  
  9.                                                 }
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


In the class :)
Mick
Freshman
Freshman
 
Posts: 6
Joined: Mon Mar 24, 2008 9:59 am
Location: France

Top

Return to Map Problems

Who is online

Users browsing this forum: Majestic-12 [Bot] and 2 guests