[Solved] overlay draw frequency

General topics about the Android-Platform itself.
Coding issues please to the subforum right below.

[Solved] overlay draw frequency

Postby oldchangkee » Fri Feb 15, 2008 4:49 pm

I have an overlay class, which I then added to the controller in activity class (this is based on basic map tutorial on this forum).

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.         OverlayController overlayController = mapView.createOverlayController();
  2.  
  3.         MyOverlay overlay = new MyOverlay();
  4.  
  5.         overlayController.add(overlay, true);
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


And in MyOverlay draw method, I log a message, just to make sure when draw is actually called.

I started the app, displays the map, but then i noticed that the overlay draw's method is called several times (the log message appears multiple times). Why is the draw method is called several times? Is this the intented behavior?

How do I control when to refresh the map?
oldchangkee
Freshman
Freshman
 
Posts: 2
Joined: Mon Feb 04, 2008 1:41 am

Top

Postby plusminus » Fri Feb 15, 2008 6:42 pm

Hello oldchangkee,

is it redrawn even when you do nothing or just when you move the map :?:

Regards,
plusminus
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 oldchangkee » Sat Feb 16, 2008 2:21 am

I let the application start, check the log, and my log message appears several times.
If I then drag the map to another location, again, the log message appears several times.

Is this the expected behaviour?
oldchangkee
Freshman
Freshman
 
Posts: 2
Joined: Mon Feb 04, 2008 1:41 am

Postby plusminus » Sat Feb 16, 2008 2:59 pm

Hello oldchangkee,

every single time the map gets moved there needs to be a redraw.
When the map "stands still" there should be no or at least far less redraws.

Regards,
plusminus
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

Top

Return to General

Who is online

Users browsing this forum: No registered users and 4 guests