de.monarchy.guideme.map.nutiteq
Class NutiteqWrapper

java.lang.Object
  extended by de.monarchy.guideme.map.MapWrapper
      extended by de.monarchy.guideme.map.nutiteq.NutiteqWrapper

public class NutiteqWrapper
extends MapWrapper

A map wrapper for the Nutiteq api.

Author:
dstuerze

Method Summary
 void centerAt(GeoCoordinate g)
          Centers the map view at the given coordinate.
 GeoCoordinate getCenter()
          Returns the center position of the map.
static NutiteqWrapper getInstance(Context c)
          Returns an instance of the NutiteqWrapper.
 View getView()
          Returns the map view the controller has power over.
 void onOrientationChanged(float[] arg)
          Callback method for when the device's orientation has changed.
 void onPositionChanged(GeoCoordinate arg, POI[] arg1)
          Callback method indicating a change of the device's orientation happened.
 void positionZoomControls(int x, int y)
          Sets zoom controls of the map view to the particular values.
 void removeRoute()
          Convenience method for removing the route to be mapped.
 void setRoute(RoutePoint[] routePoints)
          Callback method indicating a new route has been calculated.
 void setScrollable(boolean b)
          Indicates whether the map view should have the ability to scroll.
 
Methods inherited from class de.monarchy.guideme.map.MapWrapper
clearTouchDelegate, isScrollable, setDrawing, setFullScreen, setTouchDelegate, showViewDirection
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

onOrientationChanged

public void onOrientationChanged(float[] arg)
Description copied from class: MapWrapper
Callback method for when the device's orientation has changed. The orientation will be given in an array with three values as described by Android's SensorEvent.

Specified by:
onOrientationChanged in class MapWrapper
Parameters:
arg - new orientation

onPositionChanged

public void onPositionChanged(GeoCoordinate arg,
                              POI[] arg1)
Description copied from class: MapWrapper
Callback method indicating a change of the device's orientation happened. With the new position, an array of POIs in a range around this location is submitted.

Specified by:
onPositionChanged in class MapWrapper
Parameters:
arg - new position
arg1 - POIs around that spot

getView

public View getView()
Description copied from class: MapWrapper
Returns the map view the controller has power over.

Specified by:
getView in class MapWrapper
Returns:
map view

removeRoute

public void removeRoute()
Description copied from class: MapWrapper
Convenience method for removing the route to be mapped.

Specified by:
removeRoute in class MapWrapper

setRoute

public void setRoute(RoutePoint[] routePoints)
Description copied from class: MapWrapper
Callback method indicating a new route has been calculated. If a routing request failed, this method's parameter will be indicating it by being null.

Specified by:
setRoute in class MapWrapper
Parameters:
routePoints - array with route instructions

setScrollable

public void setScrollable(boolean b)
Description copied from class: MapWrapper
Indicates whether the map view should have the ability to scroll.

Overrides:
setScrollable in class MapWrapper
Parameters:
b - true if scrolling is allowed

centerAt

public void centerAt(GeoCoordinate g)
Description copied from class: MapWrapper
Centers the map view at the given coordinate.

Specified by:
centerAt in class MapWrapper
Parameters:
g - position of the new center

getCenter

public GeoCoordinate getCenter()
Description copied from class: MapWrapper
Returns the center position of the map.

Specified by:
getCenter in class MapWrapper
Returns:
momentary center position of the view in world coordinates

positionZoomControls

public void positionZoomControls(int x,
                                 int y)
Description copied from class: MapWrapper
Sets zoom controls of the map view to the particular values. The parameters shall be constants from RelativeLayout.LayoutParams indicating the position in respect to the parent (which is the map view itself).

Specified by:
positionZoomControls in class MapWrapper
Parameters:
x - horizontal position
y - vertical position

getInstance

public static NutiteqWrapper getInstance(Context c)
Returns an instance of the NutiteqWrapper. NutiTeqWrapper is a singleton, so it only creates one instance.

Parameters:
c - application context
Returns:
the one and only instance