Extension:MultiMaps/zh

This page is a translated version of the page Extension:MultiMaps and the translation is 0% complete.
MediaWiki扩展手册
MultiMaps
发行状态: 不再維護
实现 解析器扩展
描述 Allows users to display maps and coordinate data using multiple mapping services
作者 Pavel Astakhov (pastakhov留言)
最新版本 0.7.3 (2019-06-15)
MediaWiki
PHP 5.3+
数据库更改
许可协议 GNU通用公眾授權條款2.0或更新版本
下載
示例 osmwiki:Wiki:Maps
  • $egMultiMaps_AllowGeocoderTests
  • $egMultiMaps_CoordinatesSeparator
  • $egMultiMaps_DefaultZoom
  • $egMultiMaps_DelimiterParam
  • $egMultiMaps_DelimiterParam
  • $egMultiMaps_GoogleApiKey
  • $egMultiMaps_Height
  • $egMultiMaps_IconAllowFromDirectory
  • $egMultiMaps_IconPath
  • $egMultiMaps_MapServices
  • $egMultiMaps_SeparatorItems
  • $egMultiMaps_Width
  • $egMultiMaps_YandexApiKey
multimaps
季度下載量 9 (Ranked 130th)
翻译MultiMaps扩展
問題 开启的任务 · 报告错误

The MultiMaps extension allows users to display maps and coordinate data using multiple mapping services. Currently available maps are openstreetmap (by service leaflet), google, yandex and they can display markers, lines, polygons, rectangles, circles. Starting in version 0.7.3, it is also possible to assign an additional URL to a service.

If possible, the parameter syntax will be compatible with 地圖 extension.

主页面: Documentation

To quickly display a map with all-default settings at position N10° and E10°, write:

{{#multimaps: 10, 10
}}

Example

Example available at:

Installation

  • 下载文件,并将解压后的MultiMaps文件夹移动到extensions/目录中。
    开发者和代码贡献人员应从Git安装扩展,输入:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MultiMaps
  • 将下列代码放置在您的LocalSettings.php 的底部:
    require_once "$IP/extensions/MultiMaps/MultiMaps.php";
    
  • Yes 完成 – 在您的wiki上导航至Special:Version,以验证已成功安装扩展。

Configuration

Configuration settings (defaults defined in Settings.php)
Parameter Default Comment
$egMultiMaps_AllowGeocoderTests false
$egMultiMaps_MapServices
[
 'Leaflet',
 'Google',
 'Yandex',
 'Wikimedia' => [
  'service' => 'Leaflet',
  'attribution' => '<a href="https://wikimediafoundation.org/wiki/Maps_Terms_of_Use">Wikimedia maps</a> | Map data &copy; <a href="osm.org/copyright">OpenStreetMap contributors</a>',
  'source' => 'https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png',
 ]
];
lists all map services provided to the wiki users, first entry is default

Since version 0.7.3 it is possible to specify different tile addresses and attribution notices and link them to a service as seen with Wikimedia. The source attribute is provided in Leaflet notation here. For TMS sources, use {-y}.

$egMultiMaps_DefaultZoom 14 default zoom level of map displays, can be configured individually for each map using zoom parameter
$egMultiMaps_SeparatorItems ';'
$egMultiMaps_DelimiterParam '~'
$egMultiMaps_OptionsSeparator ',' delimiter between latitude and longitude
$egMultiMaps_CoordinatesSeparator ':' Geographic coordinates can be a delimited list of values ​​specified in the variable.
$egMultiMaps_Width 'auto' default width of map displays, can be configured individually for each map using width parameter
$egMultiMaps_Height '350px' default height of map displays, can be configured individually for each map using height parameter
$egMultiMaps_IconAllowFromDirectory false If true, allow specify an icon for the marker from the directory
$egMultiMaps_IconPath "$wgScriptPath/mapicons" provide a source for map icons using a URL

An overview of OpenStreetMap-based map styles is located at osmwiki:Tile servers. Please always remember to review their usage policy before using.

See also