Venue Maps API Developer's Guide

Level

A floor or horizontal layer of outer areas within a venue.

Attributes

Attribute Type Description
outerAreas Array Array of OuterArea objects laying on the same floor.
tiles Array Array of x and y tile coordinates ([[x1, y1], ..., [xN, yN]]) at zoom level 20, which are used for drawing this Level

Example

{
  "outerAreas": [
    {
      "spaces": [
        ...
      ],
      "names": {
        "ENG": "Concourse Level"
      },
      "gml:id": "Lv25710Ds_1908939_d"
    }
  ],
  "tiles": [
    [563365,343890], [563366, 343890], ...
  ]
}

How to use Tiles Property

The tiles property on each level can serve to calculate Quadkeys of Tiles necessary to display the floor on zoom level 20.

An Example of the Tiles of the Ground Floor of Alexa Shopping Center, Berlin

{
  "levels":[
  {
    "tiles":[
      [563367,343892],[563363,343894],[563367,343893],[563363,343895],[563367,343890],
      [563363,343896],[563367,343891],[563363,343897],[563363,343890],[563367,343889],
      [563363,343891],[563363,343892],[563363,343893],[563359,343887],[563363,343898],
      [563359,343886],[563359,343888],[563363,343887],[563363,343886],[563363,343889],
      [563363,343888],[563367,343895],[563367,343894],[563368,343891],[563364,343897],
      [563368,343892],[563364,343898],[563368,343893],[563368,343894],[563364,343893],
      [563364,343894],[563364,343891],[563364,343892],[563360,343890],[563360,343889],
      [563360,343888],[563360,343887],[563360,343885],[563360,343886],[563364,343890],
      [563364,343889],[563364,343888],[563364,343887],[563364,343886],[563365,343886],
      [563361,343888],[563365,343887],[563361,343889],[563361,343890],[563361,343891],
      [563365,343890],[563361,343892],[563365,343891],[563365,343888],[563365,343889],
      [563369,343894],[563369,343893],[563365,343895],[563365,343894],[563365,343893],
      [563365,343892],[563361,343885],[563361,343887],[563361,343886],[563362,343891],
      [563362,343892],[563362,343889],[563366,343888],[563362,343890],[563366,343889],
      [563362,343895],[563366,343890],[563362,343896],[563366,343891],[563362,343893],
      [563366,343892],[563362,343894],[563358,343887],[563366,343894],[563366,343893],
      [563366,343895],[563362,343888],[563362,343887],[563362,343886],[563362,343885]
    ]
  }
}

In order to Calculate the Quadkeys of the Tiles necessary to display the ground floor on Zoom Level 20, We shall loop over each [xTile,yTile] pair and Execute tileXYToQuadKey Function as in the following examples

--- Input ---
var alexaModel = {"levels":[
  {
    "tiles":[
      [563367,343892],[563363,343894],[563367,343893],[563363,343895],[563367,343890],
      [563363,343896],[563367,343891],[563363,343897],[563363,343890],[563367,343889],
      [563363,343891],[563363,343892],[563363,343893],[563359,343887],[563363,343898],
      [563359,343886],[563359,343888],[563363,343887],[563363,343886],[563363,343889],
      [563363,343888],[563367,343895],[563367,343894],[563368,343891],[563364,343897],
      [563368,343892],[563364,343898],[563368,343893],[563368,343894],[563364,343893],
      [563364,343894],[563364,343891],[563364,343892],[563360,343890],[563360,343889],
      [563360,343888],[563360,343887],[563360,343885],[563360,343886],[563364,343890],
      [563364,343889],[563364,343888],[563364,343887],[563364,343886],[563365,343886],
      [563361,343888],[563365,343887],[563361,343889],[563361,343890],[563361,343891],
      [563365,343890],[563361,343892],[563365,343891],[563365,343888],[563365,343889],
      [563369,343894],[563369,343893],[563365,343895],[563365,343894],[563365,343893],
      [563365,343892],[563361,343885],[563361,343887],[563361,343886],[563362,343891],
      [563362,343892],[563362,343889],[563366,343888],[563362,343890],[563366,343889],
      [563362,343895],[563366,343890],[563362,343896],[563366,343891],[563362,343893],
      [563366,343892],[563362,343894],[563358,343887],[563366,343894],[563366,343893],
      [563366,343895],[563362,343888],[563362,343887],[563362,343886],[563362,343885]
    ]
  }
]}

--- JavaScript ---
alexaModel.levels[0].tiles.map(function (b) {
  return tileXYToQuadKey(b[0],b[1],20);
})

function tileXYToQuadKey(xTile, yTile, z) {
  var quadKey = "";
  for (var i = z; i > 0; i--) {
    var digit = "0",
      mask = 1 << (i - 1);
    if ((xTile & mask) != 0) {
      digit++;
    }
    if ((yTile & mask) != 0) {
      digit++; 
      digit++;
    }
    quadKey += digit;
  } //for i return quadKey; 
  
  return quadKey;
}

--- Output ---
[
  "12021023322212013331", "12021023322212013332", "12021023322212013333",
  "12021023322212031111", "12021023322212102202", "12021023322212102203",
  "12021023322212102212", "12021023322212102220", "12021023322212102221",
  "12021023322212102222", "12021023322212102223", "12021023322212102230",
  "12021023322212102231", "12021023322212102232", "12021023322212102233",
  "12021023322212102320", "12021023322212102321", "12021023322212102322",
  "12021023322212102323", "12021023322212120000", "12021023322212120001",
  "12021023322212120002", "12021023322212120003", "12021023322212120010",
  "12021023322212120011", "12021023322212120012", "12021023322212120013",
  "12021023322212120020", "12021023322212120021", "12021023322212120023",
  "12021023322212120030", "12021023322212120031", "12021023322212120032",
  "12021023322212120033", "12021023322212120100", "12021023322212120101",
  "12021023322212120102", "12021023322212120103", "12021023322212120110",
  "12021023322212120112", "12021023322212120113", "12021023322212120120",
  "12021023322212120121", "12021023322212120122", "12021023322212120123",
  ...
]

Each of the Quadkeys generated can be used to retrieve an Image Tile, an Interaction Tile or an Interaction Tile with Base64 Image