Changes between Version 3 and Version 9 of Help/Styles/Images


Ignore:
Timestamp:
(multiple changes)
Author:
(multiple changes)
Comment:
(multiple changes)

Legend:

Unmodified
Added
Removed
Modified
  • Help/Styles/Images

    v3 v9  
     1[[TranslatedPages]]
    12= Including images in styles =
     3
    24
    35== Image-URL ==
    46There are different ways to reference images in styles:
    57
    6  Build in images:: You can reference the build in images. To browse the available icons, unpack the `josm-*.jar` file with any program that can handle a zip-archive. The image files are located in the `images` subfolder. Omit the first folder in the file path (not `images/icons/restaurant.png`, but `icons/restaurant.png`). Example:
     8 Build in images:: You can reference the build in images. To browse the available icons, unpack the `josm-*.jar` file with any program that can handle a zip-archive. The image files are located in the `images` subfolder. Omit the first folder in the file path (not `images/presets/food/restaurant.svg`, but `presets/food/restaurant.svg`). Example:
    79{{{#!mapcss
    810node[amenity=restaurant] {
    9     icon-image: "icons/restaurant.png";
     11    icon-image: "presets/food/restaurant.svg";
    1012}
    1113}}}
     14
    1215 Local images:: Provide the path of an image file on the local file system, either absolute or relative to the current `.mapcss` file. Example:
    1316{{{#!mapcss
     
    2225}
    2326}}}
     27
    2428 URL of an image on a remote server:: Full URL of an image from the web. Make sure direct linking is tolerated by the website owner. The images are loaded on demand and cached on the client computer (for one week, usually).
    2529{{{#!mapcss
     
    2832}
    2933}}}
     34
    3035 Images within a zip-archive:: It is possible to pack your style and all required resources in a zip archive, in order to simplify distribution. When the user loads the zip file as a style, JOSM will automatically detect the `.mapcss` file within the archive and find all the images.
    3136{{{#!mapcss
     
    3439}
    3540}}}
     41
    3642 Embedded image data:: `data:`-URL according to [http://www.ietf.org/rfc/rfc2397.txt RFC2397]. Examples:
    3743{{{#!mapcss
     
    4652}
    4753}}}
     54
    4855 Images on the OSM-Wiki:: Image files from the OSM-wiki can be linked in a special way. This is supposed to be compatible with the `wiki:symbol`-Tag, see [osmwiki:DE:Hiking DE:Hiking]. Example:
    4956{{{#!mapcss
     
    5259}
    5360}}}
     61
     62
    5463== Image formats ==
    5564=== Raster formats ===
    56 JOSM can display the following raster formats: `png`, `jpeg`, `gif` and `bmp`.[[br]]
    57 (Basically all formats that are supported by the Java Runtime Environment v. 6)
     65JOSM can display the following raster formats: `png`, `jpeg`, `gif` and `bmp`. \\
     66(Basically all formats that are supported by the Java Runtime Environment)
    5867
    5968=== Vector formats ===
    60 There is also basic build-in support for ''scalable vector graphics'' (`svg`). Most `svg`-images should be rendered correctly, but in some cases the result may be flawed. This is due to limitations of the used [https://svgsalamander.java.net/ svg-library].
     69There is also build-in support for ''scalable vector graphics'' (`svg`). svg icons are preferred over raster format icons because of lossless scaling on hidpi screens. Most `svg`-images should be rendered correctly, but in some cases the result may be flawed. This is due to limitations of the used [https://svgsalamander.java.net/ svg-library].
    6170
    6271One thing you can be sure of, is that the rendering is consistent on all systems. So either the result looks OK, or it does not.
    6372
    64 In case it does not, convert the `svg` image manually to `png` or try to "simplify" the `svg` in a way that it can be handled by JOSM.
     73In case it does not, try to "simplify" the `svg` in a way that it can be handled by JOSM. See also the svg related hints at [wikitr:/DevelopersGuide/DefaultPresets#NewIcons].
     74
     75
     76----
     77Back to [wikitr:/Styles JOSM Map Styles]