This page shows examples for basic maps rendered with Google Maps with point specific data.
- syntax
- The data is added in the format
Location~Title~Label~Icon
. If one data item is omitted it is still required to keep the data divider "~
" in place, e. g. Location~Title~~Icon
. If you are using the parser function every line end is indicated by the line end indicator ";
".
This does not work with the OpenLayers or Leaflet service.
Examples[edit]
Using the parser function[edit]
- marker uploaded to the wiki
{{#display_map:
Moscow, Russia~Moscow~A city in Russia;
New York~New York City;
London~[[London]]~Capital of England~Green marker.png;
Brussels;
Mali~Mali~~Blue marker.png
|service=googlemaps3
}}
Loading map...
{"type":"ROADMAP","minzoom":false,"maxzoom":false,"types":["ROADMAP","SATELLITE","HYBRID","TERRAIN"],"mappingservice":"googlemaps3","width":"auto","height":"350px","centre":false,"title":"","label":"","icon":"","lines":[],"polygons":[],"circles":[],"rectangles":[],"copycoords":false,"static":false,"visitedicon":"","wmsoverlay":false,"zoom":false,"layers":[],"controls":["pan","zoom","type","scale","streetview","rotate"],"zoomstyle":"DEFAULT","typestyle":"DEFAULT","autoinfowindows":false,"resizable":false,"kmlrezoom":false,"poi":true,"cluster":false,"clustergridsize":60,"clustermaxzoom":20,"clusterzoomonclick":true,"clusteraveragecenter":true,"clusterminsize":2,"imageoverlays":[],"kml":[],"gkml":[],"searchmarkers":"","fullscreen":false,"scrollwheelzoom":false,"locations":[{"text":"\u003Cb\u003E\u003Cdiv class=\"mw-parser-output\"\u003E\u003Cp\u003EMoscow\n\u003C/p\u003E\u003C/div\u003E\u003C/b\u003E\u003Cdiv class=\"mw-parser-output\"\u003E\u003Cp\u003EA city in Russia\n\u003C/p\u003E\u003C/div\u003E","title":"Moscow\n","link":"","lat":55.625578,"lon":37.6063916,"icon":""},{"text":"\u003Cdiv class=\"mw-parser-output\"\u003E\u003Cp\u003ENew York City\n\u003C/p\u003E\u003C/div\u003E","title":"New York City\n","link":"","lat":40.7127281,"lon":-74.0060152,"icon":""},{"text":"\u003Cb\u003E\u003Cdiv class=\"mw-parser-output\"\u003E\u003Cp\u003E\u003Ca href=\"/wiki/London\" class=\"mw-redirect\" title=\"London\"\u003ELondon\u003C/a\u003E\n\u003C/p\u003E\u003C/div\u003E\u003C/b\u003E\u003Cdiv class=\"mw-parser-output\"\u003E\u003Cp\u003ECapital of England\n\u003C/p\u003E\u003C/div\u003E","title":"London\n","link":"","lat":51.4893335,"lon":-0.14405508452769,"icon":"/w/images/c/ce/Green_marker.png"},{"text":"","title":"","link":"","lat":50.8465573,"lon":4.351697,"icon":""},{"text":"\u003Cdiv class=\"mw-parser-output\"\u003E\u003Cp\u003EMali\n\u003C/p\u003E\u003C/div\u003E","title":"Mali\n","link":"","lat":16.3700359,"lon":-2.2900239,"icon":"/w/images/6/6f/Blue_marker.png"}]}
In Maps 3.x and later, you can still use customized markers by specifying the marker files without adding the "File" name space as this example shows. See
issue 51 for more information. Adding "File:Blue_marker.png" instead of "Blue_marker.png" does not work.
- external source of the marker
{{#display_map:
Moscow, Russia~Moscow~A city in Russia;
New York~New York City;
London~[[London]]~Capital of England~https://www.semantic-mediawiki.org/w/images/c/ce/Green_marker.png;
Brussels;
Mali~Mali~~https://www.semantic-mediawiki.org/w/images/6/6f/Blue_marker.png
|service=googlemaps3
}}
Loading map...
{"type":"ROADMAP","minzoom":false,"maxzoom":false,"types":["ROADMAP","SATELLITE","HYBRID","TERRAIN"],"mappingservice":"googlemaps3","width":"auto","height":"350px","centre":false,"title":"","label":"","icon":"","lines":[],"polygons":[],"circles":[],"rectangles":[],"copycoords":false,"static":false,"visitedicon":"","wmsoverlay":false,"zoom":false,"layers":[],"controls":["pan","zoom","type","scale","streetview","rotate"],"zoomstyle":"DEFAULT","typestyle":"DEFAULT","autoinfowindows":false,"resizable":false,"kmlrezoom":false,"poi":true,"cluster":false,"clustergridsize":60,"clustermaxzoom":20,"clusterzoomonclick":true,"clusteraveragecenter":true,"clusterminsize":2,"imageoverlays":[],"kml":[],"gkml":[],"searchmarkers":"","fullscreen":false,"scrollwheelzoom":false,"locations":[{"text":"\u003Cb\u003E\u003Cdiv class=\"mw-parser-output\"\u003E\u003Cp\u003EMoscow\n\u003C/p\u003E\u003C/div\u003E\u003C/b\u003E\u003Cdiv class=\"mw-parser-output\"\u003E\u003Cp\u003EA city in Russia\n\u003C/p\u003E\u003C/div\u003E","title":"Moscow\n","link":"","lat":55.625578,"lon":37.6063916,"icon":""},{"text":"\u003Cdiv class=\"mw-parser-output\"\u003E\u003Cp\u003ENew York City\n\u003C/p\u003E\u003C/div\u003E","title":"New York City\n","link":"","lat":40.7127281,"lon":-74.0060152,"icon":""},{"text":"\u003Cb\u003E\u003Cdiv class=\"mw-parser-output\"\u003E\u003Cp\u003E\u003Ca href=\"/wiki/London\" class=\"mw-redirect\" title=\"London\"\u003ELondon\u003C/a\u003E\n\u003C/p\u003E\u003C/div\u003E\u003C/b\u003E\u003Cdiv class=\"mw-parser-output\"\u003E\u003Cp\u003ECapital of England\n\u003C/p\u003E\u003C/div\u003E","title":"London\n","link":"","lat":51.4893335,"lon":-0.14405508452769,"icon":"https://www.semantic-mediawiki.org/w/images/c/ce/Green_marker.png"},{"text":"","title":"","link":"","lat":50.8465573,"lon":4.351697,"icon":""},{"text":"\u003Cdiv class=\"mw-parser-output\"\u003E\u003Cp\u003EMali\n\u003C/p\u003E\u003C/div\u003E","title":"Mali\n","link":"","lat":16.3700359,"lon":-2.2900239,"icon":"https://www.semantic-mediawiki.org/w/images/6/6f/Blue_marker.png"}]}
Same as the first example but with an icon from an external source. Usually icons are pictures which have been uploaded to the wiki and are accessed the same way files are.
Using the tag[edit]
- marker uploaded to the wiki
<display_map service="googlemaps3" type="terrain">
Moscow, Russia~Moscow~A city in Russia
New York~New York city
London~[[London]]~Capital of England~Green_marker.png
Brussels
Mali~Mali~~Blue_marker.png
</display_map>
Loading map...
{"type":"TERRAIN","minzoom":false,"maxzoom":false,"types":["ROADMAP","SATELLITE","HYBRID","TERRAIN"],"mappingservice":"googlemaps3","width":"auto","height":"350px","centre":false,"title":"","label":"","icon":"","lines":[],"polygons":[],"circles":[],"rectangles":[],"copycoords":false,"static":false,"visitedicon":"","wmsoverlay":false,"zoom":false,"layers":[],"controls":["pan","zoom","type","scale","streetview","rotate"],"zoomstyle":"DEFAULT","typestyle":"DEFAULT","autoinfowindows":false,"resizable":false,"kmlrezoom":false,"poi":true,"cluster":false,"clustergridsize":60,"clustermaxzoom":20,"clusterzoomonclick":true,"clusteraveragecenter":true,"clusterminsize":2,"imageoverlays":[],"kml":[],"gkml":[],"searchmarkers":"","fullscreen":false,"scrollwheelzoom":false,"locations":[{"text":"\u003Cb\u003E\u003Cdiv class=\"mw-parser-output\"\u003E\u003Cp\u003EMoscow\n\u003C/p\u003E\u003C/div\u003E\u003C/b\u003E\u003Cdiv class=\"mw-parser-output\"\u003E\u003Cp\u003EA city in Russia\n\u003C/p\u003E\u003C/div\u003E","title":"Moscow\n","link":"","lat":55.625578,"lon":37.6063916,"icon":""},{"text":"\u003Cdiv class=\"mw-parser-output\"\u003E\u003Cp\u003ENew York city\n\u003C/p\u003E\u003C/div\u003E","title":"New York city\n","link":"","lat":40.7127281,"lon":-74.0060152,"icon":""},{"text":"\u003Cb\u003E\u003Cdiv class=\"mw-parser-output\"\u003E\u003Cp\u003E\u003Ca href=\"/wiki/London\" class=\"mw-redirect\" title=\"London\"\u003ELondon\u003C/a\u003E\n\u003C/p\u003E\u003C/div\u003E\u003C/b\u003E\u003Cdiv class=\"mw-parser-output\"\u003E\u003Cp\u003ECapital of England\n\u003C/p\u003E\u003C/div\u003E","title":"London\n","link":"","lat":51.4893335,"lon":-0.14405508452769,"icon":"/w/images/c/ce/Green_marker.png"},{"text":"","title":"","link":"","lat":50.8465573,"lon":4.351697,"icon":""},{"text":"\u003Cdiv class=\"mw-parser-output\"\u003E\u003Cp\u003EMali\n\u003C/p\u003E\u003C/div\u003E","title":"Mali\n","link":"","lat":16.3700359,"lon":-2.2900239,"icon":"/w/images/6/6f/Blue_marker.png"}]}
- external source of the marker
<display_map service="googlemaps3" type="terrain">
Moscow, Russia~Moscow~A city in Russia
New York~New York city
London~[[London]]~Capital of England~https://www.semantic-mediawiki.org/w/images/c/ce/Green_marker.png
Brussels
Mali~Mali~~https://www.semantic-mediawiki.org/w/images/6/6f/Blue_marker.png
</display_map>
Loading map...
{"type":"TERRAIN","minzoom":false,"maxzoom":false,"types":["ROADMAP","SATELLITE","HYBRID","TERRAIN"],"mappingservice":"googlemaps3","width":"auto","height":"350px","centre":false,"title":"","label":"","icon":"","lines":[],"polygons":[],"circles":[],"rectangles":[],"copycoords":false,"static":false,"visitedicon":"","wmsoverlay":false,"zoom":false,"layers":[],"controls":["pan","zoom","type","scale","streetview","rotate"],"zoomstyle":"DEFAULT","typestyle":"DEFAULT","autoinfowindows":false,"resizable":false,"kmlrezoom":false,"poi":true,"cluster":false,"clustergridsize":60,"clustermaxzoom":20,"clusterzoomonclick":true,"clusteraveragecenter":true,"clusterminsize":2,"imageoverlays":[],"kml":[],"gkml":[],"searchmarkers":"","fullscreen":false,"scrollwheelzoom":false,"locations":[{"text":"\u003Cb\u003E\u003Cdiv class=\"mw-parser-output\"\u003E\u003Cp\u003EMoscow\n\u003C/p\u003E\u003C/div\u003E\u003C/b\u003E\u003Cdiv class=\"mw-parser-output\"\u003E\u003Cp\u003EA city in Russia\n\u003C/p\u003E\u003C/div\u003E","title":"Moscow\n","link":"","lat":55.625578,"lon":37.6063916,"icon":""},{"text":"\u003Cdiv class=\"mw-parser-output\"\u003E\u003Cp\u003ENew York city\n\u003C/p\u003E\u003C/div\u003E","title":"New York city\n","link":"","lat":40.7127281,"lon":-74.0060152,"icon":""},{"text":"\u003Cb\u003E\u003Cdiv class=\"mw-parser-output\"\u003E\u003Cp\u003E\u003Ca href=\"/wiki/London\" class=\"mw-redirect\" title=\"London\"\u003ELondon\u003C/a\u003E\n\u003C/p\u003E\u003C/div\u003E\u003C/b\u003E\u003Cdiv class=\"mw-parser-output\"\u003E\u003Cp\u003ECapital of England\n\u003C/p\u003E\u003C/div\u003E","title":"London\n","link":"","lat":51.4893335,"lon":-0.14405508452769,"icon":"https://www.semantic-mediawiki.org/w/images/c/ce/Green_marker.png"},{"text":"","title":"","link":"","lat":50.8465573,"lon":4.351697,"icon":""},{"text":"\u003Cdiv class=\"mw-parser-output\"\u003E\u003Cp\u003EMali\n\u003C/p\u003E\u003C/div\u003E","title":"Mali\n","link":"","lat":16.3700359,"lon":-2.2900239,"icon":"https://www.semantic-mediawiki.org/w/images/6/6f/Blue_marker.png"}]}
Same as the first example but with an icon from an external source. Usually icons are pictures which have been uploaded to the wiki and are accessed the same way files are.