Visual Leaflet editor: Difference between revisions

From Maps for MediaWiki
mNo edit summary
mNo edit summary
Line 1: Line 1:
You can add data to [[Displaying Leaflet Maps|Leaflet maps]] using a visual map editor.  
You can add data to [[Displaying Leaflet Maps|Leaflet maps]] using a visual map editor.  


This editor needs to be enabled per map. When it is enabled, an edit icon will show below the zoom control to people with edit permissions.


[[File:EditGeoJsonLayer.png|frame|The edit button that activates the editor]]
[[File:File:EditorExample.png|frame|Map in edit mode after activating the editor]]
== Activating the editor ==
The editor stores data on a separate page in the [[Leaflet_GeoJSON|GeoJSON namespace]].
Create a new page in that namespace by going to <code>GeoJson:WhateverYourMapIsAbout</code>. Click the
[[File:EditGeoJsonLayer.png|frame|The edit button that activates the editor]]
<pre>
{{#display_map: center=Berlin | geojson=LeafletEditorExample}}
</pre>
== Using the editor ==
== Example ==


<pre>
<pre>

Revision as of 14:06, 3 June 2020

You can add data to Leaflet maps using a visual map editor.

This editor needs to be enabled per map. When it is enabled, an edit icon will show below the zoom control to people with edit permissions.

The edit button that activates the editor
File:File:EditorExample.png
Map in edit mode after activating the editor

Activating the editor

The editor stores data on a separate page in the GeoJSON namespace.

Create a new page in that namespace by going to GeoJson:WhateverYourMapIsAbout. Click the

The edit button that activates the editor
{{#display_map: center=Berlin | geojson=LeafletEditorExample}}


Using the editor

Example

{{#display_map: center=Berlin | geojson=LeafletEditorExample}}
Loading map...