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
paint.setColor(0x66ffff00);
paint.setStrokeWidth(3);
paint.setStyle(Style.FILL_AND_STROKE);
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);
//TRIED THESE NO LUCK
findViewById(R.id.myGMap).draw(GARB);
findViewById(R.id.MapLayout).draw(GARB);
mapView.draw(GARB);
itemizedOverlay.draw(GARB, mapView, false);
Come to think of it I'd rather have control of Two canvasas ontop of
the map and Just use the Overlay draw method to send information to my
own classes that determine if a redraw of my canvas's are necessary.
But none of the above methods work.
I'm also interested in taking it to the next level when i get this
figured out.
http://www.anddev.org/viewtopic.php?p=30997
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?flipper44
Freshman
Posts: 3
Joined: Thu Apr 22, 2010 3:03 pm
Location: Appleton, WI
Private message
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en