Changes between Version 13 and Version 14 of Ja:Styles


Ignore:
Timestamp:
2018-07-26T14:37:49+02:00 (6 years ago)
Author:
anonymous
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Ja:Styles

    v13 v14  
    1 [[TranslatedPages(revision=104)]]
     1[[TranslatedPages(revision=144,outdated=Translation is incomplete)]]
    22[[PageOutline(2-10,目次)]]
    33= JOSM マップスタイル =
    4 [[Image(source:trunk/images/dialogs/mapstyle.png,middle,margin-right=20)]]
    5 JOSMのマップ表示はスタイルを指定することでカスタマイズできます。
     4[[Image(source:trunk/images/dialogs/mapstyle.svg,middle,margin-right=20)]]
     5JOSMの[[Help/MapView|マップ表示]]はスタイルを指定することでカスタマイズできます。多くのスタイルが既定でJOSMに含まれています。
    66
     7それぞれの機能の広い範囲をカバーする''基本スタイル''(例えば、 [source:trunk/styles/standard/elemstyles.mapcss JOSM standard] または [source:trunk/styles/standard/potlatch2.mapcss Potlatch 2])があります。 より特別なトピックをカバーする''アドオンスタイル''と組み合わせることができます。下の[#Availablestyleslist 使用可能なスタイルリスト]をご覧ください。
    78
    8 == スタイルの選択 ==
    9 JOSMにはあらかじめ選択されたスタイルが備わっていて、[wiki:Ja:Help/Dialog/MapPaint マップスタイルダイアログ]からオン・オフできます。 スタイルの中には広範な地物をカバーするベースとなるもの(例えば [source:trunk/styles/standard/elemstyles.mapcss JOSM標準スタイル] や [source:trunk/styles/standard/potlatch2.mapcss Potlatch 2スタイル])があります。 これらのスタイルに加えてより特別な対象をカバーするスタイルを追加して組み合わせることができます:
     9[#AdvancedPreferences スタイルのオプション]や[#CreateStyle 独自のスタイルを作成]することで、さらにカスタマイズすることができます。
     10
     11== スタイルの選択 ==#ChooseStyles
     12
     13JOSM has ''three lists'' of ''map styles:'' available styles (all styles from the style repository) → active styles (your favourites) → ☑ chosen styles (actually used for the map painting).
     14
     15JOSM comes with some styles being in the "active styles" list by default. You can choose styles from this list of "active styles" to be actually used for the map painting by clicking the check box (☑) at the desired style's line
     16* in the [wikitr:Help/Dialog/MapPaint map paint style dialog] or
     17* in the [wikitr:Help/Menu/View "View" menu] ( → "Map paint styles") or
     18* (less comfortable) in the Map Paint Styles Preferences (see section below)
     19
     20Note that, unless you are working with add-on styles, likely you want to have only one style ☑ checked at a time.
     21
     22=== Activating more styles ===
     23[[Image(wiki:Styles:addstyle.gif, right, 250px, title=animation of how to activate and choose an example style)]] 
     24
     25''Instructions:''
     261. open the [wikitr:Help/Preferences/Map#MapPaintStyles Map Paint Styles Preferences] by either
     27   * clicking the [[Image(source:trunk/images/dialogs/mappaintpreference.png,middle)]] [wikitr:Help/Dialog/MapPaint#MapStyleSettings Settings] button in the map style dialog (shown in the animation) or
     28   * via [wikitr:Help/Menu/View "View" menu] → "Map paint styles" → "Map paint preferences" or
     29   * (less comfortable) via the general preferences window ([wikitr:Help/Menu/Edit Menu Edit] → [wikitr:Help/Action/Preferences Preferences] → [[Image(source:trunk/images/preferences/map.png,20,middle)]] [wikitr:Help/Preferences/Map Map Settings] (3rd button on the left) → Map Paint Styles (2nd tab))
     301. select a style in the list of "available styles" (left side)
     311. activate it by clicking the [[Image(source:trunk/images/preferences/activate-right.png,middle)]] blue right arrow button (in the centre)
     321. exit and confirm by clicking the OK button
     33
     34''Example:'' Let's assume that you want to add [osmwiki:Key:maxspeed maxspeed=*] tags to OSM, then you probably will make use of the style [wikitr:Styles/Maxspeed Maxspeed] (which displays the value of maxspeed on roads with different colors). The screencast/animation on the right side (click to enlarge) shows how to add this style to your list of "active styles".
     35
     36==== Adding own styles ====
     37You can add own styles (from any URL/file) to the list of active styles – for example a style file which you have [#CreateStyle created yourself]. Just click the [[Image(source:trunk/images/dialogs/add.png,middle)]] plus sign on the right and enter either path and filename or URL of your style file.
     38
     39== Available styles list ==
    1040
    1141[[Styles(ja|スタイル|概要|作者|説明|バージョン|詳細)]]
    12 
    13 スタイルの一覧に追加するには、マップスタイルダイアログの[[Image(source:trunk/images/dialogs/mappaintpreference.png)]] [wiki:Ja:Help/Dialog/MapPaint#MapStyleSettings マップスタイルの設定]ボタンをクリックしてマップ設定を開きます。
    14 
    15 ''(他の方法としてメニューから[wiki:Ja:Help/Preferences/Map#MapPaintStyles 地図描画スタイル]までたどることもできます: 編集 -> 設定 -> [[Image(source:trunk/images/preferences/map.png,15)]] マップ設定(左側上から3番目のボタン) -> 地図描画スタイル(2番目のタブ))''
    16 
    17 ''例'':
    18 例えば海図に興味があるとしたら"SeaMap FreieTonne"を使うことになるでしょう: ”利用可能なスタイル"の一覧からこのエントリをクリックしてハイライトし、中央の[[Image(source:trunk/images/preferences/activate-right.png)]]青い矢印のボタンをクリックします。 これで"有効なスタイル"の一つに表示されるようになります。 さらに高度なスタイルの使い方を試してみましょう! 独自スタイルを作成([#CreateStyle 以下、参照])しましたか? 右側の[[Image(source:trunk/images/dialogs/add.png)]]プラスマークをクリックして、スタイルファイルのパスとファイルネームかURLを入力してください。
    19 
    2042
    2143== 独自スタイルの作成 ==#CreateStyle
    2244標準のスタイルは気に入りませんか? 自分の好きなスタイルに変えてしまいましょう:
    2345
    24 * [wiki:Ja:Help/Dialog/MapPaint マップスタイルダイアログ]上でスタイルの一つを右クリックして[[Image(source:/trunk/images/copy.png)]]"名前を付けて保存..."を選択します。 スタイルのコピーが一覧に追加されます。 このスタイルのファイルはテキストエディタで開いて編集した後に再読み込みさせることができます。
     46* [wikitr:Help/Dialog/MapPaint マップスタイルダイアログ]上でスタイルの一つを右クリックして[[Image(source:/trunk/images/copy.svg,middle)]]"名前を付けて保存..."を選択します。 スタイルのコピーが一覧に追加されます。 このスタイルのファイルはテキストエディタで開いて編集した後に再読み込みさせることができます。
    2547* あるいは一からスタイルを作成してJOSMのマップ設定から追加することもできます。
    2648
    27 JOSMでは二種類のフォーマットでスタイルを定義できます:
    28 
    29  JOSM XML::
    30  過去のJOSMで使われていたフォーマット(現在も利用可能)。 [[Styles/LegacyStandard|過去の標準スタイル]]に若干の説明が含まれています。
    31  MapCSS::
    32  [https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]に似たスタイル定義言語で、元々はPotlatch 2用ですがマップスタイル用の標準を目指して開発されたものです。
     49JOSMではMapCSS フォーマットでスタイルを定義できます。 [https://ja.wikipedia.org/wiki/Cascading_Style_Sheets CSS]に似たスタイル定義言語で、元々はPotlatch 2用ですがマップスタイル用の標準を目指して開発されたものです。
    3350 * 全般的な情報は[osmwiki:Category:MapCSS osm wiki]に書かれています。
    34  * [[Help/Styles/MapCSSTutorial|短いチュートリアル]]から始めることができます。
    35  * [[Help/Styles/MapCSSImplementation|JOSM implementation reference]]にはサポートされている機能の詳細が一覧で示されています。
     51 * [wikitr:Help/Styles/MapCSSTutorial 短いチュートリアル]から始めることができます。
     52 * [wikitr:Help/Styles/MapCSSImplementation JOSM implementation reference]にはサポートされている機能の詳細が一覧で示されています。
    3653
    3754異なるフォーマットのスタイルには互換性があり、同時に読み込むことが可能です。
    3855
    3956== 作成したスタイルを公開する ==
    40 * このwikiページを編集して新しいスタイルファイルのURLをページ上部に追加します。
    41   * **注意**: ファイル拡張子(例: *.mapcss, *.xml, *.xml, *.zip, *.php)の付いたURLのみサポートされます。
    42 * あるいは [[Styles/LegacyStandard]] (XML) や[[Styles/Modified]] (MapCSS) のようなwikiページを作成します。
    43   * バージョン情報を自動的に照合するため、二つの内部変数を利用できます ({{{"1.[[revision]]_[[date]]" --> 1.13_2011-02-24}}}):
    44   1. {{{[[revision]]}}} - wikiページの最新版のバージョン番号
    45   1. {{{[[date]]}}} - 最終更新日
     57* [[Styles/Modified]] のようなwikiページを作成します。
     58 * don't forget to enclose your mappaint code by a code block (`#!style type="mapcss"` needs to be on a new line after `{{{`):
     59  * `{{{`
     60  * `#!style type="mapcss"`
     61  * ...
     62  * `}}}`
     63 * バージョン情報を自動的に照合するため、二つの内部変数を利用できます:
     64  * {{{[[revision]]}}} - wikiページの最新版のバージョン番号
     65  * {{{[[date]]}}} - 最終更新日
     66  * 推奨使用方法: {{{"1.[[revision]]_[[date]]"}}} (例えば{{{1.13_2014-02-24}}}のように変換されます)
    4667 * **注意**: 大量の(アイコンの)外部リンクを追加することはスパムフィルタによって止められます。 可能ならwikiページにアイコンを添付してください([#Iconhandling 以下参照])。
     68* '''または''' このwikiページを編集して新しいスタイルファイルのURLをページ上部に追加します。
     69 * **注意**: ファイル拡張子(例: *.mapcss, *.xml, *.xml, *.zip, *.php)の付いたURLのみサポートされます。
    4770どちらの方法を使った場合も、数分後には自動的に上の一覧に表示されるようになります。 JOSMのマップ設定にも同様に表示されるようになります(リロードボタンをクリックします)。
    4871
     
    5477
    5578* JOSMと一緒に配布されているアイコンは、直接パス指定(JOSMの内部イメージディレクトリからの相対指定)することで参照することができます(JOSMの内部イメージディレクトリからの相対指定)。
    56 * ローカルのスタイルファイルからの相対パス指定を利用できます。
     79* ローカルのスタイルファイルからの相対パス指定を利用できます。(これはプリセットではなくスタイルでのみ機能します。)
     80* Use a path relative to a directory specified at the bottom in the [wikitr:Help/Preferences/Map#MapPaintStyles Styles preferences page] or [wikitr:Help/Preferences/Map#TaggingPresets Presets preferences page].
    5781* HTTPリンクで新しいアイコンを直接参照できます。 アイコンはダウンロード後に内部にキャッシュされます。
    58 * リビジョン[/changeset/2289/josm 2289]のJOSMからzipファイル対応しています。
    59  * zipファイルは少なくとも一つのxml(またはmapcss)の拡張子を持ったファイルを含んでいる必要があります。
     82* zip files are supported too.
     83 * zipファイルは少なくとも一つのmapcss(スタイル用)またはxml(プリセット用)の拡張子を持ったファイルを含んでいる必要があります。
    6084 * アイコン名とパスはzipディレクトリの最上位からの相対指定です。
    61  * 複数のXMLファイルを含む場合、ファイル名に"style"を入れておくのが望ましいです (スタイルとプリセットを一つのアーカイブにまとめることを可能にするため)。
     85 * 複数のファイルを含む場合、ファイル名に"style"を入れておくのが望ましいです (スタイルとプリセットを一つのアーカイブにまとめることを可能にするため)。
     86* Inline encoding as described in [[http://tools.ietf.org/html/rfc2397|RFC 2397]] is supported too.
     87 * Example for PNG: {{{data:image/png;base64,...databytes...}}}
     88 * Example for SVG: {{{data:image/svg+xml;base64,...databytes...}}}
     89 * [wikitr:Help/Base64 More information] about {{{data:image/...}}} in JOSM.
    6290* JOSM wikiを使って新しいスタイルをデザインする場合はさらにいくつかのオプションがあります:
    6391 * wikiページに添付されたファイルは、JOSMがダウンロードするzipファイルに自動的に含められます。
    6492 * zipファイルに含めたくないファイルがある場合は、添付の説明欄に **(NOZIP)** の文字列を追加してください。
    6593 * zipファイルを添付して、その中身を(ダウンロードさせるzipに)含めたいときは、添付の説明欄に **(EXTRACT)** の文字列を追加してください。
    66  * ファイルが添付されているかどうかによってファイル単体をダウンロードさせるかzipファイルにするかを自動的に切り替えます。
    6794
     95== Translation ==
     96
     97Styles, Rules, Presets and Plugins use the same translation mechanism as JOSM core. The files must be delivered as Zip and contain a directory called `data` with the .lang files.
     98
     99To create these files there exist scripts in the SVN directory [osm:source:applications/editors/josm/i18n/ i18n].
     100
     101See also [wikitr:/Translations#Software software translation section] in translation documentation.
     102
     103== Updating styles in JOSM ==
     104Once a style was updated in the wiki (or another external source) it takes up to 10 days until the style gets updated in JOSM automatically. To immediately force an update you can do the following steps:
     105* Open the [wikitr:Help/Action/Preferences Preferences]
     106* Make sure [wikitr:Help/ExpertMode Expert Mode] is enabled
     107* Open the [wikitr:Help/Preferences/Advanced Advanced Preferences]
     108* Search for keys starting with: `mirror.https://josm.openstreetmap.de/josmfile?page_Styles/` (or `mirror.` for other external sources)
     109* Select the style you want to update
     110* Click on Reset at the bottom of the window
     111* Click on OK to save the changes (and to close the preference window)
     112* Restart JOSM
     113
     114To check the version of the style in JOSM do the following steps
     115* Open the [wikitr:Help/Dialog/MapPaint Map Paint Styles Dialog]
     116* Right click on a style
     117* Choose Info
     118* Click on Source Tab
     119* Search for `version:` at the beginning of the source code
    68120
    69121== JOSM wiki で管理しているスタイル ==
     
    92144
    93145== 高度な設定 ==
    94 以下の非公開の設定を使うことができます:
     146Some styles may have options. They are available via a right click (context menu) on the style's entry inside the [wikitr:Help/Dialog/MapPaint map paint style dialog] window. E.g. JOSM's current default map style (MapCSS) has the option to display nodes at low zoom levels "less obtrusive" (enabled by default).
     147
     148追加で以下の非公開の設定を使うことができます:
    95149* {{{mappaint.fillalpha}}}
    96150 * エリアの塗りつぶしに使われる”不透明度"です。 0(透明)から255(不透明)の間の整数で指定します。 デフォルト値は50です。
     
    105159* {{{mappaint.strokes}}}
    106160 * ストロークで表示するか設定された線で表示するかを指定します - {{{mappaint.fillareas}}} と同じ値です
    107 * {{{mappaint.useRealWidth}}}
    108  * true - ウェイを elemstyle.xml ファイルで指定された幅の大きさに従った現実のサイズで表示します
    109  * false (デフォルト) - ウェイをどのズームレベルでも同じ幅で表示します
     161* ~~{{{mappaint.useRealWidth}}}~~
     162 * ~~true - ウェイを elemstyle.xml ファイルで指定された幅の大きさに従った現実のサイズで表示します~~
     163 * ~~false (デフォルト) - ウェイをどのズームレベルでも同じ幅で表示します~~
    110164* {{{mappaint.zoomLevelDisplay}}}
    111165 * true - 各要素の表示・非表示はズームレベルに従います