Shortcode documentation

Fabian Wolf edited this page Sep 16, 2016 · 1 revision
Clone this wiki locally

Syntax

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]

Attributes

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.