JA:Merkaartor/Styles

From OpenStreetMap Wiki
Jump to navigation Jump to search

スタイルとは、地図中のオブジェクトが、エディターのウィンドウでどのように表示されるかを定義するものです。スタイルはタグ値によって特定されたオブジェクトにルールを与えています。これは線の色と幅やエリアを塗りつぶす色やアイコンイメージやラベルテキストのフォーマットなど、描画に関するパラメターのことです。レンダリングされた地図の様にみえるスタイルが既に定義されてます。興味あるフィーチャーを表示するために、これらのスタイルを編集して、新しく加えたり、読み込んだりすることができます。例えば、それらの最高速度によって道に色を付けるスタイルとか、名前のない住宅地道路を強調するスタイルとかです。一つの方法として、スタイルをあなたの興味があるオブジェクトをフィルターして、強調するのに使えます。

内蔵物

Merkaartorには、いくつかのスタイルが内蔵されてます。これは、バージョン 0.0.10 から初められました。: http://trac.openstreetmap.org/browser/applications/editors/merkaartor/Styles/

他のユーザーが用意したもの

他のMerkaartorユーザーとスタイルを共有したいなら、ここにリンクを張ってください。(英語版にもよろしくお願いします。)もし可能なら、スクリーンショットと説明を加えてください。

新しいスタイルを開発する

When developing a new style, you are matching certain key/value combinations to a style element. The first style element that matches wins, so the order of the definitions is important.

You can combine tags with the "and" operator (example: [lit] isoneof (1, true, yes) and [highway] isoneof (footway, track, path)). You can also match tags with the wildcards *, ? and [] (explained at http://doc.trolltech.com/4.4/qregexp.html#wildcard-matching).

You can also use the specifiers HasTags and "Type is TrackPoint" (Example: Type is TrackPoint and not HasTags).

In order to check that a key has a value, follow this example: not [building] is _NULL_