Help:Forms

From Mapping on MediaWiki
Revision as of 08:00, March 31, 2010 by Jeroen De Dauw (Talk | contribs)$7

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

User manual

Introduction

Coordinates

Geocoding

Displaying maps

Displaying markers

Customizing markers

Mapping services

Semantic mapping

Coordinates data-type

Querying coordinate data

Distance query

Maps in forms

Admin manual

Semantic Forms showing a Google Maps map and geocoding features provided by a hook of Semantic Maps.

Semantic Maps provides multiple form inputs. These form inputs are hooks for the Semantic Forms extension. They allow users to add, edit and query data using forms, instead of wiki code. For more info on how to work with form inputs, please read how to define them. Every mapping service has it's own form input.

Once you have defined a form with one or more fields using an input type provided by Maps, you can insert and edit data with it. When you create new data, a text field for coordinates and a map of the chosen mapping service will be shown. You can either simply enter the coordinates and ignore the map, or you can use the map to determine your coordinates. This is simply done by clicking on the location you want to add, which will result in the corresponding coordinates to be displayed into the coordinate text field.

You can find a list of all map properties you can set in #ask queries in the form inputs sub in the map properties section. You can find a list of all mapping services you can use with queries in the map services section.

Geocoding locations in form inputs

Semantic Maps has live geocoding capabilities in several of it's form inputs. This feature is present in the form of an extra text field underneath the coordinate field, where you can enter an address, and a 'look up coordinates' button. It's used by entering your address into the address field, and then clicking the related button. Once you've done this, the marker on the map will move to the correct location (or be placed there when it's not yet on the map), and the coordinates in the coordinate field will be updated.

This feature is only available for maps using the Google Maps or Yahoo! Maps mapping services. OpenLayers form inputs does not have it.

Properties

This table contains all common map properties you can place in coordinate field definitions of forms. For non Semantic Maps specific properties, review the Semantic Forms form markup language.

Property Usage Aliases Default Version
input type Allows to set the mapping service that will be used to generate the map. Do not use a 'service=' parameter for this, like in Maps. - configurable -
geoservice Allows to set the geocoding service used to turn addresses into coordinates. - configurable Added in 0.4.1
width Allows to set the width of the map, in pixels. - configurable -
height Allows to set the height of the map, in pixels. - configurable -
zoom Allows to set the zoom level of the map. When not provided , the zoom will be set so you can see the entire planet. - configurable or auto-detect Changed in 0.2
centre Allows to set the coordinates of the map's centre. When this parameter is not provided, the map will centre itself on the current location, or when not set, to coordinates 0,0. center auto-detect Changed in 0.2

Here is an example of a definition of a coordinate field definition in a form that uses the 'googlemaps' format:

{{{
field
|The coordinates
|input type=googlemaps
|width=800
|height=500
|zoom=8
|autozoom=off
}}}