In my application i have multiply overlays over the map.
In each overlay’s draw() method i draw shape using points from list.
final int listSize = list.size(); for (int i = 0; i < listSize; i++) { mMapView.getProjection().toPixels( new GeoPoint((int) (list.get(i).getPNT_LATITUDE() * 1e6), (int) (list.get(i).getPNT_LONGITUDE() * 1e6)), point);
As you can see, i have to create GeoPoint object each cycle to get pixel projection.
I can’t creat single object and use it every time, because GeoPoint has no “set” methods.
Is there any way to get projection without creating GeoPoint?
no, unfortunately not. i would almost pay for this functionality 😉
many map things around GeoPoints and the Projection are very buggy and the classes are all final and no source code to be found
if your coordinates somehow repeat themselves, you could store the geopoint.