DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:openlayersmap

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:openlayersmap [2012-02-17 01:31] – solution for cropped background images achplugin:openlayersmap [2025-04-06 13:28] (current) – [Demonstration] mprins
Line 1: Line 1:
-====== openlayersmap plugin ====== +====== OpenLayersMap Plugin ====== 
----- pluginnews ---- +
-headline: Plugins by same author +
-style: sameauthor +
-----+
 ---- plugin ---- ---- plugin ----
-description: Add maps (OpenStreetMap, Google, Virtual Earth, Yahoo and your own data) to your wiki pages using the OpenLayers toolkit +description: Add maps (OpenStreetMap, Google, Bing and your own data) to your wiki pages using the OpenLayers toolkit 
-author     : Mark C. Prins +author     : Mark Prins 
-email      : mc.prins@gmail.com +email      : mprins@users.sf.net 
-type       : syntax +type       : syntax, action 
-lastupdate : 2012-02-16 +lastupdate : 2025-04-02 
-compatible : 2008-05-05, 2009-02-14, LemmingAnteaterRincewindAngua +compatible : HogfatherIgorJack JackrumKaos 
-depends    : +depends    : geophp
 conflicts  conflicts 
 similar    : googlemaps, osm similar    : googlemaps, osm
-tags       : mediamapsembed+tags       : media maps embed geo spatial
  
-downloadurl: http://sourceforge.net/projects/dokuwikispatial/files/openlayersmap/openlayersmap.zip/download +downloadurl: https://github.com/mprins/dokuwiki-plugin-openlayersmap/archive/master.zip 
-sourcerepo : http://sourceforge.net/svn/?group_id=239475 +sourcerepo : https://github.com/mprins/dokuwiki-plugin-openlayersmap
-bugtracker : http://sourceforge.net/tracker2/?group_id=239475+bugtracker : https://github.com/mprins/dokuwiki-plugin-openlayersmap/issues/ 
 +donationurl: https://github.com/sponsors/mprins
 ---- ----
 +
 ===== Description ===== ===== Description =====
