Mapping Service: Miscellaneous

Get legend for a named map

Returns the complete legend of a named map by specifying the named map, the swatch size, and mime type of the legends. The legend is returned as single swatch rows, including a base 64 encoded image (or URL) and text description, that make up a complete legend. For each layer in the named map, zero, one, or more legend entries will be returned.

The named map should be specified in the URL path, and the request must include parameters for width, height, and imageType. Optional parameters include resolution, inlineSwatch, and ignoreLegendRowOverrideVisibility.

Resource dependencies: The named map's layers — and the named tables they reference — must already exist in the repository for the legend to be resolved and rendered.

Authorization: Requires EXECUTE permission on the named map.

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

Request

  • Base URL: https://api.cloud.precisely.com
  • URL: https://api.cloud.precisely.com/v1/spatial/maps/{mapName}/legend
  • 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

widthinteger required

Width of each legend swatch image in pixels.

heightinteger required

Height of each legend swatch image in pixels.

imageType'png' | 'jpeg' | 'gif' required

Format of the swatch images to return.

resolutioninteger

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

inlineSwatchboolean

When true (default), swatch images are returned as inline Base64-encoded strings. When false, a URL is returned instead.

ignoreLegendRowOverrideVisibilityboolean

When true, rows hidden via override visibility settings are still included. Defaults to false.

Response

Successfully retrieved legend for the named map

Changes

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