plugin:openlayersmap
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:openlayersmap [2021-04-24 13:42] – mprins | plugin:openlayersmap [2024-04-08 15:51] (current) – version upped mprins | ||
---|---|---|---|
Line 6: | Line 6: | ||
email : mprins@users.sf.net | email : mprins@users.sf.net | ||
type : syntax, action | type : syntax, action | ||
- | lastupdate : 2021-04-24 | + | lastupdate : 2024-04-08 |
- | compatible : Angua, 2012-10-13, Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, 2016-06-26, 2017-02-19, Greebo, | + | compatible : Hogfather, Igor, Jack Jackrum, Kaos |
depends | depends | ||
conflicts | conflicts | ||
Line 16: | Line 16: | ||
sourcerepo : https:// | sourcerepo : https:// | ||
bugtracker : https:// | bugtracker : https:// | ||
+ | donationurl: | ||
---- | ---- | ||
+ | |||
===== Description ===== | ===== Description ===== | ||
- | A map rendering plugin that will put an [[https:// | + | |
+ | A map rendering plugin that will put an [[https:// | ||
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:// | 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 (Google, Virtual Earth) providers. | + | 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 ===== | ||
Line 30: | Line 38: | ||
Alternate locations for the plugin and older version are available at: https:// | Alternate locations for the plugin and older version are available at: https:// | ||
- | :!: This plugin needs the server to have [[phpfn> | + | :!: When you choose to use the local background rendering engine (option '' |
Line 46: | 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 as basemap provider (removed in current versions) | + | |
* **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:// | ||
* **tfAPIKey** Thunderforest (cyclemap, | * **tfAPIKey** Thunderforest (cyclemap, | ||
- | * **mapquestAPIKey** MapQuest Static Maps API key, get yours at: http:// | ||
- | * **googleAPIkey** Google Static Maps API key, get yours at: https:// | ||
* **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 61: | 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 97: | 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 |
- | Hello, | + | > 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 | ||
- | > Hi!. | ||
> 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 131: | 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 235: | 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? | + | >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 | + | >> this issue is probably caused by your template; you may need to fix the template |
- | How to find out why rendering of print map fails? Gd2 installed, using local renderer. | + | > How to find out why rendering of print map fails? Gd2 installed, using local renderer. |
- | > look at the logfile of your webserver, turn on debugging for the wiki and check that logfile, maybe turn on debug logging for php | + | >> look at the logfile of your webserver, turn on debugging for the wiki and check that logfile, maybe turn on debug logging for php |
- | + | ||
- | I like this plugin, are there plans to make it compatible with Frusterick Manners (2017-02-19) any time soon? | + | |
- | > The plugin works successfully with this version. --- [[user> | + | |
- | + | ||
- | if i use the example code from above i just get a blank page! no sidebar, no wiki header, just a blank page. i'm using latest dokuwiki frusterik manners... or should i call it now " | + | |
- | + | ||
- | ---- | + | |
- | // 2017-09-23 21:25 //\\ | + | |
- | Page will not by saved (endless loop?) if to add same lat/lon in map and point of interest. | + | |
- | < | + | |
- | Warning: Division by zero in .../ | + | |
- | </ | + | |
- | + | ||
- | < | + | |
- | <olmap lat=" | + | |
- | 52.0,5.1 ... | + | |
- | </ | + | |
- | </ | + | |
- | Just need to create map with one point of interest in a middle of map.\\ | + | |
- | Can you fix it?\\ | + | |
- | Thank you for a useful plugin\\ | + | |
- | Found out this happens only if " | + | |
- | + | ||
- | ----- | + | |
- | + | ||
- | Hi, | + | |
- | + | ||
- | I'm getting this error message when trying to install/ | + | |
- | + | ||
- | '' | + | |
- | + | ||
- | --- [[user> | + | |
- | + | ||
- | ----- | + | |
- | Hi, | + | |
- | I am experiencing a __strange behavior with geojson file__. The coordinates used to center the map are working well (45.172223, | + | |
- | I cannot get to the bottom of this. Any idea? | + | |
- | + | ||
- | LE: Never mind, I found the problem. It was quite stupid, the longitude and latitude I was using were reversed in the data source I was importing from. | + | |
- | + | ||
- | Also, it would be nice to change the order of loading layers in script.js and put the POI layer last, just before controls and toolbar. Otherwise a KML polygon will cover the POIs and the user is unable to click on them. | + | |
- | + | ||
- | Btw, I am using 2018-04-22c " | + | |
- | + | ||
- | Thanks, | + | |
- | --- [[user> | + | |
- | + | ||
- | I've started running a new DokuWiki installation local in an XAMPP environment, | + | |
- | Now tired from searching all around, I tried to start from the beginning again, but with DokuWiki version 2017-02-19g " | + | |
- | And - TADAAA - it's working !!! | + | |
- | Looks like there' | + | |
- | + | ||
- | [[user> | + | |
- | + | ||
- | + | ||
- | ----- | + | |
- | After installing the plugin (in Hogfather, DokuwikiStick), | + | |
- | + | ||
- | Warning: file_get_contents(http:// | + | |
- | + | ||
- | Warning: Cannot modify header information - headers already sent by (output started at D: | + | |
- | + | ||
- | Those were clean installs, so I have no idea what could have gone wrong. | + | |
- | --- [[user> | + | |
- | + | ||
- | ----- | + | |
- | Like [[user> | + | |
- | + | ||
- | This allowed some of my maps to render but some didn't throwing an error about a division by zero. | + | |
- | + | ||
- | < | + | |
- | 2021/04/10 10:05:57 [error] 44968# | + | |
- | xtension/ | + | |
- | penlayersmap/ | + | |
- | Stack trace: | + | |
- | #0 / | + | |
- | #1 / | + | |
- | #2 / | + | |
- | #3 / | + | |
- | #4 / | + | |
- | #5 / | + | |
- | #6 / | + | |
- | #7 / | + | |
- | </ | + | |
- | + | ||
- | This only occurred on maps with a single '' | + | |
- | + | ||
- | If I drop a second independant point/geom on the map this problem doesn' | + | |
- | + | ||
- | A bit of digging showed that this is because with a single geom listed in the OpenLayersMap entry such as... | + | |
- | + | ||
- | < | + | |
- | <olmap id=" | + | |
- | 9" zoom=" | + | |
- | penStreetMap" | + | |
- | ~~ More examples: http:// | + | |
- | 53.357647, | + | |
- | ternal link: | + | |
- | </ | + | |
- | </ | + | |
- | + | ||
- | ...the value of '' | + | |
- | + | ||
- | <code php> | + | |
- | if (count ( $geoms ) <= 2) { | + | |
- | dbglog($geoms," | + | |
- | return; | + | |
- | } | + | |
- | </ | + | |
- | I've reported the issue on SourceForge (see [[https:// | ||
- | --- [[user>slackline|slackline]] | + | > 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 |
+ | <code javascript> | ||
+ | styleMap : new OpenLayers.StyleMap({ </code> section | ||
+ | \\ and change | ||
+ | <code javascript> | ||
+ | fontSize : " |
plugin/openlayersmap.1619264557.txt.gz · Last modified: 2021-04-24 13:42 by mprins