com.ls.widgets.map.utils
Class GeoUtils
java.lang.Object
com.ls.widgets.map.utils.GeoUtils
public class GeoUtils
- extends java.lang.Object
Method Summary |
static void |
translate(MapWidget v,
int x,
int y,
Location location)
Helper function to translate position on the map to geographic coordinates. |
static void |
translate(MapWidget v,
Location location,
Point point)
Converts location to position on the map. |
static void |
translate(MapWidget v,
Point point,
Location location)
Helper function to convert position on the map to geographic coordinates. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GeoUtils
public GeoUtils()
translate
public static void translate(MapWidget v,
int x,
int y,
Location location)
- Helper function to translate position on the map to geographic coordinates. Map should be calibrated in order for
this method to take effect. Result will be returned in last parameter.
- Parameters:
v
- - com.ls.MapWidgetx
- - x coordinate in map coordinate system.y
- - y coordinate in map coordinate system.location
- - out parameter. Will contain latitude and longitude of point on the map.
translate
public static void translate(MapWidget v,
Point point,
Location location)
- Helper function to convert position on the map to geographic coordinates. Result will be returned in last parameter.
- Parameters:
v
- - com.ls.MapWidgetpoint
- - position on the map in pixels. Instance of android.graphics.Pointlocation
- - out parameter. Will contain latitude and longitude of point on the map.
translate
public static void translate(MapWidget v,
Location location,
Point point)
- Converts location to position on the map. Result will be returned in last parameter.
- Parameters:
v
- - com.ls.MapWidgetlocation
- instance of android.location.Location object.position
- - out parameter. Can be null.