Extension:YandexMaps

From MediaWiki.org
Jump to navigation Jump to search
MediaWiki extensions manual
OOjs UI icon advanced.svg
YandexMaps
Release status: unmaintained
Implementation Parser function
Description Creates Yandex maps
Author(s) Valerian Ivashenko
Latest version 2.0.8 (2013-08-12)
MediaWiki 1.16+
License No license specified
Download see here
Parameters
$wgYandexMapAPIVer, $wgYandexMapServer, $wgYandexMapAPIKey, $wgYandexMapMaxZoom
Translate the YandexMaps extension if it is available at translatewiki.net
Check usage and version matrix.

The YandexMaps extension allows you to create easily Yandex maps with a marked balloon. The descriptions of the placemarked maps are all parser functions enabling geocoding. Yandex maps are allowed to be used for public sites.

Usage[edit]

Map Example[edit]

{{#yandexmap:Москва|100|200|cdzMB}}

Only fourth attribute is optional:

  • location
  • width
  • height
  • map options:
    • c - enable zoom on mouse double click
    • d - enable mouse map dragging
    • r - enable map ruler
    • z - enable mouse wheel scroll zoom
    • h - enable hot keys (API 1.1)
    • m - enable mouse left button map magnification
    • b - enable mouse right button map magnification
    • M - switch to map mode
    • H - switch to hybrid map mode
    • S - switch to satellite mode
    • U - switch to public map mode (API 2.0)
    • I - switch to public hybrid map mode (API 2.0)
    • P - show placemark
    • B - show balloon

Installation[edit]

  1. Create a directory called YandexMaps in your extensions directory
  2. Download files from the following archive into your YandexMaps directory

Parameters[edit]

You should add your Yandex Maps API key and server as parameters within LocalSettings.php just prior to the require_once

$wgYandexMapAPIVer = 2.0;
$wgYandexMapServer = 'http://api-maps.yandex.ru/2.0/?load=package.standard&coordorder=longlat&lang=ru-RU';
$wgYandexMapMaxZoom = 23;

or

$wgYandexMapServer = 'http://api-maps.yandex.ru/1.1/index.xml?';
$wgYandexMapAPIKey = 'key=YOUR1OWN2YANDEX3MAP4API5KEY==';

While you don't provide an API 1.1 key, extension could not be run.

Changes to LocalSettings.php[edit]

require_once("$IP/extensions/YandexMaps/YandexMaps.php");

Revision History[edit]

2.0.8 (12/08/2013)
Yandex Maps API 2.0 & map type selector support was added.
1.8.2 (06/27/2011)
Map options support was added.
0.9.1 (06/24/2011)
Initial release, supports several maps on a page.

External links[edit]

See also[edit]

  • Maps Provides the ability to display coordinate data on maps and allows users to geocode addresses.
  • MultiMaps Allows users to display maps and coordinate data using multiple mapping services.