/plugins/link_button
The module exports the link_button plugin method to mapp.plugins{}
Dictionary entries:
- link
- Source
Requires
Methods
(inner) addButton(link, localeKey)
The addButton method creates a link element and appends the element to the mapButton.
Name | Type | Description |
---|---|---|
link | Object | The link object. |
localeKey | string | The key of the current mapview locale. |
Name | Type | Attributes | Description |
---|---|---|---|
link.href | string | The link URL. | |
link.title | string | The link title, defaults to "Link". | |
link.target | string | The link target, defaults to "_blank". | |
link.css_class | string | Optional class for the symbol container. | |
link.css_style | string | The style for the symbol container. | |
link.icon_name | string | The name for Material Icons symbol. Read more: https://fonts.google.com/icons | |
link.locale | boolean | <optional> | Whether to append the locale to the href. |
- Source
(inner) link_button(link_button, mapview)
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.
Name | Type | Description |
---|---|---|
link_button | Object | The link_button config, can be an array of objects. |
mapview | mapview | The mapview object. |
- Source