symbol


URI

<map_uri>/symbol[.<format>]

Supported methods

GET, HEAD

Parent resource

ERROR: Variable (map_link) is undefined.

Introduction

The symbol resource represents the symbols used in a map. The symbols can be marker symbols, line symbols, or fill symbols. The corresponding symbol images can be retrieved through implementing the GET request with parameters included in the URI. Among the parameters, the ID of the symbol in style is the only unique field.

Supported methods

Supported output formats: PNG, BMP, GIF, JPG, RJSON, JSON, HTML, XML.

GIS Services Resource Hierarchy

root maps map symbol

HTTP request methods

Implement the HTTP request on the following URI and return the response in BMP format. In the URI, supermapiserver is the name of the server and WorldMap is the map name (mapName).

http://supermapiserver:8090/iserver/services/map-world/rest/maps/WorldMap/symbol.bmp

GET Request

Gets the image of a symbol.

Request parameters

The following parameters need to be included in the URI when implementing a GET request on a symbol resource:

Field Type Definition
resourceType ResourceType [Required]
The type of the symbol: marker symbol, line symbol, fill symbol, etc.
style Style [Required]
The style of the symbol.
redirect boolean Whether to redirect. Whether to redirect. If true, the request would be redirected to the real address of the image; if false, the byte stream of the image would be in the response body. The default is true.
picWidth int The width of the target symbol image. The default width is 64 pixels.
picHeight int The height of the target symbol image. The default height is 64 pixels.
_cache boolean Whether to use cache, the default is True. False means close all the caches.

Response structure

If the map symbol is directly retrieved, the output format can be PNG, BMP, GIF, or JPG. A non-transparent image will be returned.

If the information about the map symbol is retrieved, the output format can be RJSON, JSON, HTML, or XML. The structure of the returned representation will be as follows:

Field Type Definition
resourceImageUrl String Information about the URI directed to the symbol image which can only be in PNG format.
resourceParameter ResourceParameter Information about the symbol image, such as the width, height, and style of the source image.

 

Example usage

Implementing a GET request on the following symbol resource with http://supermapiserver:8090/iserver/services/map-world/rest/maps/WorldMap/symbol.png?resourceType=SYMBOLLINE&style="fillBackOpaque":true,"lineWidth":0.1,"fillBackColor":"red":255,"blue":255,"green":255,"fillForeColor":"red":208,"blue":240,"green":255,"markerAngle":0,"markerSize":50,"fillGradientOffsetRatioX":0,"fillGradientOffsetRatioY":0,"lineColor":"red":0,"blue":0,"green":128,"fillOpaqueRate":100,"fillGradientMode":"NONE","fillSymbolID":76,"fillGradientAngle":0,"markerSymbolID":10,"lineSymbolID":34 would return a line symbol as displayed below:

HEAD request

Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content. The meta-information includes the media-type, content-encoding, transfer-encoding, content-length, etc.

The HEAD request helps check the existence of thesymbolresource and whether it can be accessed by the client. By implementing the HEAD request on the URI, with .<format> appended to the end, we can quickly get to know whether thesymbolresource supports the representation in <format> or not.

See