com.ls.widgets.map.utils
Class GeoUtils

java.lang.Object
  extended by com.ls.widgets.map.utils.GeoUtils

public class GeoUtils
extends java.lang.Object


Constructor Summary
GeoUtils()
           
 
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
 

Constructor Detail

GeoUtils

public GeoUtils()
Method Detail

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.MapWidget
x - - 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.MapWidget
point - - position on the map in pixels. Instance of android.graphics.Point
location - - 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.MapWidget
location - instance of android.location.Location object.
position - - out parameter. Can be null.