Multiple Overlays Want to Redraw only one

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

Multiple Overlays Want to Redraw only one

Postby flipper44 » Fri May 21, 2010 6:58 pm

I have succesfully created a tiled map Overlay that grabs tiles from a server and displays them on my map after it caches them on the SD card. My program is going to have two modes tracking and not tracking...This Tile Overlay I want to refresh when the User is in tracking Mode, or in either mode when the user Zooms or pans (this is working fine!!!)...
I want to create a second Overlay or utilize the pre mentioned itemized overlay to show to Other objects....
An Arrow at your current location and a compass in the corner.
The Arrow is to show your location and Point towards your bearing when Your speed is > 1, and is to show your location and your Orientation from the sensor when you are not moving. If you are still in Tracking mode it will continually center the map around you...if you are in Non-Tracking mode it will let you wander off the map...but will still show your orientation and or if speed > 1 bearing if still in view...Basically a look around mode.

My problem is that in continually refreshing the arrow it also forces all the tiles to refresh Even though they are stored on the SD card this is ridiculous...making any calls to the ItemizedOverlay or any Scroll 0,0 or AnimateTo call Automatically wipes out the canvas and requires a redraw of all my tiles, Also redrawing the Arrow and Compass from the sensor also has the same effect...which means I'm constantly redrawing tiles wether i need to or not.

Is there away to apply another canvas ontop of my map view? that won't refresh unless i tell it to? Iv'e a couple ways.

Code: Select all
Bitmap bitmapr = Bitmap.createBitmap(mapView.getWidth()/2, mapView.getHeight()/2, Bitmap.Config.ARGB_8888);
Canvas GARB = new Canvas(bitmapr);
GARB.drawCircle(30, 30, 30, paint);
GARB.drawLine(0, 0, mapView.getWidth()/2, mapView.getHeight()/2, paint);
     itemizedOverlay.draw(GARB, mapView, false);

I'm also interested in taking it to the next level when i get this figured out.
To orient the map based on bearing(speed>1)/Orientation(speed <1)...
...and to allow user to zoom further in than the API allows.

PS Why does The Google Maps App have to more zoom levels on the map (no Sat) than the API Mapcontrol Allows in my area?
Posts: 4
Joined: Thu Apr 22, 2010 3:03 pm
Location: Appleton, WI


Return to Map Problems

Who is online

Users browsing this forum: No registered users and 1 guest