NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hello there,

I want to be able to display an icon instead of a node when reading an OSM file in JOSM. This is important to me because my user will have to edit OSM files in JOSM. Specifically, the user will have a OSM xml file like this one (minimal example):

xml

I tried adding icon-image="presets/food/restaurant.svg" to the node tag, but no luck.

Here is the output that I get in JOSM. I would like to have an icon instead of a node in JOSM.

sample output

Is it possible to put an icon instead of a node in JOSM through the XML file?

Thanks in advance

asked 06 Oct '19, 20:39

marcosroriz's gravatar image

marcosroriz
11112
accept rate: 0%


I wonder which criteria make those nodes stand out from the others:

  • new nodes (but then IDs should be negative, not positive like in your example. It depends on how the JOSM file was generated. Was the data downloaded from the OSM server (positive IDs), or was the data created elsewhere and still has to be uploaded to OSM (negative IDs ?))
  • no tags

so perhaps take a look at Pseudo Classes (:new, !:tagged) in https://josm.openstreetmap.de/wiki/Help/Styles/MapCSSImplementation to select those nodes and style them

permanent link

answered 07 Oct '19, 04:45

escada's gravatar image

escada
19.0k16166302
accept rate: 21%

edited 07 Oct '19, 09:06

The nodes are bus stops and they are created by the users (hence the basic ids). The overall idea is that I'm using JOSM to enable the users to edit the rural network.

(07 Oct '19, 07:24) marcosroriz

If they are bus stops then add the bus stop tag. This will also show a corresponding icon in JOSM. Your question remains unclear, though.

(07 Oct '19, 09:05) scai ♦

@scai, how can I add the bus stop tag?

(08 Oct '19, 04:06) marcosroriz
2

for each node

<node ....> <tag k="highway" v="bus_stop"/> </node>

see https://wiki.openstreetmap.org/wiki/OSM_XML and https://wiki.openstreetmap.org/wiki/Tag:highway%3Dbus_stop

p.s. please note that there are different tagging schemes for public transport

(08 Oct '19, 04:40) escada

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×710
×622
×84
×54

question asked: 06 Oct '19, 20:39

question was seen: 2,204 times

last updated: 08 Oct '19, 04:40

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum