Embed OpenStreetMap maps.
Download ZIP file and copy it into your system/extensions
folder. Learn more about extensions.
Create an [openstreetmap]
shortcut.
The following arguments are available, all but the first argument are optional:
Address
= address or GPS coordinates, wrap multiple words into quotes
Zoom
= zoom value, from 0 to 19
Style
= map style, e.g. left
, center
, right
, flexible
Width
= map width, pixel or percent
Height
= map height, pixel
Layer
= map layer, e.g. standard
, cycle
, transport
, humanitarian
and others
You can append marker
to the layers to show a marker. To get GPS coordinates, go to OpenStreetMap and enter the address. For more precision, select the "Share" icon on the right, then "Include marker", and drag the marker to the desidered location. The GPS coordinates are the last numbers of the URL shown in the browser. If the URL shown is https://www.openstreetmap.org/#map=17/41.85181/12.62127
, then the GPS coordinates are 41.85181, 12.62127
.
You should know that the service provider collects personal data and uses cookies.
Create an [openstreetmap]
shortcut.
The following arguments are available, all but the first argument are optional:
Name
= file name of the points of interest file
Zoom
= zoom value, from 0 to 19
Style
= map style, e.g. left
, center
, right
, flexible
Width
= map width, pixel or percent
Height
= map height, pixel
Layer
= map layer, e.g. standard
, cycle
, transport
, humanitarian
and others
You can append marker
to the layers to show the marker(s). Put the file into the media/openstreetmap/
folder with the extension .csv
. Each point of interest is a line in a comma-separated values file, in one of these two formats:
address,city,name,description
latitude,longitude,name,description
Fields that contain commas must be enclosed in quotes. The third and fourth field are optional, if provided they will be used for a popup. An API key is required for a map with points of interest using the transport
layer.
You should know that the service provider collects personal data and uses cookies.
Embedding a map, different addresses:
[openstreetmap "Roma"]
[openstreetmap "Via Columbia 1, Roma" 17 center 100% 400 standard marker]
[openstreetmap "Bredgatan 1, Lund, Sweden" 17 center 100% 400 standard marker]
Embedding a map, different GPS coordinates:
[openstreetmap "41.85181, 12.62127"]
[openstreetmap "41.85181, 12.62127" 17 center 100% 400 standard marker]
[openstreetmap "55.70647, 13.19246" 17 center 100% 400 standard marker]
Embedding a map with points of interest:
[openstreetmap rome.csv]
[openstreetmap rome.csv 17 center 100% 400 standard marker]
[openstreetmap rome.csv 17 center 100% 400 transport marker]
Configuring points of interest in a CSV file:
Piazza di Spagna,Roma,Piazza di Spagna,"At the bottom of the Spanish Steps, one of the most famous squares in Rome"
Piazza Colonna,Roma,Piazza Colonna,"Named for the marble Column of Marcus Aurelius, which has stood there since AD 193"
41.89772,12.47231,Statua di Pasquino,"The first talking statue of Rome: he spoke out about the people's dissatisfaction, denounced injustice, and assaulted misgovernment"
Piazza della Rotonda,Roma,Piazza della Rotonda,"On the north side of the Pantheon, the square gets its name from its informal title as the church of Santa Maria Rotonda"
The following settings can be configured in file system/extensions/yellow-system.ini
:
OpenstreetmapDirectory
= directory for points of interest file
OpenstreetmapZoom
= zoom value
OpenstreetmapStyle
= map style, e.g. flexible
OpenstreetmapLayer
= map layer, e.g. standard marker
OpenstreetmapTransportApiKey
= your API key
This extension uses OpenStreetMap and Nominatim. Thank you for the free service. The extension includes Leaflet 1.8.0 by Volodymyr Agafonkin for maps with points of interest. Thank you for the good work.
Giovanni Salmeri. Get help.