createSiteMap
POST https://{{host}}/api/v1/sites/:site_id/maps
Create a MAP
Body Parameters
Parameter | Type | Description |
---|---|---|
name | string | The name of the map |
type | string | image / google, default is image |
ppm | float | when type=image, pixels per meter |
width | int | when type=image, width of the image map |
height | int | when type=image, height of the image map |
url | string | when type=image, the url |
thumbnail_url | string | when type=image, the url for the thumbnail image / preview |
view | string | when type=google. roadmap / satellite / hybrid / terrain |
origin_x | int | the user-annotated x origin, pixels |
origin_y | int | the user-annotated y origin, pixels |
orientation | int | orientation of the map, 0 means up is north, 90 means up is west. default is 0 |
latlng_tl | latlng | when type=google, latitude / longitude of the top-left corner |
latlng_br | latlng | when type=google, latitude / longitude of the bottom-right corner |
wayfinding | object | properties related to wayfinding |
wayfinding_path | object | a JSON blob for wayfinding (using Dijkstra's algorithm) |
wall_path | object | a JSON blob for wall definition (same format as wayfinding_path) |
sitesurvey_path | list | a list of JSON blob for site survey path (same format as wayfinding_path) |
locked | boolean | whether this map is considered locked down |
flags | list | name/val pair objects for location engine to use |
useautoplacement | boolean | whether this map uses autoplacement values or ignores them. Default is false |
useautoorientation | boolean | whether this map uses autooreintation values or ignores them. Default is false |
Request Body
{"name"=>"Mist Office", "type"=>"image", "ppm"=>40.94, "width"=>1250, "height"=>1500, "origin_x"=>35, "origin_y"=>60, "orientation"=>30, "locked"=>false, "wayfinding_path"=>{"coordinate"=>"actual", "nodes"=>[{"name"=>"N1", "position"=>{"x"=>746, "y"=>104}, "edges"=>{"N2"=>"1"}}, {"name"=>"N2", "position"=>{"x"=>740, "y"=>318}, "edges"=>{"N1"=>"1"}}]}, "wall_path"=>{"coordinate"=>"actual", "nodes"=>[{"name"=>"N1", "position"=>{"x"=>746, "y"=>104}, "edges"=>{"N2"=>"1"}}, {"name"=>"N2", "position"=>{"x"=>740, "y"=>318}, "edges"=>{"N1"=>"1"}}]}, "sitesurvey_path"=>[{"coordinate"=>"actual", "nodes"=>[{"name"=>"W0", "position"=>{"x"=>372, "y"=>192}, "edges"=>{"W1"=>1}}, {"name"=>"W1", "position"=>{"x"=>485, "y"=>205}, "edges"=>{"W2"=>1}}, {"name"=>"W2", "position"=>{"x"=>400, "y"=>295}, "edges"=>{"W0"=>1}}], "name"=>"Default", "id"=>"cbdb7f0b-3be0-4872-88f9-58790b509c23-j68kows8"}], "flags"=>{"assetHoldTime"=>5, "storeTime"=>10}, "use_auto_placement"=>true, "use_auto_orientation"=>true, "url"=>"https://url/to/image.png", "thumbnail_url"=>"https://url/to/image.png"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string | ||
X-CSRFToken | string | ||
Content-Type | string |