目次

openlayersmap plugin

Plugins by same author

Compatible with DokuWiki

  • 2012-01-25 "Angua" yes
  • 2011-05-25 "Rincewind" yes
  • 2010-11-07 "Anteater" yes

plugin Add maps (OpenStreetMap, Google, Virtual Earth, Yahoo and your own data) to your wiki pages using the OpenLayers toolkit

Last updated on
2012-01-29
Provides
Syntax
Repository
Source

Similar to googlemaps, osm

Tagged with embed, maps, media

Description

A map rendering plugin that will put an OpenLayers based map on the wiki page. The component enables users to put GPS data (currently GPX and KML format are supported) and other geographic services on the map in configurable layout and uses open source components and data (OSM). It can also be configured to use non-open data (Google, Virtual Earth, Yahoo Maps) providers. The plugin dynamically loads the OpenLayers API on demand, depending on the API license keys that are entered in the configuration section various base map layers are available.

Download and Installation

NOTE: for Angua you currently need to get version [https://sourceforge.net/projects/dokuwikispatial/files/openlayersmap/|2.0-SNAPSHOT]; I will finalize this into a 2.0 release an update the auto update version in the coming weeks, I just want to do some more testing before I release.

Download and install the plugin using the Plugin Manager using the given URL1). Refer to Plugins on how to install plugins manually. Alternate locations for the plugin and older version are given below.

Source code can be found on the Sourceforge.net Subversion site. use the following command to check out everything:

svn co https://dokuwikispatial.svn.sourceforge.net/svnroot/dokuwikispatial/trunk dokuwikispatial

News & Updates

RSS feed

changes

Version 2.0 (a snapshot is available on the download site) brings the following changes:

  1. support for “Angua RC1”
  2. fix a negative coordinates bug (3399949)

Version 1.0 brings the following changes:

  1. Yahoo was removed; they are shutting down their maps api (3322552)
  2. switched to Google Maps v3 (3035248)
  3. Add support for ReST access of the Bing layers (bing road, bing sat, bing hybrid) and deprecated Virtual Earth (ve) 3356282
  4. option to disable OSM base layers
  5. option to disable MapQuest Open layers
  6. Accessibility and printing enhancements:
    • enhancements to show a static fallback map for users that do not have javascript or css which is also used as the print page2)
    • a table with the points of interest3)
    • a description can be entered for the map
    • better styling
  7. theme's for some of the controls 3354326
  8. :!: dimensions for map width and heigth must be in pixels [px]; previously other units such as % and em may have worked. This is to make sure that the static fallback map works properly.

Configuration

Currently the following options can/need to be configured (see conf/default.php):

Icons

If you want to add (or change) to the available icons for display on the map you can drop them into the directory “icons” in this plugin's directory. They should be about 16px in size. There is a contact sheet available after installing the plugin at <yourbaseurl>/lib/plugins/openlayersmap/icons/ 4) Nice icons are available from:

Demonstration

A small site with the plugin showing various samples is available on SourceForge

The plugin is used on the following pages/sites:

Syntax/ Usage

<olmap id="olMap" width="600px" height="400px" lat="52.0" lon="5.1" zoom="12" statusbar="1" toolbar="1" controls="1" poihoverstyle="1" baselyr="OpenStreetMap" gpxfile=":playground:hardlopen_gpx.gpx" kmlfile=":playground:mtb.kml">
52.1,5.1,60,.8,marker-green.png,Just a spot
</olmap>

The Points of Interest are formatted:

lat, lon, rotationangle, opacity, image, textforpopup

The map will zoom in to the extent of the POI. The text for the popup can be formatted using regular DokuWiki syntax and may contain links as well. (see discussion below for enhanced sample)

Known Limitations

This is currently a work in progress; please check the Tracker on the SourceForge.net site.

Discussion

The Popup looks weird in my wiki, is this a bug or an error on my side? i'm using the latest snapshot. here's an example: http://imageshack.us/photo/my-images/31/bildschirmfoto20120130u.png/
keep up the good work
-Jonas
that is weird, I've never seen that before. Did you purge the cache (at least the css and js should be purged after an upgrade) or do you have a very small map? in that case the div element holding the popup might not fit.
MarkMark
mprins

2012/01/31 13:54
i tried to purge everything but the popup still looks the same way. when i checked the map i also got this: http://imageshack.us/photo/my-images/402/bildschirmfoto20120210u.png/ this notice
won't go away :(. never seen this befor, no clue what the reason is
I like the looks of this plugin. I am currently using google_maps and while it works fairly well, it is a bit lacking. With this plugin, can the dimensions of the locational marker pop-ups be fixed/changed? Is wiki text parsed within said pop-ups? I like to write short descriptions with each marker, so I need to format the text and text box to avoid stretching across the screen.

Thanks for the plugin.
MarkMark
mprins

you're welcome :-). there are currently no provisions to parse wiki text or URLs (link tags works e.g.
[[http://test.com|test]]

you probably want to set poihoverstyle=“0”). see sample below, it does links, line breaks an formatting.

<olmap id="olmap" width="600px" height="400px" lat="50.0" lon="5.1" zoom="8" statusbar="1" toolbar="1" controls="1" poihoverstyle="0">
49.9780098,5.1839387,270,.7,marker-gold.png,Faux Mayaux; Maissin \\ ** Watch out crossing the street **
50.0117497,5.1287857,60,.8,marker-green.png,Pont de Barbouillons; Daverdisse \\ external link: [[http://test.com|test.com]] \\ internal link: [[::start]]
</olmap>


The size of the markers is fixed, so even if you use larger bitmaps they will be scaled down, this in part has to do with the hover area and is just how things work in OL.

Hi Mark, I like your plugin too, it's well written. I've left a request on your tracker, suggesting the possibility of pulling the coordinates from a database instead of hard-coding them on the page. If using the PEAR library like one of the MySQL plugins, it shouldn't be too complex ? This would make for a powerful way of displaying multiple real-time coordinates.
<olmap id="olmap" width="480px" height="480px" lat="51.8795" lon="8.506751" zoom="12" statusbar="1" toolbar="1" controls="1" poihoverstyle="0" baselyr="Google hybrid">
51.8795,8.506751,30,.5,marker-gold.png,Start;Start
</olmap>


With this Code I see no marker and “Goggle Hybrid” is not displayed. Why? See in Action at http://www.jan-hendrikbade.de/doku.php/wiki:plugins#openlayers_map

I suspect this is the same issue as described in 2896534. The case of the layername is converted to lowercase (the “G” ends up as a “g”) causing this behaviour. 5) As for the marker; I have no idea, I ran your page through Firebug and that gives me a “too much recursion” error (I've never seen that yet), maybe you can give it a try with most extensions disabled? Also I don't see the toolbar!? –Mark
I installed the Version from 31.1(VERSION File) but nothing changes… See: http://www.jan-hendrikbade.de/doku.php/playground:playground Now I deactivated all the plugins and… IT WORKS Thank You! I found the mad add-on: http://www.inetsoftware.de/other-products/dokuwiki-plugins/miniajax it is used by ImageFlow
I guess miniajax redefines the builtin “$”
But now the zoom is always set to 18, see http://www.jan-hendrikbade.de/doku.php/playground:playground
Yes, the map automatically zooms to the extent of all the POI within the allowed range of zoomlevels, so when you have one POI, or a couple that are really close the map zooms in to the highest resolution, effectively ignoring the scale.

»»A workaround for this is to have some POI that you give a transparency of 1 and that are a few hundred meters apart… see: 2949057 This has now been fixed properly

2) , 3) this option may be disabled
5) this has been fixed