The module exports the link_button plugin method to mapp.plugins{}

Dictionary entries:

  • link

Requires

Methods

(inner) addButton(link, localeKey)

The addButton method creates a link element and appends the element to the mapButton.

Parameters:
NameTypeDescription
linkObject

The link object.

localeKeystring

The key of the current mapview locale.

Properties
NameTypeAttributesDescription
link.hrefstring

The link URL.

link.titlestring

The link title, defaults to "Link".

link.targetstring

The link target, defaults to "_blank".

link.css_classstring

Optional class for the symbol container.

link.css_stylestring

The style for the symbol container.

link.icon_namestring

The name for Material Icons symbol. Read more: https://fonts.google.com/icons

link.localeboolean<optional>

Whether to append the locale to the href.

The link_button locale property is provided as the link_button function argument. This can be either a single object or an array of objects. icon_name is the name of the symbol in Material Icons resources.

"link_button": [
  {
    "href": "/url/url",
    "title": "TITLE HERE",
    "css_style": "color: blue;",
    "icon_name": "grid_view"
  },
  {
    "href": "/foo",
    "title": "Foo",
    "locale": true
  }
]

The link_button method will call the addButton method for each link_button object.

Parameters:
NameTypeDescription
link_buttonObject

The link_button config, can be an array of objects.

mapviewmapview

The mapview object.