URI

<vectorMap_uri>/v2/styles[.<format>]

Supported Methods

GET, HEAD

Parent Resource

vectorMap

Child Resources

style

Introduction

List of all styles configured in the Vectortiles Service V2. When accessed in HTML format, provides iClient for Leaflet to browse each style.

Supported methods:

  • GET: Gets the list of all styles in the current service.
  • HEAD: Checks whether the styles resource exists, or whether the permission allows accessing the styles resource.

Supported representation formats: RJSON, JSON, XML, HTML, JSONP.

HTTP Request Methods

Execute an HTTP request on the following URI. Take the json output format as an example, where supermapiserver is the server name.

http://supermapiserver:8090/iserver/services/vectorMap-DLTB-public/restjsr/v2/styles.json

GET Request

Execute a GET request to the styles resource. The structure of the returned resource representation is as follows:

Field Type Description
charset string Character encoding of the style file, for example, UTF-8.
datasetMappers string Layer-to-dataset mapping information. Returns null.
styleId string When a style template is configured in the service, this value returns the style template ID; otherwise, it is null.
filePath string The file path of the style file. Returns null for security purposes.
name string The style name of the service. This is the name displayed in the service style list. Duplicates are allowed.
id string The style ID of the service, serving as the unique identifier for styles within the service. When making a getMap request, use this value for the styleID parameter.

 

Response Example

Execute a GET request on the styles resource: http://supermapiserver:8090/iserver/services/vectorMap-DLTB-public/restjsr/v2/styles.json, the returned result is as follows:

  {
    "charset": "UTF-8",
    "datasetMappers": null,
    "styleId": "7c1fdc1f9a2648b4824cfaea970712ab",
    "filePath": null,
    "name": "CountriesLabel6",
    "id": "CountriesLabel6_1"
  }

HEAD Request

Returns the same HTTP response headers as a GET request, but without the response entity. It allows obtaining metadata info contained in the response message headers without having to transmit the entire response content. Metadata info includes media type, character encoding, compression encoding, entity content length, etc.

The HEAD request can be used to determine whether the styles resource exists, or whether the client has permission to access the styles resource. By executing a HEAD request on the URI with .<format>, it can also quickly determine whether the styles resource supports the representation in the <format> format.

See Also