Skip to main content

Overview

The Map API is the main entry point to interact with the map and its entities.

Sending and listening to API Messages

The Map API is using the messaging system.

The Map will both send and listen to messages, and so should do your app.

Entities

Features

At the core of the Map, there is an extent of the GeoJSON features from the GeoJSON format specification named AR Features.
This means any data you may already have in GeoJSON format can be easily displayed on the map too.

The difference between GeoJSON features and AR Features is that AR Features have a reserved property named _ar

Here is an example of a GeoJSON Feature:

{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [0, 0]
},
"properties": {
"name": "My Feature",
"description": "This is a GeoJSON Feature",
"color": "#ff0000"
}
}

And here is its a possible equivalent as an AR Feature:

{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [0, 0]
},
"properties": {
"name": "My Feature",
"description": "This is a GeoJSON Feature",
"color": "#ff0000",
"_ar": {
"id": "8fb5f0bb-bc88-4880-9a64-e0831391f2c1---CJM---3",
"type": "POI",
"entityType": "ACTIVITY",
"displayType": "icon",
"displayOptions": {
"img": "bullet_ball_grey.png",
"width": 24,
"height": 24
},
"selectedDisplayOptions": {
"img": "bullet_ball_grey.png"
},
"currentEntityDisplayOptions": {
"img": "bullet_ball_blue.png"
},
"tooltip": {
"title": "ACTIVITY #1",
"body": "DELIVERY<br />OPERATION_03"
},
"capacities": ["SELECT", "DRAG_AND_DROP", "ROLLOVER"]
}
}
}

You won't have to set most of the specific properties of AR Features as they are automatically set by the Map.

To prevent tedious transformation process, the Map API generate AR Features from simpler data types. You can even get rid of the intermediate format, and just work with Axioroute API logical entities.

Webview Entities

Webview Entities are intermediate data type between Axioroute API logical entities and AR Features.

Any Axioroute API logical entity can be converted to a Webview Entity. Then Webview entities can be converted to AR Features.

In addition to basic geometry they also hold meta data that can be used to:

  • display them on the map.
  • interact with them.
  • link them to Axioroute API logical entities.
Note

Even if you can convert any Axioroute API logical entity to a Webview Entity, you can also create Webview Entities from scratch.

POIs

POIs are by default displayed as a simple icon on the map and can be used to represent any kind of point of interest.

Itineraries

Itineraries are collection of Line Strings that can be used to represent routes.
They are more a Route segment than the route itself.

Texts

Texts are the simplest entities, they are just a text displayed on the map.

Capacities

Both AR Features and Webview Entities can have Capacities.
Capacities are a set of actions that can be performed on the entity.

Currently there are 3 Capacities:

  • SELECT: to make th entity selectable
  • DRAG_AND_DROP: to make the entity draggable
  • ROLLOVER: to make the map fire a Message on mouse over (can also display a default tooltip)