Shortcode API reference

Category:

References

Topic:

APIs

The default workflow for creating maps is to customize a map on backend, assign markers to that map and add the related shortcode to your content, example:

[mapsmarker map="1"].

Most map settings can be overwritten by shortcode parameters for further customisation, example:

[mapsmarker map="1" width="100" widthunit="%" tooltip="false"]

For further reference please see the related settings arrays which can be found in /classes/settings.php

Please be aware that marker map shortcodes like [mapsmarker marker="1"] have been depreciated with v4.0 and the parameters below are for overriding regular map shortcodes only!

Settings for tab “Map”

Shortcode parameter name Type Allowed values Since version
width absint * 4.0
widthUnit string %, px 4.0
height absint * 4.0
heightUnit string px 4.0
lat float * 4.0
lng float * 4.0
zoom absfloat 0 – 23 4.0
minZoom absfloat 0 – 23 4.0
maxZoom absfloat 0 – 23 4.0
zoomStep absfloat 0.1 – 1 4.0
maxBounds string *,* (eg. 14.23432,41.23423) 4.0
panel bool true, false 4.0
panelColor string eg. #ccc 4.0
panelFs bool true, false 4.0
panelGeoJson bool true, false 4.0
panelKml bool true, false 4.0
panelGeoRss bool true, false 4.0
tabbed bool true, false 4.0

Settings for tab “Layers”

Shortcode parameter name Type Allowed values Since version
basemapDetectRetina bool true, false 4.0
basemapEdgeBufferTiles absint * 4.0
basemapGoogleStyles string * 4.0
basemapDefault string Please be aware that you can only use values for basemaps here which are defined as available layers for new maps – in the following example only osm and stamenWatercolors would be alllowed values:

If the set value is not defined as default for new maps, the default basemap is taken, with fallback to osm.

List of all possible values:

osm, osmBw, OsmDe, osmFrance, osmHot, stamenTerrain, stamenTerrainBackground, stamenTerrainLines, stamenToner, stamenTonerBackground, stamenTonerHybrid, stamenTonerLines, stamenTonerLite, stamenWatercolor, basemapAt, basemapAtSatellite, googleRoadmap, googleSatellite, googleHybrid, googleTerrain, bingRoad, bingAerial, bingAerialLabels, bingCanvasDark, bingCanvasLight, bingCanvasGray, hereNormalDay, hereNormalNight, hereTerrain, hereSatellite, hereHybrid

If you are using a custom basemap, you have to give the ID of that basemap as value!

4.0

Settings for tab “Controls”

Shortcode parameter name Type Allowed values Since version
attributionPosition string topleft, topright, bottomleft, bottomright 4.0
attributionCondensed bool true, false 4.0
zoomControlPosition string hidden, topleft, topright, bottomleft, bottomright 4.0
fullscreenPosition string hidden, topleft, topright, bottomleft, bottomright 4.0
resetPosition string hidden, topleft, topright, bottomleft, bottomright 4.0
resetOnDemand bool true, false 4.0
locatePosition string hidden, topleft, topright, bottomleft, bottomright 4.0
locateDrawCircle bool true, false 4.0
locateDrawMarker bool true, false 4.0
locateSetView string false, once, always, untilPan, untilPanOrZoom 4.0
locateKeepCurrentZoomLevel bool true, false 4.0
locateClickBehaviorInView string stop, setView 4.0
locateClickBehaviorOutOfView string stop, setView 4.0
locateIcon string icon-cross-hairs, icon-pin, icon-arrow 4.0
locateMetric bool true, false 4.0
locateShowPopup bool true, false 4.0
locateAutostart bool true, false 4.0
scalePosition string hidden, topleft, topright, bottomleft, bottomright 4.0
scaleMaxWidth absint * 4.0
scaleMetric bool true, false 4.0
scaleImperial bool true, false 4.0
layersPosition string hidden, topleft, topright, bottomleft, bottomright 4.0
layersCollapsed bool true, false 4.0
filtersPosition string hidden, topleft, topright, bottomleft, bottomright 4.0
filtersCollapsed bool true, false 4.0
filtersButtons bool true, false 4.0
filtersName bool true, false 4.0
filtersIcon bool true, false 4.0
filtersCount bool true, false 4.0
filtersOrderBy string id, name, count, custom 4.0
filtersSortOrder string asc, desc 4.0
minimapPosition string hidden, topleft, topright, bottomleft, bottomright 4.0
minimapWidth absint * 4.0
minimapHeight absint * 4.0
minimapCollapsedWidth absint * 4.0
minimapCollapsedHeight absint * 4.0
minimapZoomLevelOffset floatval * 4.0
minimapZoomLevelFixed int 0 – 23 4.0
minimapMinimized bool true, false 4.0

Settings for tab “Markers”

