Is there a way to convert from GeoPoint to screen coordinates without using
MapView.getProjection().toPixels() ?
This method just doesn't work!

I have this code on my overridden Overlay.draw method:

    mapView.destroyDrawingCache();
>     Point point = new Point();
>     Point lastPoint = new Point();
>     GeoPoint gPoint1 = new GeoPoint(37, -120);
>     GeoPoint gPoint2 = new GeoPoint(38, -120);
>     Log.d(getClass().getSimpleName(), "Point is: " + point.x + ", " +
> point.y
>       + "/" + gPoint1.toString());
>     Log.d(getClass().getSimpleName(), "LastPoint is: " + lastPoint.x + ", "
>       + lastPoint.y + "/" + gPoint2.toString());
>
>     mapView.getProjection().toPixels(gPoint1, point);
>     mapView.getProjection().toPixels(gPoint2, lastPoint);
>
>     Log.d(getClass().getSimpleName(), "Point is: " + point.x + ", " +
> point.y
>       + "/" + gPoint1.toString());
>     Log.d(getClass().getSimpleName(), "LastPoint is: " + lastPoint.x + ", "
>       + lastPoint.y + "/" + gPoint2);
>

and I am receiving the same screen coords for points with 1° lat difference!
Is there another way to calculate those screen coords?

--Valeriano

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