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…')
 
 
(4 intermediate revisions by 3 users not shown)
Line 3: Line 3:
 
* [http://ext.bn2vs.com/screencasts/maps_display_point.htm Watch display_point screencast (4,24MB)]
 
* [http://ext.bn2vs.com/screencasts/maps_display_point.htm Watch display_point screencast (4,24MB)]
  
== One point ==
+
{{Display points}}
  
[[File:Maps-3d-small.png|thumb|right|Maps indicating Moscow on a Google Earth map.]]
+
== See also ==
  
You can display a map with a marker on it with the #display_point or #display_points [[Parser_function|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.
+
* [[Help:Marker data|Customizing markers]]
+
<pre>
+
{{#display_point: Moscow}}
+
</pre>
+
Or
+
<pre>
+
{{#display_point: 55.7557860, 37.6176330}}
+
</pre>
+
  
The above examples demonstrate the use of addresses and floating point coordinates. You can also use the other supported [[#Coordinates|coordinate notations]]. Also note that there is no difference between the use of display_point and display_points. These functions are completely synonymous.
+
{{docu|master page=Help:Markers|language=en|minversion=0.1}}
  
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.
+
[[Category:Maps documentation]]
 
+
You can further customize your map by adding additional [[#Map_properties|map properties]].
+
 
+
== Multiple points ==
+
 
+
[[File:Maps-pf-ol-osm-cycle-multimarker.jpg|thumb|400px|right|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|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:
+
 
+
<pre>
+
{{#display_points:55°45′06″N 37°37′04″E; New York; 40.446195, -79.948862}}
+
</pre>
+
 
+
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|map properties]].
+

Latest revision as of 16:23, September 16, 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


Mapping services

This parser hook is supported by these mapping services:


Syntax

{{#display_points: <your locations> |height= <some height> |service= <your service> }}

Parameters

Parameter Aliases Default Usage
Default, Coordinates or Address - required The location the map will initially be centred on. Depending on which name you provide for this parameter, the values will be treated differently. This behaviour will be removed in 0.7.
  • Default (nameless) parameter: Provide either an address or set of coordinates, and Maps will figure out what to do with it.
  • Coordinates: Only valid coordinates will be accepted, addresses will not be geocoded.
  • Address: The location will be treated as an address and geocoded, even when it's a set of coordinates.
service - configurable Allows to set the mapping service that will be used to generate the map.
geoservice - configurable Allows to set the geocoding service used to turn the location into coordinates when it's an address.
width - configurable Allows to set the width of the map, in pixels.
height - configurable Allows to set the height of the map, in pixels.
zoom - configurable 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.
centre center configurable 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.
title - empty 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.
label - empty Allows to set text that will be displayed in the pop-ups of all markers that do not have a specific label.
icon - Default mapping service marker Allows you to set the icon used for all markers. Should be "File:Foo.png" or "Foo.png" for a picture in the Wiki. An external link is also possible.

Examples

Also see the Maps examples, which are much more extensive.

{{#display_point:New York City}}
Loading map...
The following error has been detected in your syntax:
* Parameter coordinates must be one or more valid locations.
<display_points type="terrain">
Amsterdam
Berlin|This is Berlin
London|London|The capital of [[England]].
Ghent|Ghent|Most awesome city in Europe|Green marker.png
</display_points>
Loading map...
Warning: There is an error in your syntax.


{{#display_points:New York City;Moscow;Berlin|geoservice=geonames|service=openlayers|layers=osmarender}}
Loading map...
The following error has been detected in your syntax:
* Parameter coordinates must be one or more valid locations.

See also

This documentation page applies to all (Semantic) Maps versions from 0.1 to the most current version.
     

Help:Markers en 0.1