LegendUrl

LegendUrl

new LegendUrl(url, mimeType)

Source:

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)

Methods

isImage() → {boolean}

Source:

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

Returns:
Type
boolean

isValid()

Source:

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