jeffdbrown
Lurker
I am working on an application which I need to plot out the route of a bus on a mapview. The problem is that there are many GPS lines to plot to draw the route and draw is called so often that it makes moving the map incredibly slow.
I have tried a few different methods but none have produced good results yet:
* Only drawing the points every 5th call of "Draw"
* Drawing on a bitmap in a canvas and then copying the canvas over when draw is called
* Doing the same as above but only updating the canvas when zoom has changed or the map has been moved more than 100 pixels
* Drawing lines that are only within view of the current map position (this is difficult because a map could need to see the line, but the endpoints of that line might be outside the view of the map)
I have looked at ItemizedOverlay a bit and it doesn't look like it would remedy the situation, but maybe I am wrong. Any suggestions that might help would be greatly appreciated!
Thanks,
Jeff
I have tried a few different methods but none have produced good results yet:
* Only drawing the points every 5th call of "Draw"
* Drawing on a bitmap in a canvas and then copying the canvas over when draw is called
* Doing the same as above but only updating the canvas when zoom has changed or the map has been moved more than 100 pixels
* Drawing lines that are only within view of the current map position (this is difficult because a map could need to see the line, but the endpoints of that line might be outside the view of the map)
I have looked at ItemizedOverlay a bit and it doesn't look like it would remedy the situation, but maybe I am wrong. Any suggestions that might help would be greatly appreciated!
Thanks,
Jeff