-
Notifications
You must be signed in to change notification settings - Fork 3
Shortcode documentation
Fabian Wolf edited this page Feb 5, 2020
·
2 revisions
Regular shortcode: [ui_leaflet_map latitude="" longitude=""]
Shortcode with marker text: [ui_leaflet_map latitude="" longitude=""]<strong>A fancy title!</strong>Your marker text here.[/ui_leaflet_map]
All available shortcode attributes:
- latitude
- longitude
- position - a shorthand for the longitude and latitude parameter. basically the classic "latitude,longitude" position data. For quick copy + paste actions :)
- zoom - initial zoom level of the map. Most map tile services only support a maximum zoom level of 18 (eg. OSM). Defaults to 16.
- marker - if you want to set a marker, but at a different position. Format is identical to the position attribute
- layer - either a handle or a specific tile server URL. For the former, see "available handles" below - for the latter, see the Leaflet documentation.
- class - Defaults to 'ui-leaflet-marker'. Only change if you know what you're doing.
- marker_class - Defaults to 'ui-leaflet-marker'. Same here: Only change if you definitely KNOW what you're doing ;)
- id - The ID template for the leaflet map. Defaults to 'ui-leaflet-map-id-%s'. %s is being replaced by the current map count.
- marker_id - Marker ID template. Defaults to 'ui-leaflet-map-id-%s'. %s is replaced with a combination of the map count and marker count.
- height - Height of the map. Defaults to '300px'. Please do NOT forget about adding a unit. Just a plain number, eg. 300, DOES NOT work.
- use_search - set to 'true', 'yes' or '1' to enable the optional search field control in the frontend
- search_position - where to position the search field control; available options are: 'topleft', 'topright', 'bottomleft', 'bottomright'