Shortcode parameter name Type Allowed values Since version
markerOpacity absfloat 0 – 1 4.0
clustering bool true, false 4.0
showCoverageOnHover bool true, false 4.0
disableClusteringAtZoom absfloat 0 – 23 4.0
maxClusterRadius absint * 4.0
singleMarkerMode bool true, false 4.0
spiderfyDistanceMultiplier absfloat * 4.0
tooltip bool true, false 4.0
tooltipDirection string auto, right, left, top, bottom, center 4.0
tooltipPermanent bool true, false 4.0
tooltipSticky bool true, false 4.0
tooltipOpacity absfloat 0.1 – 1 4.0
popupOpenOnHover bool true, false 4.0
popupCenterOnMap bool true, false 4.0
popupMarkername bool true, false 4.0
popupAddress bool true, false 4.0
popupCoordinates bool true, false 4.0
popupDirections bool true, false 4.0
popupMinWidth absint * 4.0
popupMaxWidth absint * 4.0
popupMaxHeight absint * 4.0
popupCloseButton bool true, false 4.0
popupAutoClose bool true, false 4.0

Settings for tab “Filters”

Shortcode parameter name Type Allowed values Since version
filtersAllMarkers bool true, false 4.0

Settings for tab “List”

Shortcode parameter name Type Allowed values Since version
list absint 0 (= none), 1 (= below), 2 (= right), 3 (= left) 4.0
listWidth absint * 4.0
listBreakpoint absint * 4.0
listSearch bool true, false 4.0
listIcon bool true, false 4.0
listName bool true, false 4.0
listPopup bool true, false 4.0
listAddress bool true, false 4.0
listDistance bool true, false 4.0
listDistanceUnit string metric, imperial, metric-imperial, imperial-metric 4.0
listDistancePrecision absint 0 – 6 4.0
listOrderBy string id, name, address, distance, icon, created, updated 4.0
listSortOrder string asc, desc 4.0
listOrderById bool true, false 4.0
listOrderByName bool true, false 4.0
listOrderByAddress bool true, false 4.0
listOrderByDistance bool true, false 4.0
listOrderByIcon bool true, false 4.0
listOrderByCreated bool true, false 4.0
listOrderByUpdated bool true, false 4.0
listLimit absint 1 – * 4.0
listDir bool true, false 4.0
listFs bool true, false 4.0
listAction string none, setview, popup 4.0

Settings for tab “Interaction”

Shortcode parameter name Type Allowed values Since version
gestureHandling bool true, false 4.0
responsive bool true, false 4.0
dragging bool true, false 4.0
inertia bool true, false 4.0
inertiaDeceleration absint 1 – * 4.0
inertiaMaxSpeed absint 1 – * 4.0
keyboard bool true, false 4.0
keyboardPanDelta absint 0 – * 4.0
scrollWheelZoom bool true, false 4.0
doubleClickZoom bool true, false 4.0
touchZoom bool true, false 4.0
boxZoom bool true, false 4.0
bounceAtZoomLimits bool true, false 4.0

Settings for tab “GPX”

Shortcode parameter name Type Allowed values Since version
gpxUrl string * 4.0
gpxMeta bool true, false 4.0
gpxMetaUnits string metric, imperial, metric-imperial, imperial-metric 4.0
gpxMetaInterval absint 0 – * 4.0
gpxMetaName bool true, false 4.0
gpxMetaStart bool true, false 4.0
gpxMetaEnd bool true, false 4.0
gpxMetaTotal bool true, false 4.0
gpxMetaMoving bool true, false 4.0
gpxMetaDistance bool true, false 4.0
gpxMetaPace bool true, false 4.0
gpxMetaHeartRate bool true, false 4.0
gpxMetaElevation bool true, false 4.0
gpxMetaDownload bool true, false 4.0
gpxIcons bool true, false 4.0
gpxTrackSmoothFactor absfloat 0 – * 4.0
gpxTrackColor string e.g. #ccc 4.0
gpxTrackWeight absfloat 0 – * 4.0
gpxTrackOpacity absfloat 0 . * 4.0
gpxWaypoints bool true, false 4.0
gpxWaypointsRadius absint 0 – * 4.0
gpxWaypointsStroke bool true, false 4.0
gpxWaypointsColor string e.g. #ccc 4.0
gpxWaypointsWeight absint 0 – * 4.0
gpxWaypointsFillColor string e.g. #ccc 4.0
gpxWaypointsFillOpacity absfloat 0 – * 4.0
gpxChart bool true, false 4.0
gpxChartHeight absint 0 – * 4.0
gpxChartBgColor string e.g. #ccc 4.0
gpxChartPolyline bool true, false 4.0
gpxChartPolylineColor string e.g. #ccc 4.0
gpxChartPolylineWeight absint 0 – * 4.0
gpxChartPolygon bool true, false 4.0
gpxChartPolygonFillColor string e.g. #ccc 4.0
gpxChartIndicator bool true, false 4.0
gpxChartIndicatorColor string e.g. #ccc 4.0
gpxChartIndicatorWeight absint 0 – * 4.0
gpxChartLocator bool true, false 4.0
gpxChartLocatorRadius absint 0 – * 4.0
gpxChartLocatorStroke bool true, false 4.0
gpxChartLocatorColor string e.g. #ccc 4.0
gpxChartLocatorWeight absint 0 – * 4.0
gpxChartLocatorFillColor string e.g. #ccc 4.0
gpxChartLocatorFillOpacity absfloat 0 – * 4.0

Updated on 29 May 2022