Mapping Service: Miscellaneous

Get swatch image from a legend

Returns a specific swatch image from a named map's legend. The swatch is identified by the map name, legend index, and row index. The image is returned in the specified format (png, jpeg, jpg, gif, bmp, or tiff).

If the swatch is not already cached, the legend will be rendered first to generate the swatch images.

Authorization: Requires EXECUTE permission on the named map (checked when the legend is rendered to produce the swatch).

get/v1/spatial/maps/{mapName}/swatch

Request

  • Base URL: https://api.cloud.precisely.com
  • URL: https://api.cloud.precisely.com/v1/spatial/maps/{mapName}/swatch
  • Auth: API key in header Authorization and HTTP bearer

Path parameters

mapNamestring required

Name of the named map (may contain forward slashes for hierarchical names). Example: Samples/NamedMaps/WorldMap

Query parameters

legendIndexinteger required

Index of the legend (zero-based)

rowIndexinteger required

Index of the row within the legend (zero-based)

widthinteger required

Width of the swatch image in pixels

heightinteger required

Height of the swatch image in pixels

format'png' | 'jpeg' | 'jpg' | 'gif' | 'bmp' | 'tiff' required

Format of the swatch image (png, jpeg, jpg, gif, bmp, or tiff).

dpiinteger

Image resolution in DPI. Defaults to server default when omitted.

Response

Swatch image retrieved successfully

Changes

No recorded changes to this operation across all 1 revision of this API.