aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2012-03-03 11:28:40 -0400
committerJoey Hess <joey@kitenet.net>2012-03-03 11:30:44 -0400
commit9f56a417a1c20508f64fd80dc3e8f0eab6ec5f98 (patch)
tree09f7156ca3413f897c8ecef69426de3ba3c1435d /doc
parent78737cbfbf91c7b31ed5d216a23de8d360a76392 (diff)
downloadikiwiki-9f56a417a1c20508f64fd80dc3e8f0eab6ec5f98.tar
ikiwiki-9f56a417a1c20508f64fd80dc3e8f0eab6ec5f98.tar.gz
add osm plugin
Diffstat (limited to 'doc')
-rw-r--r--doc/ikiwiki/directive/osm.mdwn71
-rw-r--r--doc/ikiwiki/directive/waypoint.mdwn6
-rw-r--r--doc/plugins/contrib/osm.mdwn13
-rw-r--r--doc/plugins/osm.mdwn29
4 files changed, 106 insertions, 13 deletions
diff --git a/doc/ikiwiki/directive/osm.mdwn b/doc/ikiwiki/directive/osm.mdwn
new file mode 100644
index 000000000..bf7a2e1bd
--- /dev/null
+++ b/doc/ikiwiki/directive/osm.mdwn
@@ -0,0 +1,71 @@
+The `osm` directive is supplied by the [[!iki plugins/osm desc=osm]] plugin.
+
+This directive inserts an OpenStreetMap map onto a page.
+It is typically combined with the [[waypoint]] directive
+to add points to the map.
+
+## examples
+
+ [[!osm]]
+ [[!waypoint lat="45°30N" lon="73°40W" name="My city" tag="city"]]
+
+The osm directive will display the actual map, while the waypoint
+directive adds waypoints to the map.
+
+The above can also be shortened as:
+
+ [[!waypoint lat="45°30N" lon="73°40W" name="My city" tag="city" embed]]
+
+The tag is also taken from the tags elsewhere in the page, so the
+above is equivalent to:
+
+ [[!waypoint lat="45°30N" lon="73°40W" name="My city" embed]]
+ [[!tag city]]
+
+The icon is also taken from the tag if attached to the tag page as
+icon.png (default, modifiable)..
+
+## map display
+
+ * `map` - map to display, defaults to the current page
+ name in fullscreen mode, "map" otherwise
+ * `zoom` - the level to zoom to on the OSM map
+ * `loc` - lattitude and longitude of the map center
+ * `lat` - lattitude
+ * `lon` - longitude
+ * `fullscreen` - make the map take the whole screen through CSS
+ * `editable` - add edit controls in a separate layer
+ * `right` - float the map right, ignored for fullscreen
+ * `left` - float the map left (default unless fullscreen)
+ * `width` - width of the map, ignored for fullscreen
+ * `height` - height of the map, ignored for fullscreen
+
+## waypoints
+
+Waypoints can be added to any page. By default the waypoint takes the
+name of the page, which allows you to easily tag pages and make them
+appear on the central map.
+
+Waypoints, by default, show up as a image (the `icon` parameter) link
+to the main map (or the `map` parameter provided). That markup can be
+hidden with the `hidden` parameter.
+
+ * `name` - the name of this point, defaults to the page name (!) must
+ be unique, otherwise later incantation will overwrite previous
+ ones.
+ * `map` - the map to add the point to (defaults to "map")
+ * `desc` - description to embed in the map
+ * `loc` - lattitude and longitude
+ * `lat` - lattitude
+ * `lon` - longitude
+ * `tag` - the type of points, maps to an icon in the osm_types array
+ * `hidden` - do not display the link to the map (will not affect `embed`)
+ * `icon` - URL to the icon to show in the link to the map and within
+ the map
+ * `embed` - embed the map display alongside the point, in which case
+ the regular arguments to the map display can be used
+
+## Links
+
+If two pages with waypoints have a link between them, that link will
+magically show up on the map. Now how awesome is that?
diff --git a/doc/ikiwiki/directive/waypoint.mdwn b/doc/ikiwiki/directive/waypoint.mdwn
new file mode 100644
index 000000000..e301f8573
--- /dev/null
+++ b/doc/ikiwiki/directive/waypoint.mdwn
@@ -0,0 +1,6 @@
+The `waypoint` directive is supplied by the [[!iki plugins/osm desc=osm]] plugin.
+
+This directive adds a waypoint ot an OpenStreetMap map displayed
+by the [[osm]] directive. See the [[osm]] directive for examples
+and options.
+
diff --git a/doc/plugins/contrib/osm.mdwn b/doc/plugins/contrib/osm.mdwn
deleted file mode 100644
index a4ddbcb37..000000000
--- a/doc/plugins/contrib/osm.mdwn
+++ /dev/null
@@ -1,13 +0,0 @@
-[[!template id=plugin name=osm author="Blars Blarson, Antoine Beaupré"]]
-[[!tag type/special-purpose todo/geotagging]]
-
-Openstreetmap/Openlayers support for ikiwiki
---------------------------------------------
-
-This plugin provides simple Openstreetmap/Openlayers support for ikiwiki. It can embed Openstreetmap viewports within a page or link to a bigger map that will have multiple markers, generated with a KML (or CSV, or GeoJSON) datafile of markers based on the different calling pages. Multiple distinct maps on a single wiki are supported.
-
-Plugin was originally written by [[the techno-viking|http://techno-viking.com/posts/ikiwiki-maps/]] and fixed up by [[anarcat]]. Code is available at `git://src.anarcat.ath.cx/ikiwiki-osm.git`. See [[this page|http://anarcat.ath.cx/software/ikiwiki-osm/README]] for a more complete description and [[the Mtl-mesh wiki|http://mesh.openisp.ca/nodes/anarcat]] for a sample of what this plugin can do.
-
-See also [[plugins/contrib/googlemaps]].
-
-This plugin would be greatly improved by [[todo/internal_definition_list_support]].
diff --git a/doc/plugins/osm.mdwn b/doc/plugins/osm.mdwn
new file mode 100644
index 000000000..e41744eb4
--- /dev/null
+++ b/doc/plugins/osm.mdwn
@@ -0,0 +1,29 @@
+[[!template id=plugin name=osm author="Blars Blarson, Antoine Beaupré"]]
+[[!tag type/special-purpose todo/geotagging]]
+
+## Openstreetmap/Openlayers support for ikiwiki
+
+This plugin provides simple Openstreetmap/Openlayers support for ikiwiki.
+It can embed Openstreetmap viewports within a page or link to a bigger map
+that will have multiple markers, generated with a KML (or CSV, or GeoJSON)
+datafile of markers based on the different calling pages. Multiple distinct
+maps on a single wiki are supported.
+
+You will need the [[!cpan XML::Writer]] perl module to write KML files,
+which is the default mode of operation. GeoJSON files can also be generated
+if the [[!cpan JSON]] perl module is installed.
+
+---
+
+The plugin was originally written by
+[[the techno-viking|http://techno-viking.com/posts/ikiwiki-maps/]] and fixed up
+by [[anarcat]].
+
+See [[the Mtl-mesh
+wiki|http://mesh.openisp.ca/nodes/anarcat]] for a sample of what this
+plugin can do
+
+See also [[plugins/contrib/googlemaps]].
+
+This plugin would be greatly improved by
+[[todo/internal_definition_list_support]].