Map ViewGroup-> Dispatch Draw, Resource Problem.

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

Map ViewGroup-> Dispatch Draw, Resource Problem.

Postby Kamal » Fri Jun 05, 2009 11:14 am

Hi All,

I am using dispatchDraw(Canvas canvas) method of ViewGroup class to draw path on Map.

The problem is, I have to draw all the points again and join them once dispatchDraw is called. This is fine is i have few points(10-15), but my application requires to have points more than 4000.

So, if i redraw all the points back, the app almost hangs(since it has to plot all the points again).

Can you please suggest any alternative or better way than this to plot and join the points where i need not draw the points again.....

Junior Developer
Junior Developer
Posts: 23
Joined: Wed May 27, 2009 11:15 am


Postby Christoph » Sun Jul 05, 2009 4:04 am

GeoPoint x = mapView.getProjection().fromPixels(int x, int y)

is your friend :D with this, you're able to calculate the current visible area.
User avatar
Posts: 28
Joined: Thu Jul 02, 2009 3:34 am
Location: Bonn, Germany


Return to Map Problems

Who is online

Users browsing this forum: No registered users and 1 guest