{"id":6228,"date":"2023-01-04T13:05:19","date_gmt":"2023-01-04T09:35:19","guid":{"rendered":"https:\/\/en.geobox.ir\/developers\/?post_type=docs&#038;p=6228"},"modified":"2023-01-26T13:35:50","modified_gmt":"2023-01-26T10:05:50","slug":"working-with-tileset-2","status":"publish","type":"docs","link":"https:\/\/en.geobox.ir\/developers\/docs\/tileset\/working-with-tileset-2\/","title":{"rendered":"Working with tileset"},"content":{"rendered":"<p>Tip: After you access the <a href=\"https:\/\/en.geobox.ir\/developers\/docs\/tileset\/working-with-tileset\/#3-toc-title\">tileset<\/a> object, the following methods and properties are applicable on the tileset.<\/p>\n<h2>Properties:<\/h2>\n<h3>uuid<\/h3>\n<p>Returns the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Universally_unique_identifier\">universally unique identifier\u00a0(UUID)<\/a> of the tileset.<\/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\"><a href=\"https:\/\/www.geobox.ir\/\">uuid<\/a>: Returns uuid string.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const tilesetUuid = tileset.uuid;<\/pre>\n<h3>name<\/h3>\n<p>Returns the name of the tileset.<\/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 tileset name.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const tilesetName = tileset.name;<\/pre>\n<h3>display_name<\/h3>\n<p>Returns the display name of the tileset.<\/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 display name of tileset.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const tilesetDisplayName = tileset.display_name;<\/pre>\n<h3>description<\/h3>\n<p>Returns the description of the tileset.<\/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 tileset description.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const tilesetDescription = tileset.description;<\/pre>\n<h3>created_at<\/h3>\n<p>Returns the time and date that the tileset was created.<\/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\">Date: Returns tileset created time.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const tilesetCreatedTime = tileset.created_at;<\/pre>\n<h3>last_modified_at<\/h3>\n<p>Returns the time and date that the tileset attribute is updated.<\/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\">Date: Returns tileset updated time.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const tilesetModifiedTime = tileset.last_modified_at;<\/pre>\n<h3>last_updated_at<\/h3>\n<p>Returns the time and date that the tileset content is updated.<\/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\">Date: Returns tileset updated time.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const tilesetUpdatedTime = tileset.last_updated_at;<\/pre>\n<h3>is_shared<\/h3>\n<p>Indicates whether the tileset is shared or not.<\/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\">Boolean: If true, tileset is shared.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const isShared = tileset.is_shared;<\/pre>\n<h3>id<\/h3>\n<p>Returns the tileset id.<\/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\">Number: Returns tileset id.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const tilesetId = tileset.id;<\/pre>\n<h3>owner_id<\/h3>\n<p>Returns the user ID that the tileset belongs to.<\/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\">Number: Returns tileset owner id.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const tilesetOwnerId = tileset.owner_id;<\/pre>\n<h3>state<\/h3>\n<p>Shows the status of the tileset construction.<\/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 tileset state.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const tilesetState = tileset.state;<\/pre>\n<h3>min_zoom<\/h3>\n<p>Returns the smallest zoom at which the tileset is displayed.<\/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\">Number: Returns tileset minimum zoom number.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const minZoom = tileset.min_zoom;<\/pre>\n<h3>max_zoom<\/h3>\n<p>Returns the largest zoom at which the tileset is displayed.<\/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\">Number: Returns tileset maximum zoom number.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const maxZoom = tileset.max_zoom;<\/pre>\n<h3>extent<\/h3>\n<p>Returns the coordinates of the tileset extent in the Web Mercator coordinate system.<\/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\">Array: Returns an array contains [southwest x, southwest y,\u00a0 northeast x, northeast y].<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const tilesetExtent = tileset.extent;<\/pre>\n<h2>Methods:<\/h2>\n<h3>getLayers()<\/h3>\n<p>Returns the layers that compose the tileset.<\/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\">Array: Returns an array of layers that forming the tileset.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const tilesetLayers = tileset.getLayers();<\/pre>\n<h3>addLayer(layer_type, layer_uuid)<\/h3>\n<p>Adds vector layer or vector layer view to the tileset.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>layer_type is &#8216;vector&#8217; or &#8216;view&#8217;.<\/p>\n<p>layer_uuid is the available vector or view layer uuid.<\/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 = tileset.addLayer('vector','4f9f3e4b-4dc1-469b-83ab-00ae00f02581');<\/pre>\n<h3>removeLayer(layer_type, layer_uuid)<\/h3>\n<p>Removes vector layer or vector layer view from the tileset.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>layer_type is &#8216;vector&#8217; or &#8216;view&#8217;.<\/p>\n<p>layer_uuid is the available vector or view layer uuid.<\/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 removing layer was successful or not. Null message means removing was successful.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const result = tileset.removeLayer('vector','4f9f3e4b-4dc1-469b-83ab-00ae00f02581');<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Tip: After you access the tileset object, the following methods and properties are applicable on the tileset. Properties: uuid Returns the universally unique identifier\u00a0(UUID) of the tileset. Returns: uuid: Returns uuid string. Example: const tilesetUuid = tileset.uuid; name Returns the name of the tileset. Returns: String: Returns tileset name. Example: const tilesetName = tileset.name; display_name [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[70],"doc_tag":[],"class_list":["post-6228","docs","type-docs","status-publish","hentry","doc_category-tileset"],"_links":{"self":[{"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/docs\/6228","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=6228"}],"version-history":[{"count":10,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/docs\/6228\/revisions"}],"predecessor-version":[{"id":6664,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/docs\/6228\/revisions\/6664"}],"wp:attachment":[{"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/media?parent=6228"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/doc_category?post=6228"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/doc_tag?post=6228"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}