Maps: Difference between revisions

No edit summary
Add example of proper usage of GeoJson and service=leaflet
 
Line 38: Line 38:
This map of Berlin is displayed here. But it is defined on the [[GeoJson:Berlin]] page (in GeoJson format)
This map of Berlin is displayed here. But it is defined on the [[GeoJson:Berlin]] page (in GeoJson format)


<code><nowiki>{{#display_map: center=Berlin | geojson=Berlin}}</nowiki></code> '''tries''' to display the data on the (default for this wiki) Google service - but Google doesn't work with GeoJson, so it just shows a map of the 'place' Berlin.
{{#display_map: center=Berlin | geojson=Berlin}}
{{#display_map: center=Berlin | geojson=Berlin}}
Compare that with:<br>
<code><nowiki>{{#display_map: center=Berlin | geojson=Berlin | service=leaflet }}</nowiki></code>
By specifying the correct service (Leaflet), we get the proper map of Berlin, '''and''' the GeoJson data also included in the display.
{{#display_map: center=Berlin | geojson=Berlin | service=leaflet }}




[[Category:Maps]]
[[Category:Maps]]