Help:Extension:Kartographer/Getting started/ja

 メインヘルプページ:
 * ビジュアルエディタで Kartographer を使うには
 * current：ウィキ文形式の編集と Kartographer の導入
 * Kartographer の使い方 - 詳しいヘルプページ

概要
Kartographer とは メディアウィキ（MediaWiki）の拡張機能で、ウィキページに地図を埋め込んだり全画面表示の地図のリンクを貼ったりする機能があり、ウィキ文形式の編集で文を1つ書くくらい、あるいはビジュアルエディタ形式ならメニューの項目をクリックするくらいの手軽さで処理ができます.

このガイドでは、ウィキ文形式で地図を作成する手順に焦点を当てます.

ウィキによっては Kartographer の機能をテンプレートに内包しています（よく使われる名称は  と. ）皆さんのローカルのウィキで Kartographer のヘルプページのリンクを開くと、一般的に使われるテンプレート類が示してあるはずです.

Quick start: example


This code produces a simple 250x250 map in a frame, like the one you see in this section, with the caption "Downtown San Francisco".

 To add a map that appears in a small window (or frame) on a wiki page, use the tag. Clicking on the small map opens a full-screen interactive map.


 * On Wikipedia and other Wikimedia wikis, the embedded map is static. Clicking the static image opens a full-screen interactive map.
 * On Wikivoyage and test2wiki, this embedded map is interactive. Clicking, holding and moving the cursor pans the map; double-clicking or clicking the full-screen icon in the top corner opens a full-screen interactive map.

In its simplest form, uses the following information to display a map of a specific area:


 * a location (latitude and longitude)
 * the size of the frame (width and height)

例:

For a complete explanation of the syntax as well as a list of available attributes, see the main help page.

Instead of an interactive map on the wiki page itself, you can also create text (with an optional marker) that links to a fullscreen interactive map, using.

A minimal tag is even shorter -- all you need is a location.

例:

. You can choose the marker's exact location on the map, the symbol used, its color and size, a title, a descriptive image, and more -- including whether to use letters or numbers across multiple markers.

The example below is a good starting place; for a comprehensive list of attributes and options, see the auto-counters section of the main help page.

 {     "type": "Feature", "properties": { "marker-symbol": "town-hall", "marker-color": "46ea5f", "marker-size": "medium", "title": "Colorado State Capitol", "description": ""}, "geometry": { "type": "Point", "coordinates": [-104.98485267162323, 39.73928364167763] } }

Shapes
GeoJSON allows you to draw shapes on top of a map. You can define simple shapes inline or import shape data from places like Wikidata and OpenStreetMap.

Though we include some illustrative examples below, much of this work is most easily done in a GeoJSON editor. If your wiki has VisualEditor enabled, refer to our guide to using VisualEditor to create maps or use this editor.

Inline
Using GeoJSON, Kartographer lets you define points (markers), lines and polygons to be drawn over your defined map area using special syntax and longitude/latitude coordinates.

 { "type": "FeatureCollection", "features": [ {     "type": "Feature", "geometry": { "type": "LineString", "coordinates": [ [           -122.321777,            47.598526          ],          [            -122.629395,            45.505662          ]        ]      }    }  ] }

For more information, consult the Inline section of the main help page.

External data
In addition to displaying and marking up maps, Kartographer can also draw on the vast resources of geodata that Wikidata and OpenStreetMap have to offer. That data can help you highlight areas of your map using geoshapes, geographical data that describes the physical properties of an area.

Geoshapes can be rendered in three different ways, using the  attribute:


 * : Draws a marker.
 * : Draws a simple line.
 * : Draws a polygon with a shaded interior.
 * : Draws a polygon and shades everything outside the polygon.

 { "type": "ExternalData", "service": "geoshape", "ids": "Q1019" }

A simple example:

In addition to placing a single geoshape on your map, you can also use SPARQL queries to bring in several related geoshapes from Wikidata. (For help writing SPARQL, take a look at Wikidata's Query Builder.)

For more information, see the External data section of the main help page.

Further resources
The world of Kartographer maps and geographical data is large, and even our main help page can't cover every aspect of it. Consult this list of resources for more information.