Extension:VisualData/Geolocation
Since version 1.0.3 VisualData includes a json-schema compliant geolocation widget (technically a subschema) with latitude and longitude fields, Maptiler map and reverse geocoding with draggable marker.
All layout elements are completely customizable through the interface and the latitude and longitude fields and the marker are bidirectionally connected: the marker affects the latitude and longitude fields and vice-versa.
Most of the native configuration options for the map and the reverse geocoding are accessible through the interface: see here for the Maptiler map reference and here for the geocoding reference.
Note that Maptiler's map and reverse geocoding are available only provided that the global parameter $wgVisualDataMaptilerApiKey
is set in LocalSettings
with an api key. The service is free for up of 5,000 initialized map objects per month. This is more than enough if you just use Maptiler to insert geolocation data through a form, and you use (for instance) leaflet maps through the Extension:Maps to display the map out of the inserted coordinates in the standard pages of your wiki.
Here is an overview to easily add a map to your forms.
1) Provided that you have the appropriate rights select a schema from the Manage Schemas special page or open the Define schema dialog through the edit button on top right of any form.
2) Add a geolocation item through the related button on the top bar:
3) Choose the layout elements you would like to insert in the form. Typically for technical users you would add the latitude and longitude fields, the map and the reverse geocoding, while for non-technical users the latitude and longitude fields could be hidden. (note however that at the current version if the coordinates haven't been set through the marker, and the coordinate fields are hidden, the error message won't be fully consistent, this may be fixed in future versions of the extension)
4) Press the buttons "Maptiler map" and "Maptiler geocoding" to further customize the map and the geocoding, where needed. Note that not all the options may work as expected (namely the "style" option, this is also to be fixed in a future version of the extension)
5) That's it! Enjoy your map. After placing the marker in the desired position, and zooming the map, both the coordinates and the zoom value will be saved among the json-data.
See also
[edit]- Wikisphere's Demo Geolocation
- Extension:Maps
- New article UI
- Schema Builder
- File upload
- Edit data
- Forms
- Geolocation
- Queries
- Queries in forms
- Result formats
- Browse data
- Maintenance scripts
- Dynamic catalogue