-A map rendering plugin that will put an [[http://openlayers.org|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 ([[http://www.openstreetmap.org/|OSM]]).  +A map rendering plugin that will put an [[https://openlayers.org/|OpenLayers]] based map on the wiki page.  
-It can also be configured to use non-open data (Google, Virtual Earth, Yahoo Maps) 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://www.openstreetmap.org/|OSM]]).  
 +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/uninstalling [[openlayersmapoverlays]]:
 +  * if you have used olmap_agslayer you need to change the url; remove the ''/export'' part. eg ''%%https://geoservices2.wallonie.be/arcgis/rest/services/APP_KAYAK/KAYAK/MapServer/export%%'' becomes ''%%https://geoservices2.wallonie.be/arcgis/rest/services/APP_KAYAK/KAYAK/MapServer%%''
 +  * if you have used olmap_osmlayer you need to remove the ''$'' from the url. eg. ''%%https://tiles.openseamap.org/seemark/${z}/${x}/${y}.png%%'' becomes ''%%https://tiles.openseamap.org/seemark/{z}/{x}/{y}.png%%''
  
 ===== Download and Installation ===== ===== 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.** +:!: Note: for old releases (2008-05-05, 2009-02-14, Lemming, Anteater, Rincewind) you need [[https://sourceforge.net/projects/dokuwikispatial/files/openlayersmap/|version 1.0]]
-   +
-Download and install the plugin using the [[plugin:plugin|Plugin Manager]] using the given URL((or directly using http://surfnet.dl.sourceforge.net/project/dokuwikispatial/openlayersmap/openlayersmap.zip)). Refer to [[:Plugins]] on how to install plugins manually. Alternate locations for the plugin and older version are given below.+
  
-  * http://sourceforge.net/projects/dokuwikispatial/files/openlayersmap/ snapshots and releases+Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
  
-{{rss>http://sourceforge.net/api/file/index/project-id/239475/rss 8 date}}+Alternate locations for the plugin and older version are available at: https://sourceforge.net/projects/dokuwikispatial/files/openlayersmap/
  
-Source code can be found on the [[http://sourceforge.net/svn/?group_id=239475|Sourceforge.net Subversion]] site. +:!: When you choose to use the local background rendering engine (option ''optionStaticMapGenerator'') this plugin needs the [[phpfn>book.image|PHP GD extension]]. In some environments this is not installed by default, but it'the package ''php8-gd'' or alike. Check your ''phpinfo()'' before installing this plugin. If it's not installed you will run into a PHP Fatal error ''Call to undefined function imagecreatetruecolor() ...''.
-use the following command to check out everything: +
-<code> +
-svn co https://dokuwikispatial.svn.sourceforge.net/svnroot/dokuwikispatial/trunk dokuwikispatial +
-</code>+
  
-=== News & Updates === 
  
-[[http://sourceforge.net/export/rss2_keepsake.php?group_id=239475|{{http://img529.imageshack.us/img529/5725/feedm.png|RSS feed}}]] +==== Change Log ==== 
-{{rss>http://sourceforge.net/export/rss2_keepsake.php?group_id=239475 date }}+ 
 +The [[https://github.com/mprins/dokuwiki-plugin-openlayersmap/commits/master|complete changelog is available]] on GitHub 
 + 
 + 
 +{{rss>https://github.com/mprins/dokuwiki-plugin-openlayersmap/commits/master.atom date}}
  
-== changes== 
-Version 2.0 (a snapshot is available on the download site) brings the following changes: 
-  - support for “Angua RC1” 
-  - fix a negative coordinates bug ([[http://sourceforge.net/tracker/?func=detail&aid=3399949&group_id=239475&atid=1110186|3399949]])  
  
-Version 1.0 brings the following changes: 
-  - Yahoo was removed; they are shutting down their maps api ([[http://sourceforge.net/tracker/?func=detail&aid=3322552&group_id=239475&atid=1110189|3322552]]) 
-  - switched to Google Maps v3 ([[http://sourceforge.net/tracker/?func=detail&aid=3035248&group_id=239475&atid=1110189|3035248]]) 
-  - Add support for ReST access of the Bing layers (bing road, bing sat, bing hybrid) and deprecated Virtual Earth (ve) [[https://sourceforge.net/tracker/?func=detail&aid=3356282&group_id=239475&atid=1110189|3356282]] 
-  - 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's for some of the controls [[https://sourceforge.net/tracker/?func=detail&aid=3354326&group_id=239475&atid=1110189|3354326]] 
-  - :!: 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://openlayers.org|OpenLayers 2.11]] 
  
 ===== Configuration ===== ===== Configuration =====
 Currently the following options can/need to be configured (see conf/default.php): Currently the following options can/need to be configured (see conf/default.php):
-  * **olScriptUrl** (required) the URL for the Openlayers API (default: '/lib/plugins/openlayersmap/lib/OpenLayers.js') This may need adjusting to point to your plugin directory path. + 
-  * **googleScriptUrl** (deprecated, replaced by enableGoogle) the URL for the Google Maps API (e.g. 'http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAjpkAC9ePGe'+  * **enableOSM** Enable the use of OpenStreetMap base layers as basemap provider 
-  * **veScriptUrl** (optional) the URL for the Virtual Earth Maps API (e.g. 'http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.1'+  * **enableStadia** Enable the use of Stadia Maps as basemap provider
-  * **yahooScriptUrl** (optional) the URL for the Yahoo Maps API (e.g. 'http://api.maps.yahoo.com/ajaxymap?v=3.0&appid=euzu'+
-  * **enableGoogle** Enable the use of Google as basemap provider +
-  * **enableMapQuest** Enable the use of MapQuest as basemap provider +
-  * **enableOSM** Enable the use of OpenStreetMap as basemap provider+
   * **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://www.bingmapsportal.com/application +  * **bingAPIKey** Bing requires an API key, get yours at: https://www.bingmapsportal.com/application 
-  * **iconUrlOverload** URL for map icons when using static maps on a non-internet host +  * **tfAPIKey** Thunderforest (cyclemap,transport, landscape and outdoors) requires an API key, get yours at: https://www.bingmapsportal.com/application 
-  * **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+  * **iconUrlOverload** URL for map icons when using static maps on a non-public access host such as with [[install:dokuwiki_on_a_stick|DokuWiki on a Stick]] or [[https://sourceforge.net/projects/dokuwikispatial/files/DokuWiki%20portable/|DokuWikiStickNG]] 
 +  * **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/non-open providers always use their own, remote, service. NB 'local' requires internet access for your webserver as well as the GD PHP extension. 
 +  * **autoZoomMap** Enable auto zoom for the map, makes the map zoom to the extent of the POI and KML/GPX
  
 ===== Icons ===== ===== 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/'' ((eg. http://dokuwikispatial.sourceforge.net/dokuwiki/lib/plugins/openlayersmap/icons/index.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/'' ((eg. http://dokuwikispatial.sourceforge.net/dokuwiki/lib/plugins/openlayersmap/icons/index.php))
 Nice icons are available from: Nice icons are available from:
 +  * https://mapicons.mapsmarker.com/
 +  * https://labs.mapbox.com/maki-icons/
   * http://www.sjjb.co.uk/mapicons/contactsheet/   * http://www.sjjb.co.uk/mapicons/contactsheet/
-  * http://code.google.com/p/google-maps-icons/ 
   * http://projects.opengeo.org/geosilk   * http://projects.opengeo.org/geosilk
-  * http://www.gpsdrive.de/development/map-icons/overview.en.shtml 
  
 ===== Demonstration ===== ===== Demonstration =====
-A small site with the plugin showing various samples is available on [[http://dokuwikispatial.sourceforge.net/dokuwiki/doku.php|SourceForge]]+A small site with the plugin showing various samples is available on [[https://dokuwikispatial.sourceforge.io/dokuwiki/doku.php|SourceForge]]
  
 The plugin is used on the following pages/sites: The plugin is used on the following pages/sites:
-  * http://dokuwikispatial.sourceforge.net/dokuwiki/openlayersmap various live samples of the development version +  * https://dokuwikispatial.sourceforge.io/dokuwiki/doku.php/openlayersmap/start various live samples of the development version 
-  * http://wild-water.nl/dokuwiki/ +  * https://wild-water.nl/dokuwiki/beschrijvingen/belgie/salm#kaart (and many other pages) 
-  * http://www.westwijkinfo.nl/dokuwiki/doku.php?id=sssst_-_geheime_plekjes_in_de_wijk +  * http://www.vegan-in-halle.de/wiki/doku.php?id=karte 
-  * http://www.hooidonksekanoclub.nl/dokuwiki/informatie/routebeschrijving +  * [[https://www.heemkundekringblariacum.nl/p/beeldbank/map_overview_1920-1929]] \\ => Links to an OpenStreetMap page on the website of //Heemkundekring Blariacum//, an association for the preservation and digitalization of local history in the Netherlands. It shows several pointers with a page title and direct link to that page showing photo's of the 1920's at that location. Other periods can be found at [[https://www.heemkundekringblariacum.nl/p/beeldbank/geografisch_zoeken]].
-  * http://www.hotspot-muenchen.de/doku.php?id=hotspot_karte+
  
 ===== Syntax/ Usage ===== ===== Syntax/ Usage =====
 <code> <code>
-<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">+<olmap id="olMap" width="600px" height="400px" lat="52.0" lon="5.1" zoom="12" controls="1" baselyr="OpenStreetMap" gpxfile=":playground:hardlopen_gpx.gpx" geojsonfile=":playground:test.gsojson" kmlfile=":playground:mtb.kml" summary="This map shows a gpx trace, a kml trace and a dot">
 52.1,5.1,60,.8,marker-green.png,Just a spot 52.1,5.1,60,.8,marker-green.png,Just a spot
 </olmap> </olmap>
 </code> </code>
  
-  * id - div id of the map (this needs to be a valid CSS identifier as well as a valid JavaScript variable) +  * **id** The identifier of the map (this needs to be a valid [[http://www.w3.org/TR/CSS21/syndata.html#characters|CSS]]/[[http://www.w3.org/TR/html4/types.html#type-id|XHTML]] identifier as well as a [[http://mathiasbynens.be/notes/javascript-identifiers|valid JavaScript variable]]eg. ''olmap'' and must be unique on the page. 
-  * width ? 999px (e.g. 500px) width of the Google map, default is 400px. +  * **width** The width of the map, default is ''400px''
-  * height ? 999px (e.g. 500px) height of the Google map, default is 300px. +  * **height** The height of the map, default is ''300px''
-  * zoom ? integer, zoom level, default value 5. Valid values depend on the map and location. +  * **zoom** The zoom level, default value ''12''. Valid values depend on the map and location and must be integer
-  * controls ? values on | off. default on. Whether or not to show controls for zooming and panning on the map. +  * **controls** Whether or not to show controls for zooming and panning on the map. Valid values are ''on'' and ''off'', default ''on''
-  * toolbar ? values 1 | 0. default 1 (on). defines if the toolbar is built +  * **lat** The latitude of map centre in decimal degrees ([[WP>WGS84]]), negative values are south of the equator, valid values range from ''-90.0'' to ''90.0''
-  * statusbar ? values 1 | 0. default 1 (on)defines if the statusbar is built +  * **lon** The longitude of map centre in decimal degrees ([[WP>WGS84]]), negative values are west of Greenwich, valid values range from ''-180.0'' to ''180.0''
-  * poihoverstyle - values 1 | 0. default 1 (on). specifies POI feature select behaviour (hover or click) +  * **baselyr** The basemap layer that is shown when the map opens. Valid values are: ''OSM'', ''transport'', ''landscape'', ''outdoors'', ''cycle map'', ''toner'', ''terrain'', ''bing road'', ''bing sat'' or ''bing hybrid''(note that for some of the non-open maps you need the API key/URL as well) 
-  * lat ? values -90.0 - 90.0; latitude of map centre, negative values are south. (WGS84) +  * **gpxfile** any [[WP>GPS_eXchange_Format|GPX]] file, use the media manager to retrieve the location 
-  * lon ? values -180.0 - 180.0longitude of map centre, negative values are west. (WGS84) +  * **kmlfile** any [[WP>KML]] file, use the media manager to retrieve the location 
-  * baselyr ? values OpenStreetMap | t@h | cloudmade map cycle map | google relief | google sat | google hybrid | google normal | yahoo | ve (note that for the non-open maps you need the key/URL as well) +  * **geojsonfile** any [[WP>GeoJSON]] file, use the media manager to retrieve the location 
-  * gpxfile any GPX file, use the media manager to retrieve the location +  * **summary** A description of the map.
-  * kmlfile any KML file, use the media manager to retrieve the location+
  
 +If the values for latitude and longitude differ from the default values lat="50.0" lon="5.1" a Geotag is added to the metadata of the page.
 +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:
-<code>lat, lon, rotationangle, opacity, image, textforpopup</code> +<code>lat, lon, rotation-angle, opacity, image, textforpopup</code> 
-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 [[openlayersmap#discussion]] below for enhanced sample)+The map will zoom in to the extent of the POI which must be given in decimal degrees according to [[WP>EPSG:4326]] (most GPS use this). The text for the popup can be formatted using regular DokuWiki [[:wiki:syntax|syntax]] and may contain links as well. (see [[openlayersmap#discussion]] below or the [[http://dokuwikispatial.sourceforge.net/dokuwiki/openlayersmap:start|sample website]] for more examples)
  
-===== Known Limitations ===== +===== Overlays ===== 
-This is currently a work in progress; please check the [[http://sourceforge.net/tracker2/?group_id=239475|Tracker]] on the SourceForge.net site.+==== XYZ (tiled) ====
  
-  * there are some issues when the wiki site runs on HTTPS because all of the mapservices used (OSMGoogle,Yahooetc) run on plain HTTP, this will present your viewers with warning messages(cross domain warning)+To add a XYZ style (eg. OpenStreetMap tiling scheme) layer to a map use the following syntax:  
 +  <olmap_osmlayer id="olmap" name="piste" url="https://tiles.openpistemap.org/nocontours/{z}/{x}/{y}.png" visible="true" attribution="OpenPisteMap" baselayer="true"></olmap_osmlayer> 
 + 
 +Where ''id'' is the id of the openlayersmap, ''name'' is the name of this map layer, ''url'' is the XYZ layer url, ''visible'' defines whether the layer is visible when the layer is added to the map, ''attribution'' is displayed in the attribution area of the map frame and ''baselayer'' can be set to ''true'' to add the layer as a base map. You can find some providers at: [[https://wiki.openstreetmap.org/wiki/Raster_tile_providers|Raster tile providers]] 
 + 
 +==== WMS ==== 
 +To add a WMS layer to a map use the following syntax: 
 +  <olmap_wmslayer id="olmap" name="rain" url="http://openweathermap.org/t/tile.cgi?SERVICE=WMS" attribution="OpenWeatherMap" visible="true" layers="GLBETA_PR" baselayer="false"></olmap_wmslayer> 
 + 
 +Where ''id'' is the id of the openlayersmap''name'' is the name of this map layer''url'' is the WMS layer url''layers'' are the layers from the map service that you want displayed''visible'' defines whether the layer is visible when the layer is added to the map, ''attribution'' is displayed in the attribution area of the map frame and ''baselayer'' can be set to ''true'' to add the layer as a base map. 
 + 
 +==== ArcGIS REST ==== 
 +To add an ArcGIS REST image layer to a map use the following syntax: 
 +  <olmap_agslayer id="olmap" name="Paddle todat" url="https://geoservices2.wallonie.be/arcgis/rest/services/APP_KAYAK/KAYAK/MapServer" attribution="kayak.environnement.wallonie.be" visible="true" layers="show:0,1,2,3,4,7" baselayer="false"></olmap_agslayer> 
 + 
 +Where ''id'' is the id of the openlayersmap, ''name'' is the name of this map layer, ''url'' is the WMS layer url, ''layers'' are the layers from the map service that you want displayed, ''visible'' defines whether the layer is visible when the layer is added to the map, ''attribution'' is displayed in the attribution area of the map frame and ''baselayer'' can be set to ''true'' to add the layer as a base map. 
 + 
 +==== WTMS ==== 
 +To add a WTMS layer to a map use the following syntax: 
 +  <olmap_wmtslayer id="olmap" name="geolandbasemap" url="https://mapsneu.wien.gv.at/basemapneu/1.0.0/WMTSCapabilities.xml" attribution="basemap.at" visible="true" layer="geolandbasemap" matrixSet=google3857 baselayer="true"></olmap_wmtslayer> 
 + 
 +Where ''id'' is the id of the openlayersmap, ''name'' is the name of this map layer, ''url'' is the WMTS capabilities url, ''layer'' is the layer from the map service that you want displayed, ''visible'' defines whether the layer is visible when the layer is added to the map, ''attribution'' is displayed in the attribution area of the map frame and ''baselayer'' can be set to ''true'' to add the layer as a base map.
      
-===== Discussion ===== +===== Discussion & FAQ ===== 
-The Popup looks weird in my wiki, is this a bug or an error on my side? i'using the latest snapshothere's an example: [[http://imageshack.us/photo/my-images/31/bildschirmfoto20120130u.png/]] +I'trying to build a Wiki where addresses of venues, rehearsal studios, recording studios, supply stores etcfor musicians are collected and this plugin is perfect for thatEmbedding OSM works beautifully, but with my newly generated google API key I see an error in the JavaScript Console saying that API versions up to 3.27 have been retired and the request should be sent to version 3.28 instead. I think the new version accepts an additional google security key along with the API keyAre you planning to adapt the openlayersmap extension to the new API? 
-> keep up the good work +>> Google maps will not be supporteddue to licencing requirements
-> -Jonas +
->> that is weird, I've never seen that beforeDid 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. +
->> --- [[user>mprins|Mark]] //2012/01/31 13:54// +
->>> i tried to purge everything but the popup still looks the same way.  +
->>>> I am clueless on this, and don't see a way to help or reproduce without access to you website. +
->>>>> Here'the site i embedded th emap on: http://gestalterwiki.de/druckereien/uebersicht/wuerzburg +
->>>>> -Jonas +
->>>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. +
->>> -Jonas +
->>>> the popup is a known issue, Google changed their API and licensesee: http://lists.osgeo.org/pipermail/openlayers-users/2012-February/023925.html I will fix this for the upcoming release.+
  
-Jason: I refreshed snapshot2 to work around the google maps popup.  
-As for the other thing, I'm still looking at it, I have some observations though, it seems your website is not being rendererd as xhtml 4 (dokuwiki's built-in) but as html 5, which is not a renderer I have tested  (or can/will). I assume that one of the other javascript or css frameworks on your site is resetting or overriding part of the css that is used to render the openlayersmap popup (which has a sprite as background image), I checked the sample page and the html code looks fine for the popup. 
-Maybe you could try loading the typekit css before loading the dokuwiki css? I also see Less and Modernizr, they tend to modify css quite a bit as well. 
  
-This is caused by ''img { max-width: 100%; }'' and the map using a weird sprite techniqueRather than deleting the max-width (which is usually a good thing)I would reset that only within the plugin container: <code> +I'm trying to disable "autoZoomMap" option, but it seems do not work. How to use it? When I put some distant POIs, the map still zooms to include all of themThere is no difference if I use single POIs or kml/geoJSON file. I need to use one geoJSON file for all mapsbut each single map should show only required part of areaPlease help, how to fix it? 
-.olContainer img { +>> It is not possible to set an area of interest
-    max-width: none; +
-+
-</code--- [[user>ach|Anika Henke]] //2012/02/17 01:16//+
  
-> 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. 
  
->> [[user>mprins|Mark]] you're welcome :-)there are currently no provisions to parse wiki text or URLs (link tags works e.g. <code>[[http://test.com|test]]</code> you probably want to set poihoverstyle="0"). see sample below, it does links, line breaks an formatting. +> 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:spatialhelper]] which produces a KML file that can be loaded 
 + 
 + 
 +> 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://dynmap.ruslotro.com/
 +>> 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&click" is necessary.\\ Greetings Jos 
 +>> this may be possible in the future 
 + 
 + 
 +> 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. 
 +>> There are currently no specific provisions to parse wiki text or URLs (link tags works e.g. <code>[[http://test.com|test]]</code> you probably want to set poihoverstyle="0"). see sample below, it does links, line breaks an formatting. 
 >> <code> >> <code>
 <olmap id="olmap" width="600px" height="400px" lat="50.0" lon="5.1" zoom="8" statusbar="1" toolbar="1" controls="1" poihoverstyle="0"> <olmap id="olmap" width="600px" height="400px" lat="50.0" lon="5.1" zoom="8" statusbar="1" toolbar="1" controls="1" poihoverstyle="0">
Line 165: Line 162:
 </olmap> </olmap>
 </code> </code>
->>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't be too complex ? This would make for a powerful way of displaying multiple real-time coordinates. 
  
 +>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.  >> this is unlikely to happen; see [[https://sourceforge.net/tracker/?func=detail&aid=2928736&group_id=239475&atid=1110189]] why. 
->> --- [[user>mprins|Mark]] 
  
-><code><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></code> 
->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 
  
->> <del> I suspect this is the same issue as described in [[http://sourceforge.net/tracker/?func=detail&aid=2896534&group_id=239475&atid=1110186|2896534]]. The case of the layername is converted to lowercase (the "G" ends up as a "g") causing this behaviour. </del>((this has been fixed)) 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!? --[[mc.prins@gmail.com|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 YouI found the mad add-on: http://www.inetsoftware.de/other-products/dokuwiki-plugins/miniajax it is used by ImageFlow+Hi to all!
  
->>>>guess miniajax redefines the builtin "$"+like this plugin very much, but there was one thing that was not perfect for my needs. The width of the map must be specified absolutely in pixel. The map is much too wide on my mobile phone. For that I stumbled through the code of the plugin (don't call me an expert :-)) and tried to find out what to do.
  
->>> But now the zoom is always set to 18see  http://www.jan-hendrikbade.de/doku.php/playground:playground+Here's my solution, which will work now for my desktop and my mobile phone. At first a sample of the "new" insert syntax. 
 + 
 +<code> 
 +<olmap id="olmap" width="auto" height="auto" 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> 
 +</code> 
 + 
 +The width will be calculated if ''auto'' is specified for it. And if ''auto'' is also specified for the height, then the height will be 2/3 of the width. 
 + 
 +I've done my work only in the file ''script.js'' of the plugin. I've added the following function to the file (which I've found using Google). 
 + 
 +<code javascript> 
 +Element.prototype.getElementWidth = function() { 
 +   if (typeof this.clip !== "undefined") { 
 +   return this.clip.width; 
 +   } else { 
 +   if (this.style.pixelWidth) { 
 + return this.style.pixelWidth; 
 +   } else { 
 + return this.offsetWidth; 
 +   } 
 +   } 
 +}; 
 +</code> 
 + 
 +And then I've made the following extension to the method ''createMap''. In the following sample there's some of the original code at the beginning and the end so you can find the position where to insert the new lines. 
 + 
 +<code javascript> 
 +// find map element location 
 +var cleartag = document.getElementById(mapOpts.id + '-clearer'); 
 +if (cleartag === null) { 
 + return; 
 +
 + 
 +// ====== START OF INSERTED CODE ====== 
 + 
 +// calculate dynamic width and height 
 +var dynamicWidth = 0; 
 +if (mapOpts.width == 'auto') { 
 + var contentWidth = 0; 
 + var asideWidth = 0; 
 + var elementContent = document.getElementById('dokuwiki__content'); 
 + if (elementContent === null) { 
 + } else { 
 + contentWidth = elementContent.getElementWidth(); 
 +
 + var elementAside = document.getElementById('dokuwiki__aside'); 
 + if (elementAside === null) { 
 + } else { 
 + asideWidth = elementAside.getElementWidth(); 
 +
 + if (contentWidth > asideWidth) { 
 + dynamicWidth = contentWidth - asideWidth - 60; 
 + } else { 
 + dynamicWidth = contentWidth - 20; 
 +
 + if (dynamicWidth > 0) { 
 + mapOpts.width = dynamicWidth + 'px'; 
 + } else { 
 + mapOpts.width = '500px'; 
 +
 +
 +if (mapOpts.height == 'auto') { 
 + if (dynamicWidth > 0) { 
 + var dynamicHeight = dynamicWidth * 0.66; 
 + mapOpts.height = dynamicHeight + 'px'; 
 + } else { 
 + mapOpts.height = '500px'; 
 +
 +
 + 
 +// ====== END OF INSERTED CODE ====== 
 + 
 +// create map element and add to document 
 +var fragment = olCreateMaptag(mapOpts.id, mapOpts.width, mapOpts.height); 
 +cleartag.parentNode.insertBefore(fragment, cleartag); 
 +</code> 
 + 
 +Well, as I've mentioned above: It works for me. The hardcoded values (60, 20) are not nice, really. And generally I do think that there could be a better solution. Maybe someone feels inspirated now to make it better (and to make me happy). 
 + 
 +[[user>wkaurzinek|Werner]] 
 +>> @Werner this patch will give you problem as the width is also used for the fallback image and 'auto' is not a valid value for the width attribute of an ''img'' element 
 + 
 +>I just installed this wonderful plugin to embed an OpenStreetMap to my website. HoweverI 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 
 + 
 + 
 +> 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 
 + 
 + 
 +> 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> var markers = new OpenLayers.Layer.Vector("POI",
 +            styleMap : new OpenLayers.StyleMap({ </code> section 
 +\\ and change   
 +<code javascript>fontFamily "monospace", 
 +                    fontSize : "16px", </code> to anything you like 
 +                     
 + 
 +---- 
 + 
 +Windows Defender reacts to the archive saying thereis an Trojan:Script/Sabsik.TE.A!ml inside. 
 + --- [[user>Antiokh|Antiokh]] //2024-10-27 02:18// 
 + 
 +----
  
->>>>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.  +Can it support getting points from sqlite database made with [[struct|struct Plugin]]? 
-<del>>>>>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: [[http://sourceforge.net/tracker/?func=detail&aid=2949057&group_id=239475&atid=1110189|2949057]]</del> This has now been fixed properly+ --- [[user>Antiokh|Antiokh]] //2024-11-14 14:17//
plugin/openlayersmap.1329438681.txt.gz · Last modified: by ach

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