{"id":5946,"date":"2022-12-26T11:53:25","date_gmt":"2022-12-26T08:23:25","guid":{"rendered":"https:\/\/en.geobox.ir\/developers\/?post_type=docs&#038;p=5946"},"modified":"2023-01-21T11:10:01","modified_gmt":"2023-01-21T07:40:01","slug":"map-interaction-handlers","status":"publish","type":"docs","link":"https:\/\/en.geobox.ir\/developers\/docs\/map\/map-interaction-handlers\/","title":{"rendered":"Map interaction handlers"},"content":{"rendered":"<div>\n<h3><span style=\"font-size: 14pt;\">zoomToDefaultExtent()<\/span><\/h3>\n<\/div>\n<p>If a map is opened, zooms to the map extent saved in geobox studio, if a layer is opened, zooms to the layer extent.<\/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 zooming was successful or not. Null message means zooming was successful.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const result = await map.zoomToDefaultExtent();<\/pre>\n<h3>resetBearingAndPitch()<\/h3>\n<p>Reset map bearing and pitch angle.<\/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 resetting was successful or not. Null message means resetting was successful.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const result = await map.resetBearingAndPitch();<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>zoomToDefaultExtent() If a map is opened, zooms to the map extent saved in geobox studio, if a layer is opened, zooms to the layer extent. Returns: String: Returns a message that shows zooming was successful or not. Null message means zooming was successful. Example: const result = await map.zoomToDefaultExtent(); resetBearingAndPitch() Reset map bearing and pitch [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[60],"doc_tag":[],"class_list":["post-5946","docs","type-docs","status-publish","hentry","doc_category-map"],"_links":{"self":[{"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/docs\/5946","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=5946"}],"version-history":[{"count":6,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/docs\/5946\/revisions"}],"predecessor-version":[{"id":6624,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/docs\/5946\/revisions\/6624"}],"wp:attachment":[{"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/media?parent=5946"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/doc_category?post=5946"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/doc_tag?post=5946"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}