{"id":5799,"date":"2022-12-20T11:40:14","date_gmt":"2022-12-20T08:10:14","guid":{"rendered":"https:\/\/en.geobox.ir\/developers\/?post_type=docs&#038;p=5799"},"modified":"2023-01-21T15:45:19","modified_gmt":"2023-01-21T12:15:19","slug":"add-tileset","status":"publish","type":"docs","link":"https:\/\/en.geobox.ir\/developers\/docs\/add-sources\/add-tileset\/","title":{"rendered":"Add tileset"},"content":{"rendered":"<p>To add a tileset to the map, first copy the uuid of the tileset from the geobox portal and<a href=\"https:\/\/en.geobox.ir\/developers\/docs\/tileset\/working-with-tileset\/#3-toc-title\"> get the tileset from the server<\/a>:<\/p>\n<h3>getTileset(tileset_uuid)<\/h3>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const\u00a0tileset\u00a0=\u00a0await\u00a0Server.getTileset('4f9f3e4b-4dc1-469b-83ab-00ae00f02581');<\/pre>\n<p>Then add the tileset to the map as follows.<\/p>\n<div>\n<h3><span style=\"font-size: 14pt;\">addTileset(tileset)<\/span><\/h3>\n<\/div>\n<p><strong>Parameters:<\/strong><\/p>\n<p>tileset is the tileset 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 tileset 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.addTileset(tileset);<\/pre>\n<p class='codepen'  data-height='500' data-theme-id='1' data-slug-hash='PoBEyKZ' 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\/PoBEyKZ\">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 tileset to the map, first copy the uuid of the tileset from the geobox portal and get the tileset from the server: getTileset(tileset_uuid) Example: const\u00a0tileset\u00a0=\u00a0await\u00a0Server.getTileset(&#8216;4f9f3e4b-4dc1-469b-83ab-00ae00f02581&#8217;); Then add the tileset to the map as follows. addTileset(tileset) Parameters: tileset is the tileset that is got from the server. Returns: String: Returns a message that [&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-5799","docs","type-docs","status-publish","hentry","doc_category-add-sources"],"_links":{"self":[{"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/docs\/5799","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=5799"}],"version-history":[{"count":9,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/docs\/5799\/revisions"}],"predecessor-version":[{"id":6647,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/docs\/5799\/revisions\/6647"}],"wp:attachment":[{"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/media?parent=5799"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/doc_category?post=5799"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/doc_tag?post=5799"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}