Extension:MultiMaps

From mediawiki.org
This page is a translated version of the page Extension:MultiMaps and the translation is 100% complete.
MediaWiki 拡張機能マニュアル
MultiMaps
リリースの状態: 保守されていない
実装 パーサー拡張機能
説明 この拡張機能を使うと、複数のマッピングサービスを使用して地図や座標データを表示できるようになります。
作者 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
Quarterly downloads 8 (Ranked 136th)
MultiMaps 拡張機能の翻訳にご協力ください
問題点 未解決のタスク · バグを報告

MultiMaps 拡張機能を使うことで、複数のマッピングサービスを利用して地図や座標データを表示できるようになります。 現在のところ使用可能な地図サービスは OpenStreetMap (Leaflet サービス使用)、GoogleYandex です。また地図上にはマーカーやライン、多角形、矩形、円などを表示することもできます。 バージョン 0.7.3 からは新たに追加の URL を割り当てることも可能になりました。

パラメータシンタックスは Maps 拡張機能と互換性があります。

説明文書

メインのページ: Documentation

とにかくデフォルト設定で、北緯 10°東経 10°地点の地図の表示をするためには、以下のように書きます。

{{#multimaps: 10, 10
}}

使用例:

インストール

  • ダウンロードして、ファイルをextensions/フォルダー内のMultiMapsという名前のディレクトリ内に配置します。
    開発者とコード寄稿者は、上記の代わりに以下を使用してGitからインストールします:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MultiMaps
  • 以下のコードを LocalSettings.php ファイルの末尾に追加します:
    require_once "$IP/extensions/MultiMaps/MultiMaps.php";
    
  • Yes 完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。

設定

設定一覧 (既定値は Settings.php で定義)
パラメータ デフォルト コメント
$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

OpenStreetMap-based のマップスタイルの概要は osmwiki:Tile servers にあります。 使用する際には利用ポリシーを確認するのを忘れないようにしてください。

関連項目