Skip to main content
Skip table of contents

Plans on the map

Plans map

Returns all plans within the specified coordinates. If there are too many plans in the map area, then server clustering will occur.

Permission for this request - map-index

In the request, when plans are grouped, there is a key field, which can be sent in the request VMS Client/Maps/Plans/List of plans in the cluster_key field to get a paginated list of cameras within this cluster

GET /api/v1/map/maps/

Parameters

numeric bottom_left_latitude, Latitude coordinate of the bottom left point


numeric bottom_left_longitude, Longitude coordinate of the bottom left point


numeric top_right_latitude, Latitude coordinate of the top right point


numeric top_right_longitude, Longitude coordinate of the top right point


int zoom, Current zoom level on the map

200 OK

Successful response with clustering

JSON
{
    "grouped": true,
    "items": [
        {
            "latitude": 52.797159556908035,
            "longitude": -28.424838677853487,
            "count": 3086,
            "key": "u9h"
        },
        {
            "latitude": 42.797159556908035,
            "longitude": -28.424838677853487,
            "count": 7600,
            "key": "u9k"
        },
        {
            "latitude": 32.797159556908035,
            "longitude": -28.424838677853487,
            "count": 3629,
            "key": "u8k"
        }
    ]
}

200 OK

Successfull resposne without clustering

CODE
{
  "grouped": false,
  "items": [
    {
      "id": 1,
      "name": "Plan 1",
      "url": "https://vms.local:8000/storage/maps/2024/4/9/36MibYuVSAQjSe7qPj0si2mWbLsq6LclaKJqLi0o.jpg",
      "latitude": 32.797159,
      "longitude": -28.424838
    }
  ]
}

401 Unauthorized

Authorization token not sent or not valid

cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/v1/map/maps/' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "bottom_left_latitude": "numeric",
    "bottom_left_longitude": "numeric",
    "top_right_latitude": "numeric",
    "top_right_longitude": "numeric",
    "zoom": 0
}'
PHP
PHP
$data = array (
  'bottom_left_latitude' => 'numeric',
  'bottom_left_longitude' => 'numeric',
  'top_right_latitude' => 'numeric',
  'top_right_longitude' => 'numeric',
  'zoom' => 0,
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'GET',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/v1/map/maps/', false, $context);
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.