Were u able to resolve this problem?

If not, u can always try the following technique that basically
creates a new xparent map overlay that contains an invisible object
that tracks your cellphone location.:

1. create a transparent PNG of same shape/size as your
MyLocationOverlay bitmap;
2. extend the ItemizedOverlay class and override the "draw(Canvas
canvas, MapView mapView, boolean shadow)" method.
    In this method, position your xparent PNG at the coordinates as
your location (you can extract your coordinates easily
    from your custom MyLocationOverlay class);
3. in the ItemizedOverlay "ontap(int index)" method, respond to the
tap event whenever the correct index is detected. Here
    is where you apply whatever actions you want to have performed for
tapping;
4. in your MapActivity "onCreate(Bundle b)" method, create a new
instance of your ItemizedOverlay subclass and append it
    to your mapviews' overlays Collection.
    **Make sure you first specify the bounds of your Drawable object
BEFORE appending it to the overlays Collection (using
    the 'Drawable.setBounds()' method ).


On Nov 8 2008, 7:22 am, Stu <[email protected]> wrote:
> No ideas then? :(
>
> On Nov 7, 11:23 am, Stu <[email protected]> wrote:
>
> > Hi everyone.
>
> > I've implemented a basic map that has aMyLocationOverlayon it. I'm
> > trying to make it do something when I tap on my current location. I've
> > read the docs aboutdispatchTap() [http://code.google.com/android/
> > reference/com/google/android/maps/
> >MyLocationOverlay.html#dispatchTap()] and I'm pretty sure that's what
> > I need.
>
> > I'm having a bit of troubleoverridingit. I can't do it in the same
> > way I would override things in my class.
>
> > My class definition looks something like this:
> > public class MyApp extends MapActivity implements LocationListener {
>
> > Normally I would do something like this:
>
> > @Override
> > protected void onPause() {
> >     super.onPause();
> >     Log.i(TAG, "Disabling the GPS stuff.");
> >     mlo.disableMyLocation();
>
> > }
>
> > But that's not going to cut it for aMyLocationOverlay, I don't think.
>
> > How can I get around this?
>
> > Regards,
> > Stuart.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to