plugin:openlayersmap
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:openlayersmap [2016-10-22 16:33] – new version mprins | plugin:openlayersmap [2024-04-08 15:51] (current) – version upped mprins | ||
---|---|---|---|
Line 2: | Line 2: | ||
---- plugin ---- | ---- plugin ---- | ||
- | description: | + | description: |
author | author | ||
email : mprins@users.sf.net | email : mprins@users.sf.net | ||
type : syntax, action | type : syntax, action | ||
- | lastupdate : 2016-10-22 | + | lastupdate : 2024-04-08 |
- | compatible : Angua, 2012-10-13, Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, 2016-06-26 | + | compatible : Hogfather, Igor, Jack Jackrum, Kaos |
depends | depends | ||
conflicts | conflicts | ||
Line 13: | Line 13: | ||
tags : media maps embed geo spatial | tags : media maps embed geo spatial | ||
- | downloadurl: | + | downloadurl: |
- | sourcerepo : https://sourceforge.net/p/dokuwikispatial/ | + | sourcerepo : https://github.com/mprins/dokuwiki-plugin-openlayersmap/ |
- | bugtracker : https://sourceforge.net/p/dokuwikispatial/issues/ | + | bugtracker : https://github.com/mprins/dokuwiki-plugin-openlayersmap/issues/ |
+ | donationurl: | ||
---- | ---- | ||
+ | |||
===== Description ===== | ===== Description ===== | ||
- | A map rendering plugin that will put an [[http:// | + | |
- | The component enables users to put GPS data (currently GeoJSON, GPX and KML format are supported) and other geographic services on the map in configurable layout and uses open source components and data ([[http:// | + | A map rendering plugin that will put an [[https:// |
- | It can also be configured to use non-open data (Google, Virtual Earth) providers. | + | The component enables users to put GPS data (currently GeoJSON, GPX and KML format are supported) and other geographic services on the map in configurable layout and uses open source components and data ([[https:// |
+ | It can also be configured to use non-open data (eg. Bing) 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. | 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. | ||
+ | |||
+ | ===== Upgrading to 2022-06-14 or later ===== | ||
+ | After upgrading the plugin and removing/ | ||
+ | * if you have used olmap_agslayer you need to change the url; remove the ''/ | ||
+ | * if you have used olmap_osmlayer you need to remove the '' | ||
===== Download and Installation ===== | ===== Download and Installation ===== | ||
:!: Note: for old releases (2008-05-05, | :!: Note: for old releases (2008-05-05, | ||
- | Search and install the plugin using the [[plugin: | + | Search and install the plugin using the [[plugin: |
- | Alternate locations for the plugin and older version are available at: http:// | + | Alternate locations for the plugin and older version are available at: https:// |
+ | |||
+ | :!: When you choose to use the local background rendering engine (option '' | ||
- | :!: This plugin needs the server to have [[phpfn> | ||
==== Change Log ==== | ==== Change Log ==== | ||
- | === version 4.9 === | + | The [[https:// |
- | * some PHP 7 fixes | + | |
- | + | ||
- | === version 4.8 === | + | |
- | * drop support for MapQuest; their tile service was discontinued | + | |
- | * add support for Stamen maps (terrain and toner-lite) | + | |
- | * disable hillshading layer; it is no longer | + | |
- | + | ||
- | === version 4.7 === | + | |
- | * PHP 7 compatibility fixes | + | |
- | + | ||
- | === version 4.6 === | + | |
- | * use latest version of OpenLayers 2.14-dev | + | |
- | * update google maps api to 3.22 release | + | |
- | + | ||
- | === version 4.5 === | + | |
- | * use latest version of OpenLayers 2.14-dev | + | |
- | + | ||
- | === version 4.4 === | + | |
- | * use latest version of OpenLayers 2.14-dev | + | |
- | + | ||
- | === version 4.3 === | + | |
- | * some small bugfixes | + | |
- | * update google maps api to 3.17 release | + | |
- | + | ||
- | === version 4.2 === | + | |
- | * add background to map | + | |
- | * display Point of Interest coordinates in popups | + | |
- | * allow coordinate display in decimal degrees or degrees, minutes, seconds | + | |
- | + | ||
- | === version 4.1 === | + | |
- | * add a fullscreen option for the map | + | |
- | * fix an IE8 bug | + | |
- | * fix static map generation, different maptypes were not respected | + | |
- | * add configuration option for a MapQuest API key (needed for remote static map generation) and Google API key | + | |
- | * semi-responsive map rendering (on page load only); prevent maps that are larger than the page width | + | |
- | === version 4.0 === | ||
- | * use OpenLayers 2.14-dev | ||
- | * keyboard accessible zoom control replacing the pan/zoom bar | ||
- | * keyboard accessible layer switcher control | ||
- | * keyboard accessible feature info control | ||
- | * removed the toolbar | ||
- | * remove the Cloudmade layers; Cloudmade went " | ||
- | * removed the option to set openlayers library, this is no longer possible | ||
- | * remove styling admin option and remove associated images, use the wiki styling from now on | ||
- | * add help pages (en, nl) | ||
- | == deleted files == | + | {{rss> |
- | * controlbar images: | + | |
- | * lib/classic/* | + | |
- | * lib/dark/* | + | |
- | * lib/orange/* | + | |
- | * lib/ | + | |
- | * lib/ | + | |
- | * lib/ | + | |
- | * img/ | + | |
- | * img/ | + | |
- | * logo/cloudmade_logo.png | + | |
- | === version 3.1 === | ||
- | * use OpenLayers 2.13 | ||
- | * improvements and bugfixes in the static map generator | ||
- | * upgrade the google api | ||
- | * add orange style | ||
- | * drop cUrl requirement by enabling fall-back to file_get_contents | ||
- | * add support for GeoJSON | ||
- | * remove permalink from the map | ||
- | * some accessibility enhancements | ||
- | == deleted files == | ||
- | * overview-switcher-minimize.png | ||
- | * overview-switcher-maximize.png | ||
- | |||
- | === version 3.0 === | ||
- | * A local static map generator was added. Note that this requires php-curl and the geophp plugin. | ||
- | * A management interface for the static map generator was added | ||
- | |||
- | ===Version 2.1 === | ||
- | * provide an extension point for [[openlayersmapoverlays]] | ||
- | * updated the [[http:// | ||
- | |||
- | ===Version 2.0=== | ||
- | | ||
- | * support for “Angua” and jQuery | ||
- | * fix a negative coordinates bug ([[http:// | ||
- | * Spanish translation | ||
- | * small fixes and enhancements | ||
- | * updated the [[http:// | ||
- | * more icons | ||
- | * add some more open base layers (transport, landscape, | ||
- | * accessibility improvements | ||
- | * remove the depercated t@h base layer | ||
- | * using v3.8 of the Google api for Goole maps | ||
- | * various small enhancements and fixes | ||
- | * use [[http:// | ||
- | |||
- | ===Version 1.0=== | ||
- | | ||
- | * Yahoo was removed; they are shutting down their maps api ([[http:// | ||
- | * switched to Google Maps v3 ([[http:// | ||
- | * Add support for ReST access of the Bing layers (bing road, bing sat, bing hybrid) and deprecated Virtual Earth (ve) [[https:// | ||
- | * option to disable OSM base layers | ||
- | * option to disable MapQuest Open layers | ||
- | * 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 page((this option may be disabled)) | ||
- | * a table with the points of interest((this option may be disabled)) | ||
- | * a description can be entered for the map | ||
- | * better styling | ||
- | * theme' | ||
- | * :!: 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. | ||
- | * use [[http:// | ||
===== Configuration ===== | ===== Configuration ===== | ||
Line 151: | Line 54: | ||
* **enableOSM** Enable the use of OpenStreetMap base layers as basemap provider | * **enableOSM** Enable the use of OpenStreetMap base layers as basemap provider | ||
- | * **enableMapQuest** Enable the use of MapQuest Open as basemap provider | + | * **enableStadia** Enable the use of Stadia Maps as basemap provider |
- | * **enableGoogle** Enable the use of Google | + | |
* **enableBing** Enable the use of Bing as basemap provider | * **enableBing** Enable the use of Bing as basemap provider | ||
* **bingAPIKey** Bing requires an API key, get yours at: https:// | * **bingAPIKey** Bing requires an API key, get yours at: https:// | ||
- | * **mapquestAPIKey** MapQuest Static Maps API key, get yours at: http:// | + | * **tfAPIKey** Thunderforest (cyclemap, |
- | * **googleAPIkey** Google Static Maps API key, get yours at: https://code.google.com/apis/ | + | |
* **iconUrlOverload** URL for map icons when using static maps on a non-public access host such as with [[install: | * **iconUrlOverload** URL for map icons when using static maps on a non-public access host such as with [[install: | ||
* **enableA11y** Enable a11y/print output (static map, legend table). If you use maps with a lot of POI you will want to turn this off | * **enableA11y** Enable a11y/print output (static map, legend table). If you use maps with a lot of POI you will want to turn this off | ||
- | * **optionStaticMapGenerator** use the local a11y/print map renderer or remote services. Commercial/ | + | * **optionStaticMapGenerator** use the local a11y/print map renderer or remote services. Commercial/ |
* **autoZoomMap** Enable auto zoom for the map, makes the map zoom to the extent of the POI and KML/GPX | * **autoZoomMap** Enable auto zoom for the map, makes the map zoom to the extent of the POI and KML/GPX | ||
Line 165: | Line 66: | ||
If you want to add (or change) to the available icons for display on the map you can drop them into the directory " | If you want to add (or change) to the available icons for display on the map you can drop them into the directory " | ||
Nice icons are available from: | Nice icons are available from: | ||
- | * https:// | + | * https:// |
- | * http://www.gpsdrive.de/ | + | * https://labs.mapbox.com/ |
- | * http://mapbox.com/ | + | |
* http:// | * http:// | ||
* http:// | * http:// | ||
===== Demonstration ===== | ===== Demonstration ===== | ||
- | A small site with the plugin showing various samples is available on [[http:// | + | A small site with the plugin showing various samples is available on [[https:// |
The plugin is used on the following pages/ | The plugin is used on the following pages/ | ||
- | * http:// | + | * https:// |
- | * http:// | + | * https:// |
* http:// | * http:// | ||
+ | * [[https:// | ||
===== Syntax/ Usage ===== | ===== Syntax/ Usage ===== | ||
< | < | ||
- | <olmap id=" | + | <olmap id=" |
52.1, | 52.1, | ||
</ | </ | ||
</ | </ | ||
- | * **id** The identifyer | + | * **id** The identifier |
* **width** The width of the map, default is '' | * **width** The width of the map, default is '' | ||
* **height** The height of the map, default is '' | * **height** The height of the map, default is '' | ||
* **zoom** The zoom level, default value '' | * **zoom** The zoom level, default value '' | ||
* **controls** Whether or not to show controls for zooming and panning on the map. Valid values are '' | * **controls** Whether or not to show controls for zooming and panning on the map. Valid values are '' | ||
- | * **statusbar** Defines if the statusbar is shown. Valid values are '' | ||
- | * **poihoverstyle** Specifies POI feature select behaviour (hover or click). Valid values are '' | ||
* **lat** The latitude of map centre in decimal degrees ([[WP> | * **lat** The latitude of map centre in decimal degrees ([[WP> | ||
* **lon** The longitude of map centre in decimal degrees ([[WP> | * **lon** The longitude of map centre in decimal degrees ([[WP> | ||
- | * **baselyr** The basemap layer that is shown when the map opens. Valid values are: '' | + | * **baselyr** The basemap layer that is shown when the map opens. Valid values are: '' |
* **gpxfile** any [[WP> | * **gpxfile** any [[WP> | ||
* **kmlfile** any [[WP> | * **kmlfile** any [[WP> | ||
Line 201: | Line 100: | ||
* **summary** A description of the map. | * **summary** A description of the map. | ||
+ | If the values for latitude and longitude differ from the default values lat=" | ||
+ | The page is therefore added to the spatial index (and the KML and GeoRSS sitemaps) then. | ||
The Points of Interest are formatted: | The Points of Interest are formatted: | ||
< | < | ||
The map will zoom in to the extent of the POI which must be given in decimal degrees according to [[WP> | The map will zoom in to the extent of the POI which must be given in decimal degrees according to [[WP> | ||
- | ===== Known Limitations ===== | ||
- | * there may be some issues | + | ===== Overlays ===== |
+ | ==== XYZ (tiled) ==== | ||
+ | |||
+ | To add a XYZ style (eg. OpenStreetMap tiling scheme) layer to a map use the following syntax: | ||
+ | < | ||
+ | |||
+ | Where '' | ||
+ | |||
+ | ==== WMS ==== | ||
+ | To add a WMS layer to a map use the following syntax: | ||
+ | < | ||
+ | |||
+ | Where '' | ||
+ | |||
+ | ==== ArcGIS REST ==== | ||
+ | To add an ArcGIS REST image layer to a map use the following syntax: | ||
+ | < | ||
+ | |||
+ | Where '' | ||
+ | |||
+ | ==== WTMS ==== | ||
+ | To add a WTMS layer to a map use the following syntax: | ||
+ | < | ||
+ | |||
+ | Where '' | ||
| | ||
- | ===== Discussion ===== | + | ===== Discussion |
- | > Hi!. | + | > I'm trying to build a Wiki where addresses of venues, rehearsal studios, recording studios, supply stores etc. for musicians are collected and this plugin is perfect for that. Embedding OSM works beautifully, |
+ | >> Google maps will not be supported, due to licencing requirements | ||
+ | |||
> I'm trying to disable " | > I'm trying to disable " | ||
>> It is not possible to set an area of interest | >> It is not possible to set an area of interest | ||
+ | |||
> Would it be possible to generate a map where the POI's are geotagged pages from a certain namespace in the wiki? | > Would it be possible to generate a map where the POI's are geotagged pages from a certain namespace in the wiki? | ||
- | >> this will be available as part of [[plugin: | + | >> this will be available as part of [[plugin: |
+ | |||
> Am I able to add my own map (image of a landscape.gif) show it on a page and point onto this image to insert a POI? Goal is to create a map like http:// | > Am I able to add my own map (image of a landscape.gif) show it on a page and point onto this image to insert a POI? Goal is to create a map like http:// | ||
>> no this is not possible | >> no this is not possible | ||
+ | |||
+ | |||
> I can not force my users to figure out the lat/lon by hand so something like "set marker with point& | > I can not force my users to figure out the lat/lon by hand so something like "set marker with point& | ||
>> this may be possible in the future | >> this may be possible in the future | ||
- | >>> | ||
- | > I like the looks of this plugin. | ||
- | > | ||
- | >Thanks for the plugin. | ||
- | >> [[user> | + | > I like the looks of this plugin. |
+ | >> There are currently no specific | ||
>> < | >> < | ||
<olmap id=" | <olmap id=" | ||
Line 233: | Line 162: | ||
</ | </ | ||
</ | </ | ||
- | >>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. | + | >>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' | ||
+ | >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' | ||
>> this is unlikely to happen; see [[https:// | >> this is unlikely to happen; see [[https:// | ||
- | >> --- [[user> | ||
- | |||
- | < | ||
- | |||
- | i've make dokuwiki-update to rc2013-10-28 " | ||
- | |||
- | > You are running a plugin (either a very old version of openlayersmap or something different) that uses the addInitEvent() function; this is no longer available in DokuWiki; see [[: | ||
- | |||
- | >> i already use the actual version of openlayersmap-plugin. so i have updated all other plugins and now the map looks fine again :-) thanks for the hint! i don't know which plugin causes the problem. --Kristjan | ||
Line 337: | Line 257: | ||
[[user> | [[user> | ||
- | > @Werner this patch will give you problem as the width is also used for the fallback image and ' | + | >> @Werner this patch will give you problem as the width is also used for the fallback image and ' |
+ | |||
+ | >I just installed this wonderful plugin to embed an OpenStreetMap to my website. However, I found that the map is placed on top of all the other elements of the page so that it covers the (fixed) header DIV when I scroll down. Any hint, what I can do to prevent that? | ||
+ | >> this issue is probably caused by your template; you may need to fix the template | ||
- | I just installed | + | > How to find out why rendering of print map fails? Gd2 installed, using local renderer. |
- | > this issue is probably caused by your template; you may need to fix the template | + | >> look at the logfile of your webserver, turn on debugging for the wiki and check that logfile, maybe turn on debug logging for php |
- | How to find out why rendering of print map fails? Gd2 installed, using local renderer. | + | > I've found the font size to be a little too small on the maps, you can easily change this by editing the script.js file, and changing the pixel size in the |
- | > look at the logfile of your webserver, turn on debugging for the wiki and check that logfile, maybe turn on debug logging for php | + | <code javascript> var markers = new OpenLayers.Layer.Vector(" |
+ | styleMap : new OpenLayers.StyleMap({ </ | ||
+ | \\ and change | ||
+ | <code javascript> | ||
+ | fontSize : " |
plugin/openlayersmap.1477146812.txt.gz · Last modified: 2016-10-22 16:33 by mprins