Mapping Service: Miscellaneous

Render legend for a map

Returns the complete legend for a map by providing the full map definition in the request body. The legend is returned as single swatch rows, including a base64 encoded image (or URL) and text description, that make up a complete legend. For each layer in the map, zero, one, or more legend entries will be returned.

The request body must contain the map definition including layers, name and version are optional parameters. Legend swatch configuration is provided via query parameters.

Resource dependencies: If the map definition references named layers or named tables by name (instead of providing them inline), those referenced resources must already exist in the repository to be resolved. Note: unlike the named-map legend and image endpoints, this endpoint does not currently enforce per-resource EXECUTE permission checks on referenced named layers/tables.

post/v1/spatial/maps/legend

Request

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

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.

Request body

versionstring

Version of the map description

namestring

Name of the named map/layer

Response

Successfully rendered legend for the map

Changes

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