{"id":6530,"date":"2023-01-16T22:38:51","date_gmt":"2023-01-16T19:08:51","guid":{"rendered":"https:\/\/en.geobox.ir\/developers\/?post_type=docs&#038;p=6530"},"modified":"2023-01-21T12:18:52","modified_gmt":"2023-01-21T08:48:52","slug":"working-with-raster-layer","status":"publish","type":"docs","link":"https:\/\/en.geobox.ir\/developers\/docs\/working-with-layers\/working-with-raster-layer\/","title":{"rendered":"Working with raster layer"},"content":{"rendered":"<h3>hideLayer()<\/h3>\n<p>Turns the layer off.<\/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 turning layer off was successful or not. Null message means turning off was successful.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" dir=\"ltr\" style=\"min-height: 40px;\" data-enlighter-language=\"generic\">const allRasterLayers = map.getRasterLayers();\r\nconst intendedLayer = allRasterLayers[\"&lt;intended layer name&gt;\"];\r\nintendedLayer.hideLayer(); \r\n\r\n<\/pre>\n<h3>showLayer()<\/h3>\n<p>Turns the layer on.<\/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 turning layer on was successful or not. Null message means turning on was successful.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" dir=\"ltr\" style=\"min-height: 40px;\" data-enlighter-language=\"generic\">const allRasterLayers = map.getRasterLayers();\r\nconst intendedLayer = allRasterLayers[\"&lt;intended layer name&gt;\"];\r\nintendedLayer.showLayer(); \r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>hideLayer() Turns the layer off. Returns: String: Returns a message that shows turning layer off was successful or not. Null message means turning off was successful. Example: const allRasterLayers = map.getRasterLayers(); const intendedLayer = allRasterLayers[&#8220;&lt;intended layer name&gt;&#8221;]; intendedLayer.hideLayer(); showLayer() Turns the layer on. Returns: String: Returns a message that shows turning layer on was successful [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[58],"doc_tag":[],"class_list":["post-6530","docs","type-docs","status-publish","hentry","doc_category-working-with-layers"],"_links":{"self":[{"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/docs\/6530","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=6530"}],"version-history":[{"count":2,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/docs\/6530\/revisions"}],"predecessor-version":[{"id":6636,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/docs\/6530\/revisions\/6636"}],"wp:attachment":[{"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/media?parent=6530"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/doc_category?post=6530"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/doc_tag?post=6530"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}