DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:osm

OSM Plugin

Compatible with DokuWiki

Lemming, Anteater

plugin An OpenStreetMap Plugin

Last updated on
2016-02-02
Provides
Syntax, Action
Repository
Source

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Similar to itrackviewer, openlayersmap

Tagged with !discontinued, embed, maps, media

This is a plugin to display maps from OpenStreetMap in your wiki. You can add as many maps as you want to one wiki page. You can add multiple markers to a map. Although it's already supported by the syntax it doesn't display any label-text for markers, but that's planned as well as well as the possibility to use any image as marker.

Note: You shouldn't use this plugin as-is on high-volume sites but setup your own rendering server as the rendering servers of OpenStreetMap have their limits.

NOTE: I haven't worked on that plugin for a long time. If you want a more powerful plugin I recommend using the openlayersmap plugin. It supports everything this plugin does and a lot more (except static image display). My vision for the future of this plugin is not to offer a lot of technical features but a simple wizard and intuitive syntax for quickly adding a map with certain named location (addresses, existing POIs) and a location picker for adding other locations. — Michitux 2010/10/10 16:46

Download and Installation

Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.

Usage

As the plugin is heavily based on googlemaps the syntax is almost the same. There is only one difference, there is an additional layer parameter that can be used to determine the OpenStreetMap-renderer. There is a configuration-option to set the URL to get the static image from that is displayed when JavaScript is disabled.

Syntax

<osm parameter="value" parameter="value">
lat,lon,text
lat,lon,text
</osm>

The lines of “lat,lon,text” represent the individual overlay markers. Each marker must have its own line and be the only information on that line. “lat” and “lon” are the latitude and longitude of the marker. “text” is the text to be displayed in the popup when the marker is clicked. The text can include wiki markup.

Parameters

  • width — 999px (e.g. 500px) width of the map, default is 400px.
  • height — 999px (e.g. 500px) height of the map, default is 300px.
  • lat — values: -90.0 - 90.0; latitude of map centre, negative values are south.
  • lon — values: -180.0 - 180.0; longitude of map centre, negative values are west.
  • zoom — integer, zoom level, default value 8. Valid values are between 0 and 18 (note: as the static image uses the osmarender-renderer the static image only supports zoom level 17).
  • layer — values: osmarender, maplint, mapnik. Default is mapnik. Specifies the OpenStreetMap-Renderer to be used.

The parameters can be in any order.

Versions

Version 2010-10-10

Removed Maplint, just a bugfix release.

Version 2008-11-10

Added some validation for attributes, now all layers (maplint, osmarender, mapnik) are included and the one specified is default.

Version 2008-10-11

Initial version.

Discussion

Leave comments, suggestions, bugs here or send them by mail (see above).

I set up three different DokuWiki installations and tried the OSM plugin. But it results the following error on each installation:

Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in /mnt/web3/33/25/51480925/htdocs/02_tha/wiki/lib/plugins/osm/syntax.php on line 76

I think it would be a nice plugin if it would work properly.

greetz,

king nothing

This is a known problem as I am using syntax that hasn't been supported before PHP 5. You can either upgrade to PHP 5 or remove that “&” on line 76 and add
$query_params[$key] = $val;

after line 77. Or you just wait for the next version that will contain a real fix. — Michael Hamann 2009/02/15 20:15

FIXME

The map osmarender is deprecated, you should remove it form options.
Cheers, — Cyrille37 2012/03/28 10:24

plugin/osm.txt · Last modified: 2023-10-30 23:08 by Klap-in

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki