Thanks a lot Peter. It worked well.

--Valeriano

On Fri, Nov 14, 2008 at 6:00 AM, Peter Stevenson <[EMAIL PROTECTED]>wrote:

>
>
> Peter Wrote
>
>        currentPoint = new GeoPoint((int) (-43.2973 * 1000000), (int)
> (172.5929 * 1000000));
>        endCurrentPoint = new GeoPoint((int) (-43.2984 * 1000000), (int)
> (172.5940 * 1000000));
>
> this might help
>
>
>
>
> Allan Valeriano wrote:
> > 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