Extension:YahooMaps
From MediaWiki.org
|
Release status: stable |
|||
|---|---|---|---|
| Implementation | Tag | ||
| Description | Create Yahoo maps with wikitext markers | ||
| Author(s) | Chris Reigrut, Key Bank / Key Equipment Finance | ||
| Last Version | 1.0.0 (07/30/2008) | ||
| MediaWiki | 1.11 - 1.13 | ||
| License | No license specified | ||
| Download | Extension:YahooMaps#Installation | ||
|
|||
|
check usage (experimental) |
|||
Contents |
[edit] What can this extension do?
This extension allows you to easily create Yahoo maps and markers. The extended descriptions of the markers are all wikitext, enabling links, images, etc. Yahoo maps (unlike Google maps) are allowed to be used for both private (i.e. intranet) and public sites. Additionally, it provides the ability to place a small geocoding tool that will convert addresses to marker descriptions.
[edit] Usage
[edit] Map Example
<yahoomap style="height: 450px; width: 800px;" lat="27.40419601" lon="-100.0081949" zoom="16"> 39.945337 | -105.16412 | KEF | Superior, CO<br />''Home of [http://www.kefonline.com Key Equipment Finance]'' </yahoomap>
All tag attributes are optional, and default to:
- style =
- zoom = 15
- lat = 37.4041960114344
- lon = -100.008194923401
(basically, centered on the US)
[edit] Geocoder Example
<yahoogeocoder />
[edit] Installation
- Create a directory called YahooMaps in your extensions directory
- Download the following 4 files into your YahooMaps directory
- YahooMaps.php
- yproxy.php
- xmlsax.js and xmlw3cdom.js from http://sourceforge.net/projects/xmljs
Note: If you don't need the GeoCoder functionality, you only need the YahooMaps.php file.
[edit] Parameters
You should add your Yahoo Maps application ID as a parameter within LocalSettings.php just prior to the require_once
$wgYahooMapsAppId = 'YourYahooApplicationIdGoesHere';
If you don't have an application ID, it will default to the YahooDemo id.
[edit] Changes to LocalSettings.php
require_once("$IP/extensions/YahooMaps/YahooMaps.php");
[edit] Other Issues
[edit] Markers "jump" in IE
There is an issue with Yahoo Maps in the default Monobook skin within Internet Explorer! IE has layout issues that Monobook attempts to solve in skins/common/IEFixes.js. Unfortunately, the solution is a bit overzealous, and will cause your map to display incorrectly--it will start out ok, but after about a second all markers will be offset downward by some amount proportional to n-1 (where n is the marker number). To fix this, change the following:
function setrelative (nodes) { var i = 0; while (i < nodes.length) { if(((nodes[i].style.float && nodes[i].style.float != ('none') || (nodes[i].align && nodes[i].align != ('none'))) && (!nodes[i].style.position || nodes[i].style.position != 'relative'))) { nodes[i].style.position = 'relative'; } i++; } }
to:
function setrelative (nodes) { var i = 0; while (i < nodes.length) { if(((nodes[i].style.float && nodes[i].style.float != ('none') || (nodes[i].align && nodes[i].align != ('none'))) && (!nodes[i].style.position || nodes[i].style.position != 'relative'))) { if (nodes[i].id.substring(7,0) != 'ymarker') { nodes[i].style.position = 'relative'; } } i++; } }
[edit] Popups have a white background
Having just installed MediaWiki 1.11, I'm noticing that the markers tend to have a boxy, white background that wasn't present in 1.8 (at least they do in Monobook). To solve this, add the following to your wiki's MediaWiki:Common.css:
.yahoomap table { background-color: transparent; }
[edit] Revision History
- 1.0.0 (07/30/2008)
- Added minor change to handle the encoding of inline scripts, and marked stable.
- 0.2.0 (11/09/2007)
- Added geocoder, as well as some minor bug fixes.
- 0.1.0 (06/01/2007)
- Initial release, marked beta.
[edit] External links
[edit] See also
- Maps Provides the ability to display coordinate data on maps and allows users to geocode addresses.
- Semantic Maps Provides the ability to add, view and edit coordinate data stored through the Semantic MediaWiki extension.
[edit] Sites using this extension
Please add your site (and a link if it is public) to the list! Thanks!
- Key National Finance WiKey (internal intranet)