ui/locations/entries/key

The key entry module exports a default [location] entry method to process infoj type:key entries.

Dictionary entries:

  • layer_visibility

Requires

Methods

(inner) key(entry) → {HTMLElement}

mapp.ui.locations.entries.key(entry)

The entry method returns a button HTML element which will toggle the location.layer display.

The button classList reflects whether the layer is displayed or not.

{
  "type":"key",
  "hideLayer": true
}
Parameters:
NameTypeDescription
entryobject
Properties
NameTypeAttributesDescription
entry.location.layerlocation

The Mapp location object.

location.layerlayer

The Mapp location layer object.

entry.hideLayerboolean<optional>

Optional flag to hide the layer on load.

Returns:

The button key element, with an onclick event to toggle the visibility of the layer.

Type: 
HTMLElement