com.ls.widgets.map.config
Class GPSConfig

java.lang.Object
  extended by com.ls.widgets.map.config.GPSConfig

public class GPSConfig
extends java.lang.Object

GPSConfig class allows to configure the location aware aspects of the MapWidget. Do not create this class directly. Instead use MapWidget.getGPSConfig() method.


Constructor Summary
GPSConfig()
           
 
Method Summary
 MapCalibrationData getCalibration()
          Returns calibration data for the map.
 int getMinDistance()
           
 int getMinTime()
          Returns minimal refresh time in milliseconds.
 boolean getPassiveMode()
           
 boolean isMapCalibrated()
           
 void setGeoArea(MapCalibrationData geoArea)
          Sets the calibration data for the map.
 void setGPSUpdateInterval(int minTime, int minDistance)
          Sets the GPS sensor update time interval and distance.
 void setPassiveMode(boolean passiveMode)
          Tells the map to not use GPS by itself, it will use "passive" location provider in order to display user's position.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GPSConfig

public GPSConfig()
Method Detail

getPassiveMode

public boolean getPassiveMode()

setPassiveMode

public void setPassiveMode(boolean passiveMode)
Tells the map to not use GPS by itself, it will use "passive" location provider in order to display user's position. You will need to call this method before call to setShowMyPosition.

Parameters:
passiveMode - - true if you want the map to work in passive mode, false otherwise.

setGeoArea

public void setGeoArea(MapCalibrationData geoArea)
Sets the calibration data for the map. This calibration data contains the top left and bottom right coordinate of the corners of the map.

Parameters:
geoArea - - instance of RectGeo class.

setGPSUpdateInterval

public void setGPSUpdateInterval(int minTime,
                                 int minDistance)
Sets the GPS sensor update time interval and distance.

Parameters:
minTime - the minimum time interval for notifications, in milliseconds. This field is only used as a hint to conserve power, and actual time between location updates may be greater or lesser than this value.
minDistance - the minimum distance interval for notifications, in meters

getMinTime

public int getMinTime()
Returns minimal refresh time in milliseconds.


getMinDistance

public int getMinDistance()
Returns:
Returns minimal refresh distance in meters. Min distance is a distance that user should pass in order to receive location update.

getCalibration

public MapCalibrationData getCalibration()
Returns calibration data for the map.

Returns:
instance of MapCalibratinData.

isMapCalibrated

public boolean isMapCalibrated()
Returns:
Returns true if config contains calibration data, false otherwise.