{"id":5793,"date":"2022-12-20T11:07:13","date_gmt":"2022-12-20T07:37:13","guid":{"rendered":"https:\/\/en.geobox.ir\/developers\/?post_type=docs&#038;p=5793"},"modified":"2023-01-21T11:12:35","modified_gmt":"2023-01-21T07:42:35","slug":"open-map","status":"publish","type":"docs","link":"https:\/\/en.geobox.ir\/developers\/docs\/add-sources\/open-map\/","title":{"rendered":"Open map"},"content":{"rendered":"<p>To open a map that has already been created in geobox studio, first copy the uuid of the map from the geobox portal and <a href=\"https:\/\/en.geobox.ir\/developers\/docs\/map-geobox-api-for-javascript\/map-2\/#4-toc-title\">get the map from the server<\/a>:<\/p>\n<h3>getMap(map_uuid)<\/h3>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const mapObject = await Server.getMap('4f9f3e4b-4dc1-469b-83ab-00ae00f02581');<\/pre>\n<p>Then open the map as follows.<\/p>\n<h3>openMap(mapObject)<\/h3>\n<p><strong>Parameters:<\/strong><\/p>\n<p>mapObject is the map that is got from the server.<\/p>\n<p id=\"zoomin-returns\" class=\"unprose txt-m mb3 anchor mt12\"><strong>Returns:<\/strong><\/p>\n<p class=\"unprose txt-m mb3 anchor mt12\">String: Returns a message that shows opening map was successful or not. Null message means opening was successful.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const result = await map.openMap(mapObject);<\/pre>\n<p class='codepen'  data-height='500' data-theme-id='1' data-slug-hash='vYaYMWe' data-default-tab='result' data-animations='run' data-editable='' data-embed-version='2'>\nSee the Pen <a href=\"https:\/\/codepen.io\/geobox-gl-demo\/pen\/vYaYMWe\">Contact Form \u2013 Pen a Day 20<\/a> by geobox (<a href=\"https:\/\/codepen.io\/geobox-gl-demo\">@geobox-gl-demo<\/a>) on <a href=\"http:\/\/codepen.io\">CodePen<\/a>.1<\/p>\n<script async src=\"https:\/\/cpwebassets.codepen.io\/assets\/embed\/ei.js\"><\/script>\n","protected":false},"excerpt":{"rendered":"<p>To open a map that has already been created in geobox studio, first copy the uuid of the map from the geobox portal and get the map from the server: getMap(map_uuid) Example: const mapObject = await Server.getMap(&#8216;4f9f3e4b-4dc1-469b-83ab-00ae00f02581&#8217;); Then open the map as follows. openMap(mapObject) Parameters: mapObject is the map that is got from the server. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[56],"doc_tag":[],"class_list":["post-5793","docs","type-docs","status-publish","hentry","doc_category-add-sources"],"_links":{"self":[{"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/docs\/5793","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/comments?post=5793"}],"version-history":[{"count":29,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/docs\/5793\/revisions"}],"predecessor-version":[{"id":6625,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/docs\/5793\/revisions\/6625"}],"wp:attachment":[{"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/media?parent=5793"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/doc_category?post=5793"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/doc_tag?post=5793"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}