{"id":5797,"date":"2022-12-20T11:34:57","date_gmt":"2022-12-20T08:04:57","guid":{"rendered":"https:\/\/en.geobox.ir\/developers\/?post_type=docs&#038;p=5797"},"modified":"2023-01-21T11:39:23","modified_gmt":"2023-01-21T08:09:23","slug":"add-mosaic-layer","status":"publish","type":"docs","link":"https:\/\/en.geobox.ir\/developers\/docs\/add-sources\/add-mosaic-layer\/","title":{"rendered":"Add mosaic layer"},"content":{"rendered":"<p>To add a mosaic layer to the map, first copy the uuid of the mosaic layer from the geobox portal and<a href=\"https:\/\/en.geobox.ir\/developers\/docs\/mosaic\/working-with-mosaic\/#3-toc-title\"> get the mosaic layer from the server<\/a>:<\/p>\n<h3>getMosaic(mosaic_uuid)<\/h3>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const\u00a0mosaicLayer\u00a0=\u00a0await\u00a0Server.getMosaic('4f9f3e4b-4dc1-469b-83ab-00ae00f02581');<\/pre>\n<p>Then add the mosaic layer to the map as follows.<\/p>\n<div>\n<h3>addMosaicLayer<span style=\"font-size: 1.125rem;\">(mosaicLayer)<\/span><\/h3>\n<\/div>\n<p><strong>Parameters:<\/strong><\/p>\n<p>mosaicLayer is the mosaic layer 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 adding layer was successful or not. Null message means adding was successful.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const result = await map.addMosaicLayer(mosaicLayer);<\/pre>\n<p class='codepen'  data-height='500' data-theme-id='1' data-slug-hash='WNKbZaQ' 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\/WNKbZaQ\">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 add a mosaic layer to the map, first copy the uuid of the mosaic layer from the geobox portal and get the mosaic layer from the server: getMosaic(mosaic_uuid) Example: const\u00a0mosaicLayer\u00a0=\u00a0await\u00a0Server.getMosaic(&#8216;4f9f3e4b-4dc1-469b-83ab-00ae00f02581&#8217;); Then add the mosaic layer to the map as follows. addMosaicLayer(mosaicLayer) Parameters: mosaicLayer is the mosaic layer that is got from the server. Returns: [&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-5797","docs","type-docs","status-publish","hentry","doc_category-add-sources"],"_links":{"self":[{"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/docs\/5797","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=5797"}],"version-history":[{"count":7,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/docs\/5797\/revisions"}],"predecessor-version":[{"id":6630,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/docs\/5797\/revisions\/6630"}],"wp:attachment":[{"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/media?parent=5797"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/doc_category?post=5797"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/doc_tag?post=5797"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}