MapTrip SDK Android Manual 9.9.7
Geofence Class Reference

The Geofence class stores geofences.
More...

+ Inheritance diagram for Geofence:

Public Member Functions

boolean equals (Object o)
 
native int getAngle ()
 
native GeofenceFunction getFunctionType ()
 
native String getName ()
 
native Position getPosition ()
 
native int getRadiusMeters ()
 
native Position getWgs84Position ()
 
native ApiError setAngle (int angle)
 
native ApiError setFunctionType (GeofenceFunction type)
 
native ApiError setName (String name)
 
native ApiError setPosition (Position pos)
 
native ApiError setRadiusMeters (int radiusMeters)
 
native ApiError setWgs84Position (Position wgsPosition)
 

Static Public Member Functions

static native ApiError addFence (Geofence fence)
 
static native Iterable< GeofencegetGeoFenceIterator ()
 
static native ApiError removeAll ()
 
static native ApiError removeAt (int index)
 

Detailed Description

The user can add or remove fences from this structure at all times. Duplicates are allowed. The fences are persistently stored in the file geofences.xml

Member Function Documentation

◆ addFence()

static native ApiError addFence ( Geofence  fence)
static

Adds a copy of a fence at the end of the fence list.

Parameters
fencegeofence to add
Returns
Errorcode

◆ equals()

boolean equals ( Object  o)
inherited

◆ getAngle()

native int getAngle ( )

Get the emergency routing (reckless driving) radius in meters.

Returns
angle
Errorcode

◆ getFunctionType()

native GeofenceFunction getFunctionType ( )

Returns
Function type of fence. See GeofenceFunction

◆ getGeoFenceIterator()

static native Iterable< Geofence > getGeoFenceIterator ( )
static

Returns
iterator of all geo fences

◆ getName()

native String getName ( )

Returns
fence name

◆ getPosition()

native Position getPosition ( )

Returns
Get the position of the fence in internal coordinates. If data is in another projection (e.g. WGS) use the class Projection for a transformation

◆ getRadiusMeters()

native int getRadiusMeters ( )

Get the radius in meters.

Returns
radius in meters
Errorcode

◆ getWgs84Position()

native Position getWgs84Position ( )

Returns
Get the position of the fence in WGS84 internal coordinates.

◆ removeAll()

static native ApiError removeAll ( )
static

Remove all geo fences.

Returns
Errorcode

◆ removeAt()

static native ApiError removeAt ( int  index)
static

Remove the fence with the given index.

Parameters
index- position in favorite iterator.
Returns
Errorcode

◆ setAngle()

native ApiError setAngle ( int  angle)

Set the angle.

Parameters
angle
Returns
Errorcode

◆ setFunctionType()

native ApiError setFunctionType ( GeofenceFunction  type)

Sets the function type of this fence. What should happen, if the current position reaches this fence.

Parameters
computationSiteSee GeofenceFunction
Returns
Errorcode

◆ setName()

native ApiError setName ( String  name)

Parameters
name- name for the fence
Returns
Errorcode

◆ setPosition()

native ApiError setPosition ( Position  pos)

Set Fence position in internal coordinates

Attention
If data is in another projection (e.g. WGS) use the class Projection for a transformation
Parameters
posposition to set
Returns
Errorcode

◆ setRadiusMeters()

native ApiError setRadiusMeters ( int  radiusMeters)

Set the radius in meters.

Parameters
radiusMeters
Returns
Errorcode

◆ setWgs84Position()

native ApiError setWgs84Position ( Position  wgsPosition)

Set Waypoint position in WGS84 coordinates

Returns
Errorcode

The documentation for this class was generated from the following file: