ユーザ用ツール

サイト用ツール


dokuwiki_osm

DokuWiki から OSM を使ってみる

DokuWiki には,OpenStreetMap (OSM) の地図を閲覧できるプラグインがありますので,それを使って DokuWiki から OSM 地図を閲覧できる様にしてみます.

インストールするプラグイン

以下のプラグインをインストールします.

OSM 地図を閲覧するには

プラグインがインストールできると,文書の作成または編集をすると,編集ボックス上に,ボタンが追加されているはずです. そのボタンを押すと,以下の様なコードが挿入されます.

<olmap id="olMapOne" width="550px" height="450px" lat="50.0" lon="5.1" zoom="12" statusbar="1" controls="1" poihoverstyle="0" baselyr="OpenStreetMap" gpxfile="" kmlfile="" geojsonfile="" summary="" >
~~ Plugin olmap help.
~~ Required in the above tag are values for: id (unique on this page), width, heigth.
~~ Also you will want to enter zoomlevel and lat, lon values that make sense for where you want the map to start.

~~ Below is an example of a POI, you can add as many as you want. ~~ More examples: http://dokuwiki.org/plugin:openlayersmap 
50.0117,5.1287,-90,.8,marker-green.png,Pont de Barbouillons; Daverdisse \\ external link: [[http://test.com|test.com]] \\ internal link: [[::start]]\\ **DW Formatting** 
</olmap>

これをそのまま保存すると,まずは取り敢えずOSM地図が閲覧できるはずです.

使い方は,読めば感覚的にも分かるかなと思います(汗.

gpx を読み込んでみる

plugin:openlayersmap は,gpx や kml のオーバーレイが出来そうですので,gpx を読み込ませてみたいと思います.

オーバーレイで描画する gpx ファイルは,DokuWiki のファイルアップロードを使いますが,DokuWiki 側で mime type を設定しないままだと,*.gpx や *.kml の拡張子を持つファイルはアップロードを受け付けませんので,mime type を設定します.

DokuWiki の mime type は,DokuWiki をインストールしたディレクトリの conf/mime.conf で決定しているようです. conf/mime.conf を読むと,冒頭に以下の記述があることから,conf/mime.local.conf を新規作成し,そのファイルで mime type を記載するのが良さそうです.

conf/mime.conf
# Allowed uploadable file extensions and mimetypes are defined here.
# To extend this file it is recommended to create a mime.local.conf

上記をふまえて,conf/mime.local.conf に,gpx と kml の mime type を設定します.

conf/mime.local.conf
gpx application/gpx+xml
kml application/vnd.google-earth.kml+xml

この後,DokuWiki のメディアマネージャーから,gpx や kml ファイルのアップロードが行える様になるはずです.

その後,gpxfile=“” に,アップロードした gpx ファイル名を指定すると,以下の様に GPX オーバーレイ描画された OSM 地図が閲覧できるはずです.

operating instructions

Various functions are available as part of the map.

mouse/touch operation
  • moving by grabbing the map with a mouse-click you can move the map around
  • overview map using the + button in the bottom right of the map you can expand an overview map
  • zooming in and out using the + and - buttons in the top left of the map you can obtain more or less detail in the map
  • switching themes or maps clicking on the ≡ icon on the right-hand side of the map you can view and select available maps and themes
  • retrieving information the map may contain elements that contain more information, by clicking these a popup will show this information
  • fullscreen display using the ✈ button the map can be maximized to fullscreen display, use the ✕ button to return to page display.
keyboard operation

Keyboard operation becomes available after activating the map using the tab key (the map will show a focus indicator ring).

  • moving using the arrow keys you can move the map
  • overview map using the + button in the bottom right of the map you can expand an overview map
  • zooming in and out using the + and - buttons in the top left of the map or by using the + and - keys you can obtain more or less detail in the map
  • switching themes or maps clicking on the ≡ icon on the right-hand side of the map you can view and select available maps and themes
  • retrieving information the map may contain elements that contain more information, using the i key you can activate a cursor that may be moved using the arrow keys, pressing the enter will execute an information retrieval. press the i or the escape key to return to navigation mode
  • fullscreen display using the ✈ button the map can be maximized to fullscreen display, use the ✕ button to return to page display.

It's possible that some of the functions or buttons describe above have been disabled by the page author or the administrator

 

Points of Interest
id symbol latitude longitude description
GPX file GPX track GPX track: gpslog/gpx/sakai log
dokuwiki_osm.txt · 最終更新: 2014-12-21 20:06 by tosihisa@netfort.gr.jp