Maps: Difference between revisions
No edit summary |
Add example of proper usage of GeoJson and service=leaflet |
||
| (One intermediate revision by the same user not shown) | |||
| Line 34: | Line 34: | ||
| zoom=14 | | zoom=14 | ||
}} | }} | ||
== Leaflet Maps using the GeoJson namespace == | |||
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}} | |||
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]] | ||