createSiteMap

POST https://{{host}}/api/v1/sites/:site_id/maps

Create a MAP

Body Parameters

ParameterTypeDescription
namestringThe name of the map
typestringimage / google, default is image
ppmfloatwhen type=image, pixels per meter
widthintwhen type=image, width of the image map
heightintwhen type=image, height of the image map
urlstringwhen type=image, the url
thumbnail_urlstringwhen type=image, the url for the thumbnail image / preview
viewstringwhen type=google. roadmap / satellite / hybrid / terrain
origin_xintthe user-annotated x origin, pixels
origin_yintthe user-annotated y origin, pixels
orientationintorientation of the map, 0 means up is north, 90 means up is west. default is 0
latlng_tllatlngwhen type=google, latitude / longitude of the top-left corner
latlng_brlatlngwhen type=google, latitude / longitude of the bottom-right corner
wayfindingobjectproperties related to wayfinding
wayfinding_pathobjecta JSON blob for wayfinding (using Dijkstra's algorithm)
wall_pathobjecta JSON blob for wall definition (same format as wayfinding_path)
sitesurvey_pathlista list of JSON blob for site survey path (same format as wayfinding_path)
lockedbooleanwhether this map is considered locked down
flagslistname/val pair objects for location engine to use
useautoplacementbooleanwhether this map uses autoplacement values or ignores them. Default is false
useautoorientationbooleanwhether 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

KeyDatatypeRequiredDescription
Acceptstring
X-CSRFTokenstring
Content-Typestring