Work with maps
The accesso Guest Experience platform's Maps APIs allow you to consume platform content about venue maps.
Venues and maps
Venues each have a collection of maps, each of which can have multiple versions. Only one version of one map can be active at a time, but the Guest Experience platform allows for multiple maps to be defined in order to facilitate changing maps from time to time. Using our Maps API, clients can retrieve metadata about the available maps, retrieve the active version of a map by its ID, and retrieve any version of any map given the map and version ID.
Authenticating
accesso’s APIs rely on access tokens for authenticating. Tokens require an API key and are obtained through a call to the Tokens API. Please contact your assigned Client Engagement Manager for an API key.
Retrieving map metadata
In order to identify the available maps for a venue, you will need the venue ID. The venue ID is a logical identifier for a venue such as a theme park. The venue IDs configured in the platform are available through our venue list API. To identify available venues, execute the following API call:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
curl -X GET \
https://api.{region}.te2.io/api/v1/public/venues \
-H 'Authorization: Bearer {token}'
[
{
"venueName": "Venue 1",
"id": "CUST_VENUE1"
},
{
"venueName": "Venue 2",
"id": "CUST_VENUE2"
}
]
The response contains an array of JSON objects, each with the following attributes:
- venueName: A string containing the name of the venue
- id: The logical identifier for the venue within the platform
Using the venue ID, you can then obtain the map metadata for a specific venue:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
curl -X GET \
https://api.{region}.te2.io/api/v1/public/venues/{venueId}/maps \
-H 'Authorization: Bearer {token}'
[
{
"mapId": "0",
"order": 0,
"title": "Venue 1 Map",
"versions": [
{
"version": 1,
"description": "Temp map to bootstrap the venue",
"published": "2019-03-22T14:22:25.594+0000",
"active": false
},
{
"version": 2,
"description": "Base map to build real map of the venue",
"published": "2019-03-22T14:22:24.823+0000",
"active": false
},
{
"version": 3,
"description": "Custom Map",
"published": "2019-03-22T14:22:23.459+0000",
"active": true
}
],
"default": true
}
]
The response consists of an array of JSON objects, each with the following attributes:
- mapId: the logical identifier for the map within the platform
- order: an integer ordering across multiple maps
- title: the name, or title, of the map
- versions: an array of JSON objects, each with the following attributes:
- version: an integer indicating the version number of the map
- description: a text description of the map version
- published: the date and time at which the map was published
- active: a boolean value (
true
orfalse
) indicating whether this version of the map is currently active
- default: a boolean value (
true
orfalse
) indicating whether this map is the default map for the venue
Retrieving a map
You can retrieve a map by using its ID, with or without its version number. Use the following API call:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
curl -X GET \
https://api.{region}.te2.io/api/v1/public/venues/{venueId}/maps/{mapId} \
-H 'Authorization: Bearer {token}'
{
"entrance": {
"position": {
"x": 0.46438835189837846,
"y": 0.5311605504575709
},
"location": {
"lat": 37.83808943587798,
"lon": -77.44391441345215
},
"mapId": "0",
"derivedByOverride": false
},
"localLinearTransformStrategy": {
"label": "LocalLinearTransformPositionStrategy",
"params": {
"positionMarkers": [
{
"label": "Flight of fear",
"id": "hwQXu4",
"latLon": {
"lat": 37.83917398089429,
"lon": -77.4387538433075
},
"position": {
"x": 0.75125,
"y": 0.48829787234042554
}
},
{
"label": "Dino Alive",
"id": "3VvJRI",
"latLon": {
"lat": 37.8354881574524,
"lon": -77.4440860748291
},
"position": {
"x": 0.46067415730337075,
"y": 0.8351661486971074
}
}
]
}
},
"image": {
"height": 1880,
"width": 2550,
"resolution": "XHDPI",
"src": "https://d3gy0bjks2buyz.cloudfront.net/CUST_VENUE1/maps/Customer-VenueMap-v4.jpg"
},
"mapGrid": [ [ 99, ...], [ 99, ...], ... ],
"order": 0,
"stepsPerMin": 16
}
The response is a JSON object, including the following attributes:
- entrance: a JSON object containing the following attributes:
- position: a JSON object indicating the position in terms of Cartesian coordinates of the venue entrance on the map, with the following attributes:
- x: the X coordinate of the entrance. Values range from 0 to 1. 0 is at the left of the map
- y: the Y coordinate of the entrance. Values range from 0 to 1. 0 is at the top of the map
- location: a JSON object indicating the location in terms of latitude and longitude of the venue entrance, with the following attributes:
- lat: the latitude of the entrance
- lon: the longitude of the entrance
- mapId: the map ID associated with the venue entrance
- derivedByOverride: a boolean value (
true
orfalse
) indicating whether the position of the entrance on the map was configured as an override
- position: a JSON object indicating the position in terms of Cartesian coordinates of the venue entrance on the map, with the following attributes:
- localLinearTransformStrategy: a JSON object defining the way that points on the map have been transformed from geographical locations to map coordinates. This data is only relevant for clients who are implementing such transformations locally. We recommend using our API for transformations unless you would generate a large volume of API traffic, or require offline functionality.
- image: a JSON object describing the image associated with this map. Attributes include:
- height: the height of the image in pixels
- width: the width of the image in pixels
- resolution: the pixel density of the image. Valid values include
MDPI
,HDPI
,XHDPI
- src: a URL at which the image can be obtained
- mapGrid: a two-dimensional array containing information about the terrain included in the map’s area. The number of elements per row, as well as the number of rows, depend on the size of the area covered by the map. Each element in the array represents the cost of navigating the terrain at the location on the map defined by the indexes into the arrays. Example values for elements include:
- 99: Unknown terrain
- 0: Impassable terrain
- 1 - 13: Lower numbers indicate more easily passable terrain
- order: an integer indicating the order of this map relative to other maps
- stepsPerMin: the number of steps per minute used in walking path calculations
Transformation between location and position
Our platform provides the ability for a map image to be configured with a non-uniform scale that affects how positions on the map correlate to geographical locations (represented by latitude/longitude pairs). We also provide API support for translating between locations and positions. You can translate a location into a position on the map using the following API:
1
2
3
4
5
6
7
8
9
10
11
curl -X GET \
https://api.{region}.te2.io/api/v1/public/venues/{venueId}/maps/{mapId}/@{latitude},{longitude} \
-H 'Authorization: Bearer {token}'
{
"position": {
"x": 0.34605370227109233,
"y": 0.2944832694802244
},
"inVenue": true
}
This API returns a JSON object containing the following fields:
- position: a JSON object describing the position of the provided location. It includes the following attributes:
- x: a decimal value indicating the position of the given location along the horizontal axis of the map. Values range from 0 - 1, and 0 is on the left.
- y: a decimal value indicating the position of the given location along the vertical axis of the map. Values range from 0 - 1, and 0 is at the top
- inVenue: A boolean (
true
orfalse
) value indicating whether the given location is inside the venue
Maps and points of interest
Points of interest (POI) are naturally related to the venue maps. You can retrieve information about POI using another API call:
1
2
3
4
5
6
7
8
9
10
11
12
curl -X GET \
'https://api.{region}.te2.io/api/v2/pois?venueId={id}&mapId={mapId}' \
-H 'Authorization: Bearer {token}'
# This attribute is added to each POI object in the response
"mapPosition": {
"position": {
"x": 0.5974999999998545,
"y": 0.5111449676824122
},
"mapId": "2"
}
In the above example, the map
query string parameter is optional. If included, the API response will include the position of each POI on the map in the mapPosition
attribute, with all transformations already applied.
For more information about POI and Venue APIs, refer to the Setup venues and POI guide.