• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps MapView and GeoPoints redraw problem

41fr3

Lurker
Hello everyone,
I'm trying to develop a simple application that displays some points of interest on a MapView extending the ItemizedOverlay class to draw the points.
The problem is that when the number of points increases (now I have 20 points) the scrolling and the zooming of the map become extremely slow.
By doing a bit of debugging it seems that whenever I click on the screen is invoked the draw() method of ItemizedOverlay class, which redraws the whole map and points to it.
This continuous update, of course, slows down the application and makes it impossible to use the map itself.
I can't find any solution. Perhaps I should make sure that the draw method is not invoked so frequently? How? Do you have any suggestions to make the application faster?

Thanks for any suggestion
 
Hey 41fr3

The map really has to be redrawn due to the fact the zoom will require the points to be repositioned. You could however try loading the map and then placing points via a Asyncservice? I am not so familuar with MapView but this could help to speed things up a little for you.

Best of luck!

Tom

Interested in Beta testing Android apps? You can join the Polarmobile beta program here http://www.polarmobile.com/contact-us/beta-enroll/

Hello everyone,
I'm trying to develop a simple application that displays some points of interest on a MapView extending the ItemizedOverlay class to draw the points.
The problem is that when the number of points increases (now I have 20 points) the scrolling and the zooming of the map become extremely slow.
By doing a bit of debugging it seems that whenever I click on the screen is invoked the draw() method of ItemizedOverlay class, which redraws the whole map and points to it.
This continuous update, of course, slows down the application and makes it impossible to use the map itself.
I can't find any solution. Perhaps I should make sure that the draw method is not invoked so frequently? How? Do you have any suggestions to make the application faster?

Thanks for any suggestion
 
Back
Top Bottom