Generating Images
A Plans Static API image URL must be of the following form:
https://api.locatrix.com/plans-static/v1/image?parameters
Certain URL parameters are required while some are optional. As is standard in URLs, all parameters are separated using the ampersand (&
) character. The list of parameters and their possible values are enumerated below.
Parameter | Required | Description |
---|---|---|
partner |
yes | The partner that should be used to access the floor. For example, partner=cadr0g675rbk0fv03fm5fewz7 .As floors can be shared between multiple partners, a partner is required to choose which icon/theme/network libraries should be used. |
floor |
Either floor , campus , or plan |
The floor code to generate a floorplan image for. For example, floor=flr_95kpvk552x7ue5xvb4f290a4q . This can not be used at the same time as the campus or plan parameters. |
campus |
Either floor , campus , or plan |
The campus code to generate a siteplan image for. For example, campus=camp_v03fm5fewz75xvb4f290a4q . This can not be used at the same time as the floor or plan parameters. |
plan |
Either floor , campus , or plan |
The plan code to generate a floorplan/siteplan image for, depending on whether it is associated with a floor or campus. For example, plan=pln_gqfz7uu59qze049ro3uxyk8t6 . This can not be used at the same time as the floor or campus parameters. |
format |
yes | The image format to use, must be either png or jpg . For example, format=png . |
w |
yes | The width of the generated image, in pixels. For example, w=1024 . |
h |
yes | The height of the generated image, in pixels. For example, h=1024 . |
expiry |
yes | A Unix timestamp (in seconds, e.g expiry=1587454800 ) that indicates when the URL should expire. Requests made after this time will fail with an error.If your intent is to create a non-expiring URL, you should use a time far into the future, such as 2145916800 which is the beginning of 2038. |
apikey |
yes | Your API key, for example apikey=df5ea000-5df7-4de7-a5ea-0e707b0b42b2 . Our servers use the secret associated with this key to validate the provided SAS token. |
sas |
yes | A SAS token generated based on the values of specific parameters, according to the defined algorithm/sample code. If you are trying to build something quickly and want to worry about SAS generation later, we provide an online generator for developers. |
icons |
no | A comma-separated list of icon types that should be shown in the generated image (if any of those icons are present on the plan). For example, icons=mcp,hyd,extinguisher_dcp .Icons not included in the list will be hidden. If not specified, defaults to showing all icons in the plan. |
layers |
no | A comma-separated list of layers and layer groups that should be enabled in the generated image. For example, layers=structure,interiorZone,leaderLineIcon . A list of available layers and layer groups can be found at Layers and Layer Groups .Layers not included in the list will be hidden. If not specified, defaults to showing all layers normally visible on evacuation signs. |
rotation |
no | How the generated image should be rotated. rotation=default will use the default rotation of the plan, while rotation=northUp will result in an image where true north is pointing upwards. If not specified, defaults to rotation=default . |