Google Map3 プラグイン
互換性のある DokuWiki バージョン
2009-12-25c, 2010-11-07, 2011-05-26, lemmings, anteater, rincewind, angua
この拡張は二年以上更新されていません。もはや維持管理や対応がされておらず、互換性に問題がある可能性があります。
This extension is not in the 'plugin' or 'template' namespace and is therefore ignored.
インストール
- プラグイン管理と上記ダウンロードURLを使用してプラグインをインストールする。ダウンロードURLはプラグインの最新バージョンをリンクしている。
説明
このプラグインはChristopher Smithのgooglemaps プラグインを新しい Google Maps JavaScript API V3 によって再構築したものです。
新機能:
- Google Map API キーは不要
- 選択された場所と地図中心の座標を示すヘルパー
- マーカーの small singature と wiki-description の分離
- JavaScript API の非同期の読み込み
- V2 より高速に動作する、新しい Google Maps JavaScript API V3
- 一回のマウスクリックでの移動
構文
googlemaps プラグインとは少し異なる構文です:
<googlemap3 width="number" height="number" lat="number" lng="number"> latitude, longtitude, short signature; long desctiption latitude, longtitude, short signature; long desctiption with {{:some:image.jpg?300|with image}} and [[:page:link| link to page]] latitude, longtitude, short signature without longdescription; latitude, longtitude,;longdescription without signature </googlemap3>
マーカーの長い description は、改行なしの一行で記載する必要があります。
signature でカンマ区切りを使用したい場合、区切りを明確にするためにセミコロンを使用してください。 例:“Anchho Mountain, height 2696m.”
座標ヘルパーを非表示にできます:
<googlemap3 width="number" height="number" helper="off" >
デフォルトは表示です。
デモ
設定
引数
googlemaps プラグインとの変更点は太字表記。
- width — 999[css length unit*](例 500px, 50%)Google マップの幅。デフォルトは “400px”。
- height — 999[css length unit*](例 500px, 30em)Google マップの高さ。デフォルトは “300px”。
- type — 値: map | normal | hybrid | satellite | terrain。デフォルトは map (normal)。
- lat — 値: -90.0 〜 90.0。地図中心の緯度。負の値は南緯。
- lng — 値: -180.0 〜 180.0。地図中心の経度。負の値は西経。
- zoom — 整数。ズームレベル。デフォルト値は 8。 有効値は、type や場所によって異なる。
- controls — 値 on | off。デフォルトは on。 ズームや移動コントロールを地図上に表示するかどうか。
- kml — 値: off | [URL of kml file].
- helper — 値 on | off
設定 URL
JavaScript API を読み込むデフォルトのURLは
http://maps.google.com/maps/api/js?sensor=false
凍結バージョンや位置情報取得を使用する場合、
http://maps.google.com/maps/api/js?v=3.3&sensor=true
詳細はGoogle Maps JavaScript API V3 基本を参照してください。
既知のバグと問題
- The plugin page tells me: getInfo() not implemented in action_plugin_googlemap3 and
C:\xampp\htdocs\dokuwiki/lib/plugins//googlemap3/plugin.info.txt
not found.
- No google map appears on my page.
IE7上で動作しない
I'm running dokuwiki 'Adora Belle' (fresh default install). The map shows up in Firefox but not in IE7. The page status bar says 'Done, but with errors on page'. Details says 'Error: array 'googleMapArray' is undefined'