Add maps (OpenStreetMap, Google, Virtual Earth, Yahoo and your own data) to your wiki pages using the OpenLayers toolkit
Compatible with DokuWiki
Add maps (OpenStreetMap, Google, Virtual Earth, Yahoo and your own data) to your wiki pages using the OpenLayers toolkit
Similar to googlemaps, osm
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.
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
Version 2.0 (a snapshot is available on the download site) brings the following changes:
Version 1.0 brings the following changes:
Currently the following options can/need to be configured (see conf/default.php):
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:
A small site with the plugin showing various samples is available on SourceForge
The plugin is used on the following pages/sites:
<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)
This is currently a work in progress; please check the Tracker on the SourceForge.net site.
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
-Jonasthat 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:54i 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.
this is unlikely to happen; see https://sourceforge.net/tracker/?func=detail&aid=2928736&group_id=239475&atid=1110189 why.
— MarkMark
mprins
<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