*Try this!*

package org.apache.maps;

import android.graphics.Canvas;
import android.graphics.Paint;
import com.google.android.maps.Overlay;
import com.google.android.maps.Point;
import com.google.googlenav.Placemark;
import com.google.googlenav.Search;

public class MyOverlay extends Overlay {
    BrowseMap mMap;
    Paint paint1 = new Paint();
    Paint paint2 = new Paint();

    public MyOverlay(BrowseMap map) {
        mMap = map;
        paint2.setARGB(255, 255, 255, 255);
    }

    public void draw(Canvas canvas, PixelCalculator pixelCalculator,
boolean b) {
        super.draw(canvas, pixelCalculator, b);

        Search search = mMap.getSearch();
        if (search != null) {
            for (int i = 0; i < search.numPlacemarks(); i++) {
                Placemark placemark = search.getPlacemark(i);
                int[] screenCoords = new int[2];
                Point point = new Point(placemark.getLocation().getLatitude(),
                        placemark.getLocation().getLongitude());
                pixelCalculator.getPointXY(point, screenCoords);
                canvas.drawCircle(screenCoords[0], screenCoords[1], 9, paint1);
                canvas.drawText(Integer.toString(i + 1),
                        screenCoords[0] - 4,
                        screenCoords[1] + 4, paint2);
            }
        }
    }
}



On Mon, Sep 21, 2009 at 9:37 AM, Smelly Eddie <[email protected]> wrote:

>
> "please help me" is a useless topic title. You are not going tom get
> valuable help this way.
>
> Please trya  clear title that rel;ates to ty7our problem. and in the
> text describe what you ahve tried or read until this point, and why
> that may not be working.
>
> This is not a 'code my app' forum
>
> On Sep 20, 12:03 pm, Nine <[email protected]> wrote:
> > I want to display a overlay in maps ( as Overlay of MyLocation - The
> > circle which can flash ).
> > How to do ?
> > Thanks in advance.
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to