Search:
Login
Preferences
Help/Guide
About Trac
Register
Forgot your password?
Wiki
Timeline
Changelog
Browse Source
View Tickets
New Ticket
Roadmap
Builds
Sonar
Search
Context Navigation
+0
Start Page
Index
History
Editing Ru:Styles
Adjust edit area height:
8
12
16
20
24
28
32
36
40
Edit side-by-side
[[TranslatedPages(revision=141,outdated=Перевод не завершён)]] [[PageOutline(2-10,Содержание)]] = Стили отрисовки карты в JOSM = [[Image(source:trunk/images/dialogs/mapstyle.svg,middle,margin-right=20)]] Вид [[Help/MapView|область редактирования карты]] в JOSM можно легко изменить с помощью различных стилей. Многие стили уже включены в JOSM по умолчанию. Имеются ''базовые стили'' (например, [source:trunk/styles/standard/elemstyles.mapcss Стандартный стиль JOSM] или [source:trunk/styles/standard/potlatch2.mapcss Potlatch 2]), которые охватывают широкий диапазон объектов. Их можно комбинировать с ''дополнительными стилями'', изменяющими более специфичные детали. Смотрите [#Availablestyleslist список доступных стилей] ниже. Дальнейшее изменение возможно через [#AdvancedPreferences параметры стиля] или [#CreateStyle создание собственного стиля]. == Выбор стилей ==#ChooseStyles JOSM содержит ''три списка'' ''стилей отрисовки карты:'' доступные стили (все стили из хранилища стилей) → активные стили (выбранные вами) → ☑ выбранные стили (те, которые действительно используете в работе). Некоторые стили в JOSM по умолчанию уже добавлены в список "активных стилей". Вы можете выбрать стили из этого списка для реального использования при рисовании карты, установив флажок (☑) рядом с названием нужного стиля: * в диалоговой панели [wiki:Ru:Help/Dialog/MapPaint Стили отрисовки карты], или * в меню [wiki:Ru:Help/Menu/View «Вид»] ( → «Стили отрисовки карты»), или * (менее удобно) в настройках стилей отрисовки карты (см. секцию ниже) Обратите внимание, что, если вы не работаете с дополнительными стилями, то скорее всего у вас установлен флажок ☑ лишь для одного стиля. === Активация дополнительных стилей === [[Image(wiki:Styles:addstyle.gif, right, 250px, title=анимация: как активировать и выбрать стиль)]] ''Инструкции:'' 1. Откройте [wiki:Ru:Help/Preferences/Map#MapPaintStyles Настройки стилей отрисовки карты] одним из следующих способов: * нажмите кнопку [[Image(source:trunk/images/dialogs/mappaintpreference.png,middle)]] [wiki:Ru:Help/Dialog/MapPaint#MapStyleSettings Открыть настройки] в диалоговой панели «Стили отрисовки карты» (показано в анимации) * через [wiki:Ru:Help/Menu/View меню «Вид»] → «Стили отрисовки карты» → «Настройки отрисовки карты» * (менее удобно) через основное окно настроек: меню ([wiki:Ru:Help/Menu/Edit Правка] → [wiki:Ru:Help/Action/Preferences Настройки] → [[Image(source:trunk/images/preferences/map.png,20,middle)]] [wiki:Ru:Help/Preferences/Map Настройки карты] (3-я кнопка сверху) → Стили отрисовки карты (2-я вкладка)) 1. Выберите стиль в списке «Доступные стили» (слева) 1. Активируйте его, нажав кнопку с синей стрелкой [[Image(source:trunk/images/preferences/activate-right.png,middle)]] (в центре) 1. Подтвердите и выйдите, нажав кнопку OK ''Пример:'' Предположим, что вы хотите добавлять теги [osmwiki:Key:maxspeed maxspeed=*] в OSM. Тогда вы, вероятно найдёте полезным стиль [wiki:Styles/Maxspeed Maxspeed] (который отображает разными цветами значения максимально допустимой скорости на дорогах). Анимация справа (щёлкните для увеличения) показывает, как добавить этот стиль в ваш список активных стилей. ==== Добавление собственных стилей ==== Вы можете добавить собственные стили (из любого URL/файла) в список активных стилей – например, стиль, который вы [#CreateStyle создали сами]. Просто нажмите кнопку с плюсом [[Image(source:trunk/images/dialogs/add.png,middle)]] справа и введите либо путь и имя файла, либо URL для вашего стиля. == Список доступных стилей == #Availablestyleslist [[Styles(ru|Стили|Краткое описание|Автор|Описание|Версия|Подробности)]] == Создание собственного стиля ==#CreateStyle Не нравится стандартный стиль? Измените его по своему вкусу: * В диалоговой панели [wiki:Ru:Help/Dialog/MapPaint Стили отрисовки карты], щёлкните правой кнопкой на стиле и выберите [[Image(source:/trunk/images/copy.png,middle)]] "Сохранить как...". Копия стиля будет добавлена в список стилей. Фал можно открыть в текстовом редакторе и перезагрузить после внесения каких-либо изменений. * Или создайте стиль «с нуля» и добавьте его в настройки отрисовки карты JOSM. JOSM поддерживает стили в формате MapCSS. Это язык стилей, подобный [https://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS], который изначально был разработан для Potlatch 2. * Общую информацию можно найти в [osmwiki:Category:MapCSS OSM wiki]. * [wiki:Help/Styles/MapCSSTutorial Краткое руководство] поможет вам начать. * [wiki:Help/Styles/MapCSSImplementation Справочник по реализации в JOSM] перечисляет поддерживаемые функции с дополнительными подробностями. == Сделайте свой стиль доступным другим пользователям == * Или создайте wiki-страницу, подобную [[Styles/Modified]]. * не забудьте заключить свой код mappaint в блок кода (`#!style type="mapcss"` должен быть на следующей строке после `{{{`): * `{{{` * `#!style type="mapcss"` * ... * `}}}` * для автоматической настройки версий следует использовать две внутренних переменных: * {{{[[revision]]}}} - номер последней версии wiki-страницы * {{{[[date]]}}} - дата последнего редактирования * например, {{{"1.[[revision]]_[[date]]"}}} будет преобразовано в, например, {{{1.13_2014-02-24}}} * **Примечание**: фильтры спама запрещают добавление множества внешних ссылок на значки. Если возможно, пожалуйста, прикрепите значки к wiki-странице ([#Iconhandling см. ниже]). … * '''Или''' отредактируйте страницу StylesSource и добавьте URL'ы для файлов нового стиля в список наверху. (Стили, базирующиеся на JOSM (см. выше) — это предпочтительный метод.) * **Примечание**: поддерживаются URL только с расширением файла (например, *.mapcss, *.zip, *.php). В обоих случаях, новый стиль автоматически будет добавлен в приведённую выше таблицу через несколько минут. После этого он также будет доступен в настройках отрисовки карты JOSM (после нажатия кнопки «Скачать заново список доступных стилей»). == Значки == Поддерживаются файлы .png и .svg. === Icon handling === There are different forms to handle icons: * Icons distributed with JOSM can be entered directly with the path (relative to JOSM's internal image directory). * Use a path relative to your local style file. (This works only for Styles, not for Presets.) * Use a path relative to a directory specified at the bottom in the [wiki:Help/Preferences/Map#MapPaintStyles Styles preferences page] or [wiki:Help/Preferences/Map#TaggingPresets Presets preferences page].) * New icons can be directly referenced using a http-link. These are downloaded and cached internally. * zip files are supported too. * The zip file must contain at least one file with extension mapcss (for styles) or xml (for presets). * Icon names and path are relative to the topmost zip directory. * If there are multiple files, a file with "style" in the name is preferred (to allow packaging styles and presets in one archive). * Inline encoding as described in [[http://tools.ietf.org/html/rfc2397|RFC 2397]] is supported too. * Example for PNG: {{{data:image/png;base64,...databytes...}}} * Example for SVG: {{{data:image/svg+xml;base64,...databytes...}}} * [wiki:Help/Base64 More information] about {{{data:image/...}}} in JOSM. * When the JOSM wiki is used for designing of new styles you have some additional options: * Each file attached to the wiki page is automatically included in the zip file downloaded by JOSM. * If you don't want a file in the zip file, add the text **(NOZIP)** in the description of the attachment. * If you add a zip file and want its contents included, you may add **(EXTRACT)** in the description of the attachment. == Updating styles in JOSM == Once 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: * Open the [wiki:Help/Action/Preferences Preferences] * Make sure [wiki:Help/ExpertMode Expert Mode] is enabled * Open the [wiki:Help/Preferences/Advanced Advanced Preferences] * Search for keys starting with: `mirror.https://josm.openstreetmap.de/josmfile?page_Styles/` (or `mirror.` for other external sources) * Select the style you want to update * Click on Reset at the bottom of the window * Click on OK to save the changes (and to close the preference window) * Restart JOSM To check the version of the style in JOSM do the following steps * Open the [wiki:Help/Dialog/MapPaint Map Paint Styles Dialog] * Right click on a style * Choose Info * Click on Source Tab * Search for `version:` at the beginning of the source code == Styles managed in JOSM wiki == [[TitleIndex(Styles/)]] == Rendering == Mappaint renders the map data so it looks much more like a map (colors, icons, annotations, ...) - compared to the JOSM wireframe mode. === Nodes === Most nodes that correspond to tags in the [osmwiki:Map_Features Map Features] page will show an appropriate icon, e.g. a white "P" on blue ground for {{{amenity=parking}}}. There are some special icons for missing/incomplete things: [[Image(Mappaint_no_icon.png)]] missing icon[[br]] We don't have the right icon for every node tag in map features yet, e.g. icons for most {{{natural=*}}} tags are still missing. If you encounter such a "missing icon", feel free to create a nice 16*16 pixel icon that matches the tag. To submit your work, open a [/newticket new ticket] and add your image or zip archive as attachment. [[Image(Mappaint_deprecated.png)]] warning icon[[br]] The corresponding tag was once used but is no longer recommended to be used - or - it is not suitable for a node, e.g. {{{highway=motorway}}} just doesn't make sense on a node. Probably not all deprecated tags will show this icon. === Ways === Most ways that correspond to tags in the map features page will get special color, thickness and line style (e.g. dashed lines for railways). === Areas === Areas are ways that form a sort of ring. Most areas that corresponds to tags in the map features page will be filled with a special color (the filling will be transparent to some degree). == Advanced Preferences == #AdvancedPreferences Some styles may have options. They are available via a right click (context menu) on the style's entry inside the [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). In addition, you can use the following hidden preferences: * {{{mappaint.fillalpha}}} * alpha "opacity level", that is used to fill areas. An integer value between 0 (transparent) and 255 (solid) with the default of 50. * {{{mappaint.fillareas}}} (show areas) * 10000000 (default) - areas will be filled with their corresponding colour and name will be rendered * 0 - areas will be surrounded by lines only and name will not be rendered * any other number - areas will be filled with their corresponding colour and name will be rendered at any zoom level below the given number in meters * {{{mappaint.showicons}}} * select whether icons are shown - same values as {{{mappaint.fillareas}}} * {{{mappaint.shownames}}} * select whether names are shown - same values as {{{mappaint.fillareas}}} * {{{mappaint.strokes}}} * select whether strokes or full lines are used - same values as {{{mappaint.fillareas}}} * ~~{{{mappaint.useRealWidth}}}~~ * ~~true - ways will change width corresponding to the real width in meters set in the elemstyle.xml file~~ * ~~false (default) - ways will have the same width on every zoom level~~ * {{{mappaint.zoomLevelDisplay}}} * true - elements visibility depends on zoom level * false (default) - all elements are displayed * {{{mappaint.fontsize}}} * size of mappaint texts (default=8) ---- Back to [wiki:/Help main help]
Note:
See
WikiFormatting
and
TracWiki
for help on editing wiki content.
Change information
Your email or username:
E-mail address and name can be saved in the
Preferences
Comment about this change (optional):
Note:
See
TracWiki
for help on using the wiki.