GetBoundaries
Gets the boundaries and formatting of all areas within the specified Layer. Can only be used for organisation Layers and NOT subscribed Layers.
URL: /data/areas/v1/getBoundaries
Method: POST
Method Parameters
Name | Type | Required | Description |
apiKey | string | Yes | The API key for your organisation. |
model | object | Yes |
The object detailing the specified values. See Model Object Properties. |
Model Object Properties
Name | Type | Required | Description |
mapLayerKey | string | Yes | The API key of the Layer the boundaries are required for. |
Response
The following responses may be returned in addition to the standard ones specified under Common Information.
Code | Error Message | Description |
400 | Boundaries cannot be provided for this MapLayer. | The Layer was not of Area type, or is not an aggregated Area Layer. |
Example Call
URL: https://api.vision-mapping.com/data/areas/v1/getBoundaries?apiKey=INSERT_YOUR_KEY_HERE
Body:
{
mapLayerKey: "abc"
}
Example Response
[
{
name: "abc",
uniqueKey: "abc",
labelX: 0.1,
labelY: 0.1,
formatting: {
colour: "abc",
key: "abc",
name: "abc",
opacity: 0.1
},
dataFields: [
{
key: "abc",
value: "abc"
},
{
key: "abc",
value: 123
}
],
boundaryAsJson: [
[
[
{
x: 0.1,
y: 0.1
},
{
x: 0.1,
y: 0.1
}
]
]
]
}
]