Class: LegendUrl

LegendUrl(url, mimeType)

new LegendUrl(url, mimeType)

A simple object that represents a legend for a map layer.

Parameters:
Name Type Description
url

The URL of the legend

mimeType

The mime type of the legend - this will be used by the UI to determine how the legend should be shown (usually an img tag or a link)

Source:

Methods

isImage() → {boolean}

Determines whether this url links to an image by inspecting the mime type, or if none is specified, the file extension.

Source:
Returns:
Type
boolean

isValid()

Simple check for whether the url is valid - currently valid is simply defined and length > 0.

Source: