Share via


Maps Classmap Legends - Get

Get Classmap Legend
Generate values and color swatches mapping for a given classmap.

Args: trim_start (int, optional): Number of items to trim from the start of the cmap trim_end (int, optional): Number of items to trim from the end of the cmap

GET https://contoso-catalog.gwhqfdeddydpareu.uksouth.geocatalog.spatio.azure.com/data/legend/classmap/{classmapName}?api-version=2025-04-30-preview
GET https://contoso-catalog.gwhqfdeddydpareu.uksouth.geocatalog.spatio.azure.com/data/legend/classmap/{classmapName}?api-version=2025-04-30-preview&trim_start={trim_start}&trim_end={trim_end}

URI Parameters

Name In Required Type Description
classmapName
path True

string

maxLength: 500
pattern: .*

classmap name

api-version
query True

string

minLength: 1

The API version to use for this operation.

trim_end
query

integer (int32)

Number of items to trim from the end of the cmap

trim_start
query

integer (int32)

Number of items to trim from the start of the cmap

Responses

Name Type Description
200 OK

ClassmapLegendResponse

The request has succeeded.

204 No Content

There is no content to send for this request, but the headers may be useful.

Other Status Codes

Azure.Core.Foundations.ErrorResponse

An unexpected error response.

Headers

x-ms-error-code: string

Security

OAuth2Auth

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
https://geocatalog.spatio.azure.com/.default

Examples

MapsClassmapLegends_Get

Sample request

GET https://contoso-catalog.gwhqfdeddydpareu.uksouth.geocatalog.spatio.azure.com/data/legend/classmap/mtbs-severity?api-version=2025-04-30-preview

Sample response

{
  "0": [
    0,
    0,
    0,
    0
  ],
  "1": [
    0,
    100,
    0,
    255
  ],
  "2": [
    127,
    255,
    212,
    255
  ],
  "3": [
    255,
    255,
    0,
    255
  ],
  "4": [
    255,
    0,
    0,
    255
  ],
  "5": [
    127,
    255,
    0,
    255
  ],
  "6": [
    255,
    255,
    255,
    255
  ]
}

Definitions

Name Description
Azure.Core.Foundations.Error

The error object.

Azure.Core.Foundations.ErrorResponse

A response containing error details.

Azure.Core.Foundations.InnerError

An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors.

Azure.Core.Foundations.Error

The error object.

Name Type Description
code

string

One of a server-defined set of error codes.

details

Azure.Core.Foundations.Error[]

An array of details about specific errors that led to this reported error.

innererror

Azure.Core.Foundations.InnerError

An object containing more specific information than the current object about the error.

message

string

A human-readable representation of the error.

target

string

The target of the error.

Azure.Core.Foundations.ErrorResponse

A response containing error details.

Name Type Description
error

Azure.Core.Foundations.Error

The error object.

Azure.Core.Foundations.InnerError

An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors.

Name Type Description
code

string

One of a server-defined set of error codes.

innererror

Azure.Core.Foundations.InnerError

Inner error.