POI format
A geo-fencing criterion is defined by a list of points of interest (POI). Each POI is constituted of a circular or polygonal shape. Mobile Engagement enables you to describe your criterion in a specific XML format before passing it to the Reach API.
Element Format:
<geofencing [radius=RAD]> POI_LIST </geofencing>
Element or Attribute | Type | Description |
|---|---|---|
radius | double | Default radius for circular and postal POI |
POI_LIST | List of POIs | POIs of the geo-fencing criterion. |
Element Format:
<poi name="POI_NAME" expiration="EXP"> SHAPE </poi>
Element or Attribute | Type | Description |
|---|---|---|
name | string | Name of the POI. |
expiration | integer | Number of minutes before device location is considered to be expired. |
Shape | object | Shape of the POI. Must be a circle or a polygon. |
Element Format:
<circle lon="LON" lat="LAT" [rad="RADIUS"] />
Element or Attribute | Type | Description |
|---|---|---|
lon | double | Longitude of the circle’s center. Must be [-180;180]. |
lat | double | Latitude of the circle’s center. Must be [-90;90]. |
rad | double | Radius of the circle, in meters. If no radius is defined here, the default radius of the criterion will be used. If any default radius is defined, the circle will have a 100 meters radius. |
Element Format:
<polygon> POINT_LIST </polygon>
Element or Attribute | Type | Description |
|---|---|---|
POINT_LIST | List of Points | Points of the polygon, at least three points. |
Element Format:
<point lon="LON" lat="LAT" />
Element or Attribute | Type | Description |
|---|---|---|
lon | double | Longitude of the point. |
lat | double | Latitude of the point. |
Element Format:
<address [radius=RAD]> ADDR </address>
Element or Attribute | Type | Description |
|---|---|---|
radius | double | Radius of the postal POI. |
ADDR | string | Postal address which will be converted into a location. |
<geofencing>
<poi name="poi1" expiration="5">
<circle lat="48.111362631555" lon="-1.6747678348877" rad="367" />
</poi>
</geofencing>
<geofencing>
<poi name="poi1" expiration="5">
<polygon>
<point lon="-1" lat="48" />
<point lon="-1" lat="49" />
<point lon="-2" lat="49" />
<point lon="-2" lat="48" />
</polygon>
</poi>
</geofencing>
<geofencing radius="200">
<poi name="poi1" expiration="5">
<address radius="150">Eiffel tower, Paris, France</address>
</poi>
<poi name="poi2" expiration="10">
<address>Arc de triomphe, Paris, France</address>
</poi>
</geofencing>
<geofencing>
<poi name="poi 1" expiration="5">
<polygon>
<point lon="-1" lat="48" />
<point lon="-1" lat="49" />
<point lon="-2" lat="49" />
<point lon="-2" lat="48" />
</polygon>
</poi>
<poi name="poi 2" expiration="5">
<circle lat="48.111362631555" lon="-1.6747678348877" rad="367" />
</poi>
<poi name="poi 3" expiration="15">
<address>Liberty Island, New York City</address>
</poi>
</geofencing>