Difference between revisions of "Help:Markers"

From Mapping on MediaWiki
Jump to: navigation, search
(Created page with '{{User TOC}} * [http://ext.bn2vs.com/screencasts/maps_display_point.htm Watch display_point screencast (4,24MB)] == One point == [[File:Maps-3d-small.png|thumb|right|Maps indi…')
 
(One point)
Line 4: Line 4:
  
 
== One point ==
 
== One point ==
 +
 +
{| class="wikitable sortable" style="margin: 1em auto 1em auto"
 +
! width=90px | Property || Usage || Aliases || Default || width=90px | Version
 +
|-
 +
| coordinates, address(es), 'nameless' || Holds the maps centre for display_map or the list of points for display_point(s). Depending on which name you provide for this parameter, the values will be treated differently.
 +
* Default (nameless) parameter: Maps will determine if a value is a coordinate or not. When it isn't a coordinate, it'll be geocoded.
 +
* Coordinates: Maps will only accept valid coordinates, and reject all addresses.
 +
* Address(es): Maps will treat every value as an address, and geocode it, even when it's an address.
 +
|| coords, location, locations || align="center" | [[#Default_map_coordinates|configurable]] || align="center" | Changed in 0.4.2
 +
|-
 +
| service || Allows to set the mapping service that will be used to generate the map. || align="center" | - || align="center" | [[#Default_mapping_service|configurable]] || align="center" | -
 +
|-
 +
| geoservice || Allows to set the geocoding service used to turn addresses into coordinates in the display_map and display_point(s) parser functions. || align="center" | - || align="center" | [[#Default_geocoding_service|configurable]] || align="center" | Added in 0.2
 +
|-
 +
| width || Allows to set the width of the map, in pixels. || align="center" | - || align="center" | [[#Default_map_width|configurable]] || align="center" | -
 +
|-
 +
| height ||Allows to set the height of the map, in pixels. || align="center" | - || align="center" | [[#Default_map_height|configurable]] || align="center" | -
 +
|-
 +
| zoom || Allows to set the zoom level of the map. When not provided and multiple markers are present on the map, the best fitting zoom will be taken, not the configurable default. || align="center" | - || align="center" | [[#Default_map_zoom|configurable]] or auto-detect || align="center" | Changed in 0.3
 +
|-
 +
| centre || Allows to set the coordinates of the map's centre for display_point(s). Accepts both addresses and coordinates. When this property is not provided, the map will centre itself on the provided marker, or between the provided markers. || align="center" | center || align="center" | [[#Default_map_coordinates|configurable]] or auto-detect || align="center" | Changed in 0.4
 +
|-
 +
| title || Allows to set text that will be displayed in the pop-ups of all markers that do not have a specific title. When used together with <code>label</code>, the title will be bold and have a line under it. || align="center" | - || align="center" | empty || align="center" | Changed in 0.4
 +
|-
 +
| label || Allows to set text that will be displayed in the pop-ups of all markers that do not have a specific label. || align="center" | - || align="center" | empty || align="center" | Changed in 0.4
 +
|-
 +
| icon || Allows you to set the icon used for all markers. || align="center" | - || align="center" | Default mapping service marker || align="center" | Added in 0.5.2
 +
|}
 +
  
 
[[File:Maps-3d-small.png|thumb|right|Maps indicating Moscow on a Google Earth map.]]
 
[[File:Maps-3d-small.png|thumb|right|Maps indicating Moscow on a Google Earth map.]]

Revision as of 01:31, April 12, 2010

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

One point

Property Usage Aliases Default Version
coordinates, address(es), 'nameless' Holds the maps centre for display_map or the list of points for display_point(s). Depending on which name you provide for this parameter, the values will be treated differently.
  • Default (nameless) parameter: Maps will determine if a value is a coordinate or not. When it isn't a coordinate, it'll be geocoded.
  • Coordinates: Maps will only accept valid coordinates, and reject all addresses.
  • Address(es): Maps will treat every value as an address, and geocode it, even when it's an address.
coords, location, locations configurable Changed in 0.4.2
service Allows to set the mapping service that will be used to generate the map. - configurable -
geoservice Allows to set the geocoding service used to turn addresses into coordinates in the display_map and display_point(s) parser functions. - configurable Added in 0.2
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 and multiple markers are present on the map, the best fitting zoom will be taken, not the configurable default. - configurable or auto-detect Changed in 0.3
centre Allows to set the coordinates of the map's centre for display_point(s). Accepts both addresses and coordinates. When this property is not provided, the map will centre itself on the provided marker, or between the provided markers. center configurable or auto-detect Changed in 0.4
title Allows to set text that will be displayed in the pop-ups of all markers that do not have a specific title. When used together with label, the title will be bold and have a line under it. - empty Changed in 0.4
label Allows to set text that will be displayed in the pop-ups of all markers that do not have a specific label. - empty Changed in 0.4
icon Allows you to set the icon used for all markers. - Default mapping service marker Added in 0.5.2


File:Maps-3d-small.png
Maps indicating Moscow on a Google Earth map.

You can display a map with a marker on it with the #display_point or #display_points parser functions. By default, the map will centre itself around the provided point, which can be a set of coordinates, or an address. In the later case, it will be automatically geocoded. You do not need to specify if the provided value is a set of coordinates or an address, this will be automatically determined. The underneath code will result in a map on which the city centre of Moscow is indicated.

{{#display_point: Moscow}}

Or

{{#display_point: 55.7557860, 37.6176330}}

The above examples demonstrate the use of addresses and floating point coordinates. You can also use the other supported coordinate notations. Also note that there is no difference between the use of display_point and display_points. These functions are completely synonymous.

The usage of display_address has been deprecated since version 0.4. For backward compatibility, it is currently synonymous to display_point, but this will be removed at some point.

You can further customize your map by adding additional map properties.

Multiple points

File:Maps-pf-ol-osm-cycle-multimarker.jpg
An OpenLayers map with multiple markers on the OpenStreetMap cycle layer.

When you want to display multiple points on a Map, you can do this by adding them to a #display_point or #display_points parser function. Both accept a list of points, that can contain both coordinates and addresses, in which each item is separated by a ';'. Underneath example demonstrates how you can create a map with multiple points indicated:

{{#display_points:55°45′06″N 37°37′04″E; New York; 40.446195, -79.948862}}

The usage of display_addresses has been deprecated since version 0.4. For backward compatibility, it is currently synonymous to display_points, but this will be removed at some point.

You can further customize your map by adding additional map properties.