]> sipb.mit.edu Git - ikiwiki.git/blob - doc/ikiwiki/directive/osm.mdwn
escape example directives
[ikiwiki.git] / doc / ikiwiki / directive / osm.mdwn
1 The `osm` directive is supplied by the [[!iki plugins/osm desc=osm]] plugin.
2
3 This directive inserts an OpenStreetMap map onto a page.
4 It is typically combined with the [[waypoint]] directive
5 to add points to the map.
6
7 ## examples
8
9     \[[!osm]]
10     \[[!waypoint lat="45°30N" lon="73°40W" name="My city" tag="city"]]
11
12 The osm directive will display the actual map, while the waypoint
13 directive adds waypoints to the map.
14
15 The above can also be shortened as:
16
17     \[[!waypoint lat="45°30N" lon="73°40W" name="My city" tag="city" embed]]
18
19 The tag is also taken from the tags elsewhere in the page, so the
20 above is equivalent to:
21
22     \[[!waypoint lat="45°30N" lon="73°40W" name="My city" embed]]
23     \[[!tag city]]
24
25 The icon is also taken from the tag if attached to the tag page as
26 icon.png (default, modifiable)..
27
28 ## map display
29
30  * `map` - map to display, defaults to the current page
31     name in fullscreen mode, "map" otherwise
32  * `zoom` - the level to zoom to on the OSM map
33  * `loc` - lattitude and longitude of the map center
34  * `lat` - lattitude
35  * `lon` - longitude
36  * `fullscreen` - make the map take the whole screen through CSS
37  * `editable` - add edit controls in a separate layer
38  * `right` - float the map right, ignored for fullscreen
39  * `left` - float the map left (default unless fullscreen)
40  * `width` - width of the map, ignored for fullscreen
41  * `height` - height of the map, ignored for fullscreen
42
43 ## waypoints
44
45 Waypoints can be added to any page. By default the waypoint takes the
46 name of the page, which allows you to easily tag pages and make them
47 appear on the central map.
48
49 Waypoints, by default, show up as a image (the `icon` parameter) link
50 to the main map (or the `map` parameter provided). That markup can be
51 hidden with the `hidden` parameter.
52
53  * `name` - the name of this point, defaults to the page name (!) must
54    be unique, otherwise later incantation will overwrite previous
55    ones.
56  * `map` - the map to add the point to (defaults to "map")
57  * `desc` - description to embed in the map
58  * `loc` - lattitude and longitude
59  * `lat` - lattitude
60  * `lon` - longitude
61  * `tag` - the type of points, maps to an icon in the osm_types array
62  * `hidden` - do not display the link to the map (will not affect `embed`)
63  * `icon` - URL to the icon to show in the link to the map and within
64    the map
65  * `embed` - embed the map display alongside the point, in which case
66    the regular arguments to the map display can be used
67
68 ## Links
69
70 If two pages with waypoints have a link between them, that link will
71 magically show up on the map. Now how awesome is that?