com.nutiteq.location
Class NutiteqLocationMarker

java.lang.Object
  extended by java.util.TimerTask
      extended by com.nutiteq.location.NutiteqLocationMarker
All Implemented Interfaces:
LocationListener, LocationMarker, java.lang.Runnable

public class NutiteqLocationMarker
extends java.util.TimerTask
implements LocationMarker

Default implementation for location marker. Supports separate placemarks for indicating connection state (either connected or connection lost).


Constructor Summary
NutiteqLocationMarker(Placemark placemark, int updateInterval, boolean track)
           
NutiteqLocationMarker(Placemark placemarkConnected, Placemark connectionLost, int updateInterval, boolean track)
           
 
Method Summary
 void paint(com.nutiteq.wrappers.Graphics g, MapPos middlePoint, int screenCenterX, int screenCenterY)
          Not part of public API
 void quit()
          Notify marker to quit updates
 void run()
           
 void setLocation(WgsPoint wgsPoint)
           
 void setLocationSource(LocationSource source)
          Set location source into marker.
 void setMapComponent(BasicMapComponent mapComponent)
          Not part of public API
 void setTrackingEnabled(boolean enabled)
           
 void updatePosition()
          Not part of public API
 
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NutiteqLocationMarker

public NutiteqLocationMarker(Placemark placemark,
                             int updateInterval,
                             boolean track)
Parameters:
placemark - graphical part of marker, painted on map
updateInterval - update interval for marker display. If 0, then screen will be updated when location is received from location source
track - move center of map to received location

NutiteqLocationMarker

public NutiteqLocationMarker(Placemark placemarkConnected,
                             Placemark connectionLost,
                             int updateInterval,
                             boolean track)
Parameters:
placemarkConnected - marker for location source connected
connectionLost - marker for connection to location source lost
updateInterval - update interval for marker display. If 0, then screen will be updated when location is received from location source
track - move center of map to received location
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable
Specified by:
run in class java.util.TimerTask

paint

public void paint(com.nutiteq.wrappers.Graphics g,
                  MapPos middlePoint,
                  int screenCenterX,
                  int screenCenterY)
Not part of public API

Specified by:
paint in interface LocationMarker

setLocation

public void setLocation(WgsPoint wgsPoint)
Specified by:
setLocation in interface LocationListener

setMapComponent

public void setMapComponent(BasicMapComponent mapComponent)
Not part of public API

Specified by:
setMapComponent in interface LocationMarker

updatePosition

public void updatePosition()
Not part of public API

Specified by:
updatePosition in interface LocationMarker

setLocationSource

public void setLocationSource(LocationSource source)
Description copied from interface: LocationMarker
Set location source into marker. Could me used for source state status retrieving

Specified by:
setLocationSource in interface LocationMarker
Parameters:
source - location source associated with this marker

quit

public void quit()
Description copied from interface: LocationMarker
Notify marker to quit updates

Specified by:
quit in interface LocationMarker

setTrackingEnabled

public void setTrackingEnabled(boolean enabled)
Specified by:
setTrackingEnabled in interface LocationMarker