{"id":6185,"date":"2023-01-03T10:36:47","date_gmt":"2023-01-03T07:06:47","guid":{"rendered":"https:\/\/en.geobox.ir\/developers\/?post_type=docs&#038;p=6185"},"modified":"2023-01-26T13:36:32","modified_gmt":"2023-01-26T10:06:32","slug":"working-with-vector","status":"publish","type":"docs","link":"https:\/\/en.geobox.ir\/developers\/docs\/vector\/working-with-vector\/","title":{"rendered":"Vector layer object"},"content":{"rendered":"<p>Tip: After you access the <a href=\"https:\/\/en.geobox.ir\/developers\/docs\/vector\/working-with-vectorlayer\/\">vector layer<\/a> object, the following methods and properties are applicable on the vector layer.<\/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 vector layer.<\/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 vectorLayerUuid = vectorLayer.uuid;<\/pre>\n<h3>name<\/h3>\n<p>Returns the name of the vector layer.<\/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 vector layer name.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const vectorLayerName = vectorLayer.name;<\/pre>\n<h3>display_name<\/h3>\n<p>Returns the display name of the vector layer.<\/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 vector layer display name.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const vectorLayerDisplayName = vectorLayer.display_name;<\/pre>\n<h3>description<\/h3>\n<p>Returns the description of the vector layer.<\/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 vector layer description.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const vectorLayerDescription = vectorLayer.description;<\/pre>\n<h3>created_at<\/h3>\n<p>Returns the time and date that the vector layer 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 vector layer created time.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const vectorLayerCreatedTime = vectorLayer.created_at;<\/pre>\n<h3>last_edit_at<\/h3>\n<p>Returns the time and date that the vector layer 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 vector layer updated time.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const vectorLayerModifiedTime = vectorLayer.last_edit_at;<\/pre>\n<h3>is_shared<\/h3>\n<p>Indicates whether the vector layer 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, vector layer is shared.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const isShared = vectorLayer.is_shared;<\/pre>\n<h3>is_view<\/h3>\n<p>Indicates whether the vector layer is vector layer view 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, vector layer is vector layer view.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const isView = vectorLayer.is_view;<\/pre>\n<h3>has_z<\/h3>\n<p>Indicates whether the vector layer geometry is 3D 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, vector layer geometry is 3D and has z value.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const hasZ = vectorLayer.has_z;<\/pre>\n<h3>id<\/h3>\n<p>Returns the vector layer 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 vector layer id.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const vectorLayerId = vectorLayer.id;<\/pre>\n<h3>owner_id<\/h3>\n<p>Returns the user ID that the vector layer 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 vector layer owner id.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const vectorLayerOwnerId = vectorLayer.owner_id;<\/pre>\n<h3>layer_type<\/h3>\n<p>Returns the type of geometry of the vector layer.<\/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 geometry type of vector layer.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const vectorLayerType = vectorLayer.layer_type;<\/pre>\n<h3>layer_settings<\/h3>\n<p>Returns the vector layer settings. This parameter has a value if include_settings is true at the time of <a href=\"https:\/\/en.geobox.ir\/developers\/docs\/vector\/working-with-vectorlayer\/#6-toc-title\">getting vector layer<\/a>.<\/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\">Object: Returns settings object.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const layerSettings = vectorLayer.layer_settings;<\/pre>\n<h3>extent<\/h3>\n<p>Returns the coordinates of the vector layer 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 vectorLayerExtent = vectorLayer.extent;<\/pre>\n<h3>feature_count<\/h3>\n<p>Returns the number of features in the vector layer.<\/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 count of features.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const featureCount = vectorLayer.feature_count;<\/pre>\n<h2>Methods:<\/h2>\n<h3>addField(options)<\/h3>\n<p>Adds new field to the vector layer.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>options (Object)<\/p>\n<table class=\"table table--fixed table--compact\" style=\"width: 82.5238%; height: 343px;\">\n<thead>\n<tr class=\"bg-gray-faint\" style=\"height: 26px;\">\n<th style=\"text-align: left; height: 26px; width: 22.8381%;\">Name<\/th>\n<th style=\"text-align: left; height: 26px; width: 103.215%;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.name<\/div>\n<div>String<\/div>\n<\/td>\n<td style=\"height: 26px; width: 103.215%; text-align: left;\">Name of new field.<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"height: 53px; width: 22.8381%; text-align: left;\">options.display_name<\/p>\n<div>String?<\/div>\n<\/td>\n<td style=\"height: 53px; width: 103.215%; text-align: left;\">Display name of new field.<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"height: 53px; width: 22.8381%; text-align: left;\">options.description<\/p>\n<div>String?<\/div>\n<\/td>\n<td style=\"height: 53px; width: 103.215%; text-align: left;\">Description of field.<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"height: 53px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.datatype<\/div>\n<div>String<\/div>\n<\/td>\n<td style=\"height: 53px; width: 103.215%; text-align: left;\">Choices are: &#8216;String&#8217; | &#8216;Integer&#8217; | &#8216;Long&#8217; | &#8216;Float&#8217; | &#8216;Date&#8217; | &#8216;Time&#8217; | &#8216;DateTime&#8217;<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"height: 53px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.width<\/div>\n<div>Number<\/div>\n<\/td>\n<td style=\"height: 53px; width: 103.215%; text-align: left;\">Field length<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\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\">Object: Returns field object.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const newField = await vectorLayer.addField({\r\n  'name': 'string',\r\n  'display_name': 'string',\r\n  'description': 'string',\r\n  'datatype': 'String',\r\n  'width': 10\r\n})<\/pre>\n<h3>updateField(field_id, options)<\/h3>\n<p>Updates the existing field of vector layer.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>field_id is the id of an available field.<\/p>\n<p>options (Object)<\/p>\n<table class=\"table table--fixed table--compact\" style=\"width: 82.5238%; height: 148px;\">\n<thead>\n<tr class=\"bg-gray-faint\" style=\"height: 26px;\">\n<th style=\"text-align: left; height: 26px; width: 22.8381%;\">Name<\/th>\n<th style=\"text-align: left; height: 26px; width: 103.215%;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.name<\/div>\n<div>String<\/div>\n<\/td>\n<td style=\"height: 26px; width: 103.215%; text-align: left;\">Name of field.<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"height: 53px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.display_name<code class=\"language-json\"><\/code><\/div>\n<div>String?<\/div>\n<\/td>\n<td style=\"height: 53px; width: 103.215%; text-align: left;\">Display name of field.<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"height: 43px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.description<code class=\"language-json\"><\/code><\/div>\n<div>String?<\/div>\n<\/td>\n<td style=\"height: 43px; width: 103.215%; text-align: left;\">Description of field.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\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\">Object: Returns field object.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const field = await vectorLayer.updateField(10,{\r\n  'name': 'string',\r\n  'display_name': 'string',\r\n  'description': 'string'\r\n})<\/pre>\n<h3>getFields()<\/h3>\n<p>Returns the vector layer fields.<\/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 fields.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const allFields = await vectorLayer.getFields();<\/pre>\n<h3>getFieldStats(field_id, options)<\/h3>\n<p>Returns the statistical parameters of the field, including the minimum value, the maximum value, and the average.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>field_id is the id of an available field.<\/p>\n<p>options (Object)<\/p>\n<table class=\"table table--fixed table--compact\" style=\"width: 82.5238%; height: 47px;\">\n<thead>\n<tr class=\"bg-gray-faint\" style=\"height: 26px;\">\n<th style=\"text-align: left; height: 26px; width: 22.8381%;\">Name<\/th>\n<th style=\"text-align: left; height: 26px; width: 103.215%;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 26px;\">\n<td style=\"height: 21px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.func_type<\/div>\n<div>String<\/div>\n<\/td>\n<td style=\"height: 21px; width: 103.215%; text-align: left;\">\u00a0choices are &#8216;min&#8217; | &#8216;max&#8217; | &#8216;avg&#8217;.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\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 field statistic value.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const fieldStat = await vectorLayer.getFieldStats(10,{func_type:'avg'});<\/pre>\n<h3>getFieldUniqueValues(field_id, options)<\/h3>\n<p>Returns the unique values of the field.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>field_id is the id of an available field.<\/p>\n<p>options (Object)<\/p>\n<table class=\"table table--fixed table--compact\" style=\"width: 82.5964%; height: 172px;\">\n<thead>\n<tr class=\"bg-gray-faint\" style=\"height: 26px;\">\n<th style=\"text-align: left; height: 48px; width: 22.8381%;\">Name<\/th>\n<th style=\"text-align: left; height: 48px; width: 102.491%;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 26px;\">\n<td style=\"height: 19px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.exclude_null<\/div>\n<div>Boolean<\/div>\n<div>defult: false<\/div>\n<\/td>\n<td style=\"height: 19px; width: 102.491%; text-align: left;\">If true, null values skipped.<\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.<span style=\"font-family: inherit; font-size: inherit;\">skip<\/span><\/div>\n<div>\n<div>Number?<\/div>\n<div>Default: 0<\/div>\n<\/div>\n<\/td>\n<td style=\"height: 26px; width: 102.491%; text-align: left;\">Number of skipped unique values.<\/td>\n<\/tr>\n<tr style=\"height: 79px;\">\n<td style=\"height: 79px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.<span style=\"font-family: inherit; font-size: inherit;\">limit<\/span><\/div>\n<div>\n<div>Number?<\/div>\n<div>Default:50<\/div>\n<\/div>\n<\/div>\n<\/td>\n<td style=\"height: 79px; width: 102.491%; text-align: left;\">Maximum number for result unique values..<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\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 unique values.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const fieldUniqueValues = await vectorLayer.getFieldUniqueValues(10);<\/pre>\n<h3>getFieldUniqueValuesCount(field_id, options)<\/h3>\n<p>Returns the number of unique values of the field.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>field_id is the id of an available field.<\/p>\n<p>options (Object)<\/p>\n<table class=\"table table--fixed table--compact\" style=\"width: 82.5964%; height: 69px;\">\n<thead>\n<tr class=\"bg-gray-faint\" style=\"height: 26px;\">\n<th style=\"text-align: left; height: 48px; width: 22.8381%;\">Name<\/th>\n<th style=\"text-align: left; height: 48px; width: 102.491%;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 26px;\">\n<td style=\"height: 21px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.exclude_null<\/div>\n<div>Boolean<\/div>\n<div>defult: false<\/div>\n<\/td>\n<td style=\"height: 21px; width: 102.491%; text-align: left;\">If true, null values skipped.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\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 count of unique values.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const fieldUniqueValuesCount = await vectorLayer.getFieldUniqueValuesCount(10);<\/pre>\n<h3>deleteField(field_id)<\/h3>\n<p>Deletes the existing field.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>field_id is the id of an available field.<\/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 deleting was successful or not. Null message means deleting was successful.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const result = await vectorLayer.deleteField(2);<\/pre>\n<h3>deleteFields(field_ids)<\/h3>\n<p>Deletes the existing fields.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>field_ids is an array of ids of available fields.<\/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 deleting was successful or not. Null message means deleting was successful.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const result = await vectorLayer.deleteFields([2,125]);<\/pre>\n<h3>getSettings()<\/h3>\n<p>Returns the vector layer settings.<\/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\">Object: Returns settings object.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const layerSettings = await vectorLayer.getSettings();<\/pre>\n<h3>updateSettings(options)<\/h3>\n<p>Updates the vector layer settings.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>options (Object)<\/p>\n<table class=\"table table--fixed table--compact\" style=\"width: 82.5238%; height: 343px;\">\n<thead>\n<tr class=\"bg-gray-faint\" style=\"height: 26px;\">\n<th style=\"text-align: left; height: 26px; width: 22.8381%;\">Name<\/th>\n<th style=\"text-align: left; height: 26px; width: 103.215%;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.general_settings<\/div>\n<div>String<\/div>\n<\/td>\n<td style=\"height: 26px; width: 103.215%; text-align: left;\">e.g. { &#8216;title_field&#8217;: &#8216;name&#8217;}<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"height: 53px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.edit_settings<code class=\"language-json\"><\/code><\/div>\n<div>String?<\/div>\n<\/td>\n<td style=\"height: 53px; width: 103.215%; text-align: left;\">e.g. { &#8216;editable&#8217;: true, &#8216;edit_geometry&#8217;: true, &#8216;editable_attributes&#8217;: &#8216;[ALL]&#8217;, &#8216;allow_insert&#8217;: true, &#8216;allow_delete&#8217;: true }<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"height: 53px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.tile_settings<code class=\"language-json\"><\/code><\/div>\n<div>String?<\/div>\n<\/td>\n<td style=\"height: 53px; width: 103.215%; text-align: left;\">e.g. { &#8216;min_zoom&#8217;: 0, &#8216;max_zoom&#8217;: 22, &#8216;max_features&#8217;: 65536, &#8216;filter_features&#8217;: true, &#8216;fields&#8217;: [ &#8216;id&#8217; ], &#8216;use_cache&#8217;: true, &#8216;cache_until_zoom&#8217;: 17 }<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\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\">Object: Returns settings object.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const layerSettings = await vectorLayer.updateSettings({\r\n   'general_settings': {\r\n      'title_field': 'name'\r\n   },\r\n   'edit_settings': {\r\n      'editable': true,\r\n      'edit_geometry': true,\r\n      'editable_attributes': '[ALL]',\r\n      'allow_insert': true,\r\n      'allow_delete': true\r\n   },\r\n   'tile_settings': {\r\n      'min_zoom': 0,\r\n      'max_zoom': 22,\r\n      'max_features': 65536,\r\n      'filter_features': true,\r\n      'fields': [\r\n         'id'\r\n      ],\r\n      'use_cache': true,\r\n      'cache_until_zoom': 17\r\n   }\r\n});<\/pre>\n<h3>getTilejson()<\/h3>\n<p>Returns vector layer tile information such as tile access address.<\/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\">Object: Returns an object that contains vector layer tiles information.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const layerTilejson = await vectorLayer.getTilejson();<\/pre>\n<h3>getFeature(feature_id)<\/h3>\n<p>Returns the GeoJSON of the desired feature of the vector layer.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>feature_id is the id of an available feature.<\/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\/\">Geojson<\/a>: Returns geojson of feature.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const feature = await vectorLayer.getFeature(1);<\/pre>\n<h3>getFeatures(option)<\/h3>\n<p>Returns the GeoJSON of the desired features of the vector layer.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>options (Object)<\/p>\n<table class=\"table table--fixed table--compact\" style=\"width: 82.5238%; height: 614px;\">\n<thead>\n<tr class=\"bg-gray-faint\" style=\"height: 26px;\">\n<th style=\"text-align: left; height: 38px; width: 22.8381%;\">Name<\/th>\n<th style=\"text-align: left; height: 38px; width: 103.215%;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.f<\/div>\n<div>String?<\/div>\n<div>Default: &#8216;json&#8217;<\/div>\n<\/td>\n<td style=\"height: 26px; width: 103.215%; text-align: left;\">Output format. Choices are: &#8216;json&#8217; | &#8216;topojson&#8217; | &#8216;html&#8217;<\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.quant_factor<\/div>\n<div>Number?<\/div>\n<div>Default: 1000000<\/div>\n<\/td>\n<td style=\"height: 26px; width: 103.215%; text-align: left;\">Quantization factor. This parameter is only used by topojson encoder and is ignored for other formats. Higher quantizaion value means higher geometry precision.<\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.skip<\/div>\n<div>Number?<\/div>\n<div>Default: 0<\/div>\n<\/td>\n<td style=\"height: 26px; width: 103.215%; text-align: left;\">Number of skipped features.<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"height: 53px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.limit<\/div>\n<div>Number?<\/div>\n<div>Default:100<\/div>\n<\/td>\n<td style=\"height: 53px; width: 103.215%; text-align: left;\">Maximum number for result features.<\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.search<\/div>\n<div>String<\/div>\n<\/td>\n<td style=\"height: 26px; width: 103.215%; text-align: left;\">search term for keyword-based searching among search_fields or all textual fields if search_fields does not have value.<br \/>\nNOTE: if q param is defined this param will be ignored.<\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.search_fields<\/div>\n<div>String?<\/div>\n<\/td>\n<td style=\"height: 26px; width: 103.215%; text-align: left;\">Comma separated list of fields for searching<\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.skip_geometry<\/div>\n<div>Boolean?<\/div>\n<div>Default: false<\/div>\n<\/td>\n<td style=\"height: 26px; width: 103.215%; text-align: left;\">If true, output result does not have geometry.<\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.return_count<\/div>\n<div>\n<div>Boolean?<\/div>\n<div>Default: false<\/div>\n<\/div>\n<\/td>\n<td style=\"height: 26px; width: 103.215%; text-align: left;\">if true, returns only the number of features that satisfy conditions.<\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.feature_ids<\/div>\n<div>String?<\/div>\n<\/td>\n<td style=\"height: 26px; width: 103.215%; text-align: left;\">Comma separated list of feature ids which should be filtered.<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"height: 53px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.select_fields<\/div>\n<div>String?<\/div>\n<div>Default: [ALL]<\/div>\n<\/td>\n<td style=\"height: 53px; width: 103.215%; text-align: left;\">\n<div class=\"renderedMarkdown\">\n<p>Comma separated field names which should be included to the result.<\/p>\n<\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.skip_fields<\/div>\n<div>String?<\/div>\n<\/td>\n<td style=\"height: 26px; width: 103.215%; text-align: left;\">Comma separated field names which should be excluded from the result.<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"height: 53px; width: 22.8381%; text-align: left;\">options.out_srid<\/p>\n<div>String?<\/div>\n<div>Default: 3857<\/div>\n<\/td>\n<td style=\"height: 53px; width: 103.215%; text-align: left;\">Srid (epsg code) of result features. e.g. 4326<\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.order_by<\/div>\n<div>String?<\/div>\n<\/td>\n<td style=\"height: 26px; width: 103.215%; text-align: left;\">Comma separated list of fields for sorting results [field1 A|D, field2 A|D, \u2026]. e.g. name A, length D<br \/>\nNOTE: &#8220;A&#8221; denotes ascending order and &#8220;D&#8221; denotes descending order.<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"height: 53px; width: 22.8381%; text-align: left;\">options.q<\/p>\n<div>String<\/div>\n<\/td>\n<td style=\"height: 53px; width: 103.215%; text-align: left;\">Query filter based on <a href=\"https:\/\/portal.ogc.org\/files\/96288\" rel=\"noopener noreferrer\">OGC CQL standard<\/a>.<br \/>\ne.g. Name LIKE &#8216;%GIS%&#8217; AND INTERSECTS(geometry, &#8216;SRID=3857;POLYGON((4901948 2885079, 7049893 2885079, 7049893 4833901, 4901948 4833901, 4901948 2885079))&#8217;)<\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.bbox<\/div>\n<div>Array?<\/div>\n<\/td>\n<td style=\"height: 26px; width: 103.215%; text-align: left;\">e.g. [50.275, 35.1195, 51.4459, 36.0416]<\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.bbox_srid<\/div>\n<div>Number?<\/div>\n<div>Default: 3857<\/div>\n<\/td>\n<td style=\"height: 26px; width: 103.215%; text-align: left;\">Srid (epsg code) of bbox. e.g. 4326.<\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.<span style=\"font-family: inherit; font-size: inherit;\">page<\/span><\/div>\n<div>Number?<\/div>\n<div>Default:1<\/div>\n<\/td>\n<td style=\"height: 26px; width: 103.215%; text-align: left;\">The minimum number of pages is 1.<\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.<span style=\"font-family: inherit; font-size: inherit;\">page_size<\/span><\/div>\n<div>\n<div>Number?<\/div>\n<div>Default:10<\/div>\n<\/div>\n<\/td>\n<td style=\"height: 26px; width: 103.215%; text-align: left;\">The minimum number of features on each page is 1.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\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\/\">Geojson<\/a>: Returns geojson of features.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const features = await vectorLayer.getFeatures({\r\n   f: \"json\",\r\n   q: `id=1`,\r\n   out_srid: 4326,\r\n   select_fields: [\"id\"]\r\n})<\/pre>\n<h3>createFeature(geojson)<\/h3>\n<p>Creates new feature.<\/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\/\">Geojson<\/a>: Returns created feature geojson.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const newFeature = await vectorLayer.createFeature({\r\n   'type': 'Feature',\r\n   'geometry': {\r\n      'type': 'Point',\r\n      'coordinates': [5610214, 4215675],\r\n   },\r\n   'properties': {'name':'tehran'}\r\n})<\/pre>\n<h3>deleteFeature(feature_id)<\/h3>\n<p>Deletes the desired feature from the vector layer.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>feature_id is the id of an available feature.<\/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 deleting was successful or not. Null message means deleting was successful.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const result = await vectorLayer.deleteFeature(10);<\/pre>\n<h3>deleteFeatures(feature_ids)<\/h3>\n<p>Deletes the desired features of the vector layer.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>feature_ids is a comma separated list of ids of features.<\/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 deleting was successful or not. Null message means deleting was successful.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const result = await vectorLayer.deleteFeatures([10,20]);<\/pre>\n<h3>updateFeature(feature_id, geojson)<\/h3>\n<p>Updates the desired feature of the vector layer.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>feature_id is the id of an available feature.<\/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\/\">Geojson<\/a>: Returns feature geojson.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const feature = await vectorLayer.updateFeature(10,{\r\n   'type': 'Feature',\r\n   'geometry': {\r\n      'type': 'Point',\r\n      'coordinates': [5610214, 4215675],\r\n   },\r\n   'properties' = {'name':'tehran'}\r\n})<\/pre>\n<h3>updateFeatureGeometry(feature_id, options)<\/h3>\n<p>Updates the desired feature geometry.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>feature_id is the id of an available feature.<\/p>\n<p>options (Object)<\/p>\n<table class=\"table table--fixed table--compact\" style=\"width: 82.5238%; height: 94px;\">\n<thead>\n<tr class=\"bg-gray-faint\" style=\"height: 26px;\">\n<th style=\"text-align: left; height: 26px; width: 22.8381%;\">Name<\/th>\n<th style=\"text-align: left; height: 26px; width: 103.215%;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.type<\/div>\n<div>String<\/div>\n<\/td>\n<td style=\"height: 26px; width: 103.215%; text-align: left;\">Type of geometry.<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"height: 42px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.coordinates<code class=\"language-json\"><\/code><\/div>\n<div>String?<\/div>\n<\/td>\n<td style=\"height: 42px; width: 103.215%; text-align: left;\">Array of coordinates.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\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\/\">Geojson<\/a>: Returns feature geojson.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const feature = await vectorLayer.updateFeatureGeometry(10,{\r\n   'type': 'Point',\r\n   'coordinates': [5610214, 4215675],\r\n})<\/pre>\n<h3>updateFeatureProps(feature_id, options)<\/h3>\n<p>Updates the desired feature attributes.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>feature_id is the id of an available feature.<\/p>\n<p>options (Object): Object of fields and values.<\/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\/\">Geojson<\/a>: Returns feature geojson.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const feature = await vectorLayer.updateFeatureProps(10,{\r\n   'name': 'tehran'\r\n})<\/pre>\n<h3>updateFeaturePropsAndGeometry(feature_id, properties_options, geometry_options)<\/h3>\n<p>Updates the desired feature geometry and attributes.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>feature_id is the id of an available feature.<\/p>\n<p>properties_options (Object): Object of fields and values.<\/p>\n<p>geometry_options (Object)<\/p>\n<table class=\"table table--fixed table--compact\" style=\"width: 82.5238%; height: 94px;\">\n<thead>\n<tr class=\"bg-gray-faint\" style=\"height: 26px;\">\n<th style=\"text-align: left; height: 26px; width: 22.8381%;\">Name<\/th>\n<th style=\"text-align: left; height: 26px; width: 103.215%;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.type<\/div>\n<div>String<\/div>\n<\/td>\n<td style=\"height: 26px; width: 103.215%; text-align: left;\">Type of geometry.<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"height: 42px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.coordinates<code class=\"language-json\"><\/code><\/div>\n<div>String<\/div>\n<\/td>\n<td style=\"height: 42px; width: 103.215%; text-align: left;\">Array of coordinates.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\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\/\">Geojson<\/a>: Returns feature geojson.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const feature = await vectorLayer.updateFeaturePropsAndGeometry(10,\r\n   {'name': 'tehran'},\r\n   {'type': 'Point', 'coordinates': [5610214, 4215675]}\r\n)<\/pre>\n<h3>seedCache(options)<\/h3>\n<p>Generates and stores tiles for the existing vector layer. See <a href=\"https:\/\/www.geobox.ir\/doc\/v1\/%d9%84%d8%a7%db%8c%d9%87%d9%87%d8%a7%db%8c-%d8%a8%d8%b1%d8%af%d8%a7%d8%b1%db%8c-vector-layers\/%d8%a7%db%8c%d8%ac%d8%a7%d8%af-%d9%88-%d9%85%d8%af%db%8c%d8%b1%db%8c%d8%aa-%d9%84%d8%a7%db%8c%d9%87%d9%87%d8%a7%db%8c-%d8%a8%d8%b1%d8%af%d8%a7%d8%b1%db%8c\/\">generating and managing vector layers<\/a> for more guidance.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>options (Object)<\/p>\n<table class=\"table table--fixed table--compact\" style=\"width: 82.5964%; height: 316px;\">\n<thead>\n<tr class=\"bg-gray-faint\" style=\"height: 26px;\">\n<th style=\"text-align: left; height: 26px; width: 22.8381%;\">Name<\/th>\n<th style=\"text-align: left; height: 26px; width: 102.491%;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.from_zoom<\/div>\n<div>Number<\/div>\n<\/td>\n<td style=\"height: 26px; width: 102.491%; text-align: left;\">from_zoom parameter is between 0 and 22.<\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.to_zoom<\/div>\n<div>Number<\/div>\n<\/td>\n<td style=\"height: 26px; width: 102.491%; text-align: left;\">to_zoom parameter is between 0 and 22.<\/td>\n<\/tr>\n<tr style=\"height: 79px;\">\n<td style=\"height: 79px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.ignore_cache<\/div>\n<div>Boolean<\/div>\n<div>default: true<\/div>\n<\/td>\n<td style=\"height: 79px; width: 102.491%; text-align: left;\">If true, ignore previous cache.<\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.workers<\/div>\n<div>Number<\/div>\n<\/td>\n<td style=\"height: 26px; width: 102.491%; text-align: left;\">Number of cpu cores.<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"height: 53px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.<span style=\"font-family: inherit; font-size: inherit;\">user_id<\/span><\/div>\n<div>Number?<\/div>\n<\/td>\n<td style=\"height: 53px; width: 102.491%; text-align: left;\">If the admin wants to builds cache for a vector layer of a certain user, this parameter determines which user is the target user.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p id=\"zoomin-returns\" class=\"unprose txt-m mb3 anchor mt12\"><strong>Returns:<\/strong><\/p>\n<p>Object: Returns task id to manage task.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const taskId = await vectorLayer.seedCache({\r\n   'from_zoom': 0,\r\n   'to_zoom': 2,\r\n   'ignore_cache': true,\r\n   'workers': 1,\r\n   'user_id': 2\r\n})<\/pre>\n<h3>getCacheSize()<\/h3>\n<p>Returns the size of tiles generated and stored for vector layer in bytes.<\/p>\n<p id=\"zoomin-returns\" class=\"unprose txt-m mb3 anchor mt12\"><strong>Returns:<\/strong><\/p>\n<p>Number: Returns tiles size in byte.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const tilesSize = await vectorLayer.getCacheSize();<\/pre>\n<h3>clearCache()<\/h3>\n<p>Removes generated tiles for the desired vector layer.<\/p>\n<p id=\"zoomin-returns\" class=\"unprose txt-m mb3 anchor mt12\"><strong>Returns:<\/strong><\/p>\n<p>String: Returns a message that shows clearing was successful or not. Null message means clearing was successful.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const result = await vectorLayer.clearCache();<\/pre>\n<h3>importFile(options)<\/h3>\n<p>Imports file data to the vector layer.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>options (<a href=\"https:\/\/geobox.ir\/\">FormData<\/a>)<\/p>\n<table class=\"table table--fixed table--compact\" style=\"width: 82.5961%; height: 580px;\">\n<thead>\n<tr class=\"bg-gray-faint\" style=\"height: 26px;\">\n<th style=\"text-align: left; width: 18.544%; height: 26px;\">Name<\/th>\n<th style=\"text-align: left; width: 68.7666%; height: 26px;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 53px;\">\n<td style=\"text-align: left; width: 18.544%; height: 53px;\">\n<div class=\"txt-mono txt-bold txt-break-word\">\n<div class=\"payload-name\">file_uuid<\/div>\n<\/div>\n<div>String<\/div>\n<\/td>\n<td style=\"text-align: left; width: 68.7666%; height: 53px;\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/Universally_unique_identifier\">Universally unique identifier (UUID)<\/a> of the file that is published in the geobox portal.<\/td>\n<\/tr>\n<tr style=\"height: 79px;\">\n<td style=\"text-align: left; width: 18.544%; height: 79px;\">\n<div class=\"txt-mono txt-bold txt-break-word\">file_encoding<\/div>\n<div class=\"txt-mono txt-bold txt-break-word\">String<\/div>\n<div>Deafult: &#8216;utf-8&#8217;<\/div>\n<\/td>\n<td style=\"text-align: left; width: 68.7666%; height: 79px;\">Encoding of the file. e.g.\u00a0&#8216;utf-8&#8217;<\/td>\n<\/tr>\n<tr style=\"height: 79px;\">\n<td style=\"text-align: left; width: 18.544%; height: 79px;\">\n<div class=\"txt-mono txt-bold txt-break-word\">input_srid<\/div>\n<div class=\"txt-mono txt-bold txt-break-word\">\n<div class=\"txt-mono txt-bold txt-break-word\">Number<\/div>\n<div>Deafult: 3857<\/div>\n<\/div>\n<\/td>\n<td style=\"text-align: left; width: 68.7666%; height: 79px;\">srid of the input layer<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"text-align: left; width: 18.544%; height: 53px;\">\n<div class=\"txt-mono txt-bold txt-break-word\">input_layer<\/div>\n<div class=\"txt-mono txt-bold txt-break-word\">String<\/div>\n<\/td>\n<td style=\"text-align: left; width: 68.7666%; height: 53px;\">Name of the layer that you want to import.<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"text-align: left; width: 18.544%; height: 53px;\">\n<div class=\"txt-mono txt-bold txt-break-word\">input_dataset<\/div>\n<div class=\"txt-mono txt-bold txt-break-word\">String<\/div>\n<\/td>\n<td style=\"text-align: left; width: 68.7666%; height: 53px;\">Name of the dataset that you want to import layer from.<\/td>\n<\/tr>\n<tr style=\"height: 79px;\">\n<td style=\"text-align: left; width: 18.544%; height: 79px;\">\n<div class=\"txt-mono txt-bold txt-break-word\">input_geom_type<\/div>\n<div class=\"txt-mono txt-bold txt-break-word\">\n<div class=\"txt-mono txt-bold txt-break-word\">String<\/div>\n<\/div>\n<\/td>\n<td style=\"text-align: left; width: 68.7666%; height: 79px;\">If there are multiple geometry type in the dataset, select the geometry type that you want to import. Choices are: &#8216;POINT&#8217;| &#8216;LINESTRING&#8217;| &#8216;POLYGON&#8217;| &#8216;MULTIPOINT&#8217;| &#8216;MULTILINESTRING&#8217;| &#8216;MULTIPOLYGON&#8217;| &#8216;POINTZ&#8217;| &#8216;LINESTRINGZ&#8217;| &#8216;POLYGONZ&#8217;| &#8216;MULTIPOINTZ&#8217;| &#8216;MULTILINESTRINGZ&#8217;| &#8216;MULTIPOLYGONZ&#8217;.<\/td>\n<\/tr>\n<tr style=\"height: 79px;\">\n<td style=\"text-align: left; width: 18.544%; height: 79px;\">\n<div class=\"txt-mono txt-bold txt-break-word\">report_errors<\/div>\n<div>Boolean<\/div>\n<div>Default: false<\/div>\n<\/td>\n<td style=\"text-align: left; width: 68.7666%; height: 79px;\">If true, errors will be reported.<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"height: 53px; width: 18.544%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\"><span style=\"font-family: inherit; font-size: inherit;\">user_id<\/span><\/div>\n<div>Number?<\/div>\n<\/td>\n<td style=\"height: 53px; width: 68.7666%; text-align: left;\">If the admin wants to imports file to a vector layer of a certain user, this parameter determines which user is the target user.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p id=\"zoomin-returns\" class=\"unprose txt-m mb3 anchor mt12\"><strong>Returns:<\/strong><\/p>\n<p>Object: Returns task id to manage task.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>First, create a FormData. Then add the values.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">let formData = new FormData();\r\nformData.append('file_uuid', '4f9f3e4b-4dc1-469b-83ab-00ae00f02581');\r\nformData.append('file_encoding', 'utf-8');\r\nformData.append('input_srid', 3857);\r\nformData.append('input_layer', 'province');\r\nformData.append('input_geom_type', 'POLYGON');<\/pre>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const result = await vectorLayer.importFile(formData);<\/pre>\n<h3>export(options)<\/h3>\n<p>Exports the vector layer to different formats.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>options (<a href=\"https:\/\/geobox.ir\/\">FormData<\/a>)<\/p>\n<table class=\"table table--fixed table--compact\" style=\"width: 82.5961%;\">\n<thead>\n<tr class=\"bg-gray-faint\">\n<th style=\"text-align: left; width: 18.544%;\">Name<\/th>\n<th style=\"text-align: left; width: 68.7666%;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left; width: 18.544%;\">\n<div class=\"txt-mono txt-bold txt-break-word\">\n<div class=\"payload-name\">out_format<\/div>\n<\/div>\n<div>String<\/div>\n<\/td>\n<td style=\"text-align: left; width: 68.7666%;\">Choices are: &#8216;Shapefile<span style=\"font-family: inherit; font-size: inherit;\">&#8216; | &#8216;GPKG&#8217; | &#8216;GeoJSON&#8217; | &#8216;CSV&#8217; | &#8216;KML&#8217; | &#8216;DXF&#8217;.<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left; width: 18.544%;\">\n<div class=\"txt-mono txt-bold txt-break-word\">out_srid<\/div>\n<div class=\"txt-mono txt-bold txt-break-word\">Number<\/div>\n<div>Deafult: 3857<\/div>\n<\/td>\n<td style=\"text-align: left; width: 68.7666%;\">srid of output layer.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left; width: 18.544%;\">\n<div class=\"txt-mono txt-bold txt-break-word\">q<\/div>\n<div class=\"txt-mono txt-bold txt-break-word\">String?<\/div>\n<\/td>\n<td style=\"text-align: left; width: 68.7666%;\">Query filter based on <a href=\"https:\/\/portal.ogc.org\/files\/96288\" rel=\"noopener noreferrer\">OGC CQL standard<\/a>.<br \/>\ne.g. &#8220;field1 LIKE &#8216;%GIS%&#8217; AND created_at &gt; &#8216;2021-01-01&#8242;&#8221;<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left; width: 18.544%;\">\n<div class=\"txt-mono txt-bold txt-break-word\">bbox<\/div>\n<div class=\"txt-mono txt-bold txt-break-word\">Array?<\/div>\n<\/td>\n<td style=\"text-align: left; width: 68.7666%;\">[southwest x, southwest y,\u00a0 northeast x, northeast y]<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left; width: 18.544%;\">\n<div class=\"txt-mono txt-bold txt-break-word\">bbox_srid<\/div>\n<div class=\"txt-mono txt-bold txt-break-word\">Number<\/div>\n<div>Deafult: 3857<\/div>\n<\/td>\n<td style=\"text-align: left; width: 68.7666%;\">srid of bounding box<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left; width: 18.544%;\">\n<div class=\"txt-mono txt-bold txt-break-word\">feature_ids<\/div>\n<div class=\"txt-mono txt-bold txt-break-word\">\n<div class=\"txt-mono txt-bold txt-break-word\">Array?<\/div>\n<\/div>\n<\/td>\n<td style=\"text-align: left; width: 68.7666%;\">Comma separated list of ids for searching<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left; width: 18.544%;\">\n<div class=\"txt-mono txt-bold txt-break-word\">fields<\/div>\n<div>Array?<\/div>\n<\/td>\n<td style=\"text-align: left; width: 68.7666%;\">Comma separated list of fields for searching<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left; width: 18.544%;\">\n<div class=\"txt-mono txt-bold txt-break-word\">zipped<\/div>\n<div>Boolean<\/div>\n<div>Default: false<\/div>\n<\/td>\n<td style=\"text-align: left; width: 68.7666%;\">If true, the output is compressed.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left; width: 18.544%;\">\n<div class=\"txt-mono txt-bold txt-break-word\">run_async<\/div>\n<div>\n<div>Boolean<\/div>\n<div>Default: true<\/div>\n<\/div>\n<\/td>\n<td style=\"text-align: left; width: 68.7666%;\">If true, the process will be doing as a task, otherwise object will be returned directly.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p id=\"zoomin-returns\" class=\"unprose txt-m mb3 anchor mt12\"><strong>Returns:<\/strong><\/p>\n<p>Object: Returns task id to manage task.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>First, create a FormData. Then add the values.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">let formData = new FormData();\r\nformData.append('out_format', 'Shapefile');\r\nformData.append('out_srid', 4326);\r\nformData.append('zipped', true);<\/pre>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const outputResult = await vectorLayer.export(formData);<\/pre>\n<p>After completing the desired task, use <a href=\"https:\/\/en.geobox.ir\/developers\/docs\/tasks\/tasks\/#0-toc-title\">getTask<\/a> to access the task information, which also includes the file download link.<\/p>\n<h3>calculateField(options)<\/h3>\n<p>Calculates new values for a field.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>options (<a href=\"https:\/\/geobox.ir\/\">FormData<\/a>)<\/p>\n<table class=\"table table--fixed table--compact\" style=\"width: 82.5961%; height: 554px;\">\n<thead>\n<tr class=\"bg-gray-faint\" style=\"height: 26px;\">\n<th style=\"text-align: left; width: 18.544%; height: 26px;\">Name<\/th>\n<th style=\"text-align: left; width: 68.7666%; height: 26px;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 53px;\">\n<td style=\"text-align: left; width: 18.544%; height: 53px;\">\n<div class=\"txt-mono txt-bold txt-break-word\">\n<div class=\"payload-name\">target_field<\/div>\n<\/div>\n<div>String<\/div>\n<\/td>\n<td style=\"text-align: left; width: 68.7666%; height: 53px;\">Name of target field<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"text-align: left; width: 18.544%; height: 53px;\">\n<div class=\"txt-mono txt-bold txt-break-word\">expression<\/div>\n<div class=\"txt-mono txt-bold txt-break-word\">String<\/div>\n<\/td>\n<td style=\"text-align: left; width: 68.7666%; height: 53px;\">Formula that calculates new values of the field.<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"text-align: left; width: 18.544%; height: 53px;\">\n<div class=\"txt-mono txt-bold txt-break-word\">q<\/div>\n<div class=\"txt-mono txt-bold txt-break-word\">String?<\/div>\n<\/td>\n<td style=\"text-align: left; width: 68.7666%; height: 53px;\">Query filter based on <a href=\"https:\/\/portal.ogc.org\/files\/96288\" rel=\"noopener noreferrer\">OGC CQL standard<\/a>.<br \/>\ne.g. &#8220;field1 LIKE &#8216;%GIS%&#8217; AND created_at &gt; &#8216;2021-01-01&#8242;&#8221;<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"text-align: left; width: 18.544%; height: 53px;\">\n<div class=\"txt-mono txt-bold txt-break-word\">bbox<\/div>\n<div class=\"txt-mono txt-bold txt-break-word\">Array?<\/div>\n<\/td>\n<td style=\"text-align: left; width: 68.7666%; height: 53px;\">[southwest x, southwest y,\u00a0 northeast x, northeast y]<\/td>\n<\/tr>\n<tr style=\"height: 79px;\">\n<td style=\"text-align: left; width: 18.544%; height: 79px;\">\n<div class=\"txt-mono txt-bold txt-break-word\">bbox_srid<\/div>\n<div class=\"txt-mono txt-bold txt-break-word\">Number<\/div>\n<div>Deafult: 3857<\/div>\n<\/td>\n<td style=\"text-align: left; width: 68.7666%; height: 79px;\">srid of bounding box<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"text-align: left; width: 18.544%; height: 53px;\">\n<div class=\"txt-mono txt-bold txt-break-word\">feature_ids<\/div>\n<div class=\"txt-mono txt-bold txt-break-word\">\n<div class=\"txt-mono txt-bold txt-break-word\">Array?<\/div>\n<\/div>\n<\/td>\n<td style=\"text-align: left; width: 68.7666%; height: 53px;\">Comma separated list of ids for filtering features<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left; width: 18.544%;\">\n<div class=\"txt-mono txt-bold txt-break-word\">run_async<\/div>\n<div>\n<div>Boolean<\/div>\n<div>Default: true<\/div>\n<\/div>\n<\/td>\n<td style=\"text-align: left; width: 68.7666%;\">If true, the process will be doing as a task, otherwise object will be returned directly.<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"height: 53px; width: 18.544%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\"><span style=\"font-family: inherit; font-size: inherit;\">user_id<\/span><\/div>\n<div>Number?<\/div>\n<\/td>\n<td style=\"height: 53px; width: 68.7666%; text-align: left;\">If the admin wants to calculates field for a vector layer of a certain user, this parameter determines which user is the target user.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p id=\"zoomin-returns\" class=\"unprose txt-m mb3 anchor mt12\"><strong>Returns:<\/strong><\/p>\n<p>Object: Returns task id to manage task.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>First, create a FormData. Then add the values.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">let formData = new FormData();\r\nformData.append('target_field', 'area');\r\nformData.append('expression', 'length');\r\nformData.append('run_async', true);<\/pre>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const outputResult = await vectorLayer.calculateField(formData);<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Tip: After you access the vector layer object, the following methods and properties are applicable on the vector layer. Properties: uuid Returns the universally unique identifier\u00a0(UUID) of the vector layer. Returns: uuid: Returns uuid string. Example: const vectorLayerUuid = vectorLayer.uuid; name Returns the name of the vector layer. Returns: String: Returns vector layer name. Example: [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[66],"doc_tag":[],"class_list":["post-6185","docs","type-docs","status-publish","hentry","doc_category-vector"],"_links":{"self":[{"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/docs\/6185","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=6185"}],"version-history":[{"count":67,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/docs\/6185\/revisions"}],"predecessor-version":[{"id":6666,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/docs\/6185\/revisions\/6666"}],"wp:attachment":[{"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/media?parent=6185"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/doc_category?post=6185"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/doc_tag?post=6185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}