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

1
1

I create a new OSM file in JOSM and draw two nodes and a way between them. How can I show this way with red color in a viewer? Shall I modify it in JOSM or modify the xml code for this way?

asked 24 Mar '11, 14:25

monument's gravatar image

monument
69567
accept rate: 0%

edited 25 Mar '11, 11:21

dieterdreist's gravatar image

dieterdreist
3.7k113567

Why would you want to color the road? Where would you want the color to appear?

(24 Mar '11, 15:08) petschge

i want to show the way to users,after them choose two nodes(the way is a result which is calculated by some algorithm),the color means that the way is what they want.it looks like the routing function.

(24 Mar '11, 15:21) monument
1

Just checking - do you perhaps mean "josm" (the Java-based Openstreetmap editor) rather than "Gosm" (the Openstreetmap viewer for Linux http://wiki.openstreetmap.org/wiki/Gosm )?

(24 Mar '11, 20:01) SomeoneElse ♦

If you want to temporarily highlight a way for user by coloring it you should NOT do so in the main OpenStreetMap database (neither using Josm nor any other editor) as this change would be visible to every body else.

The way to go forward is to display the unmodified Openstreetmap data in whatever way you are displaying them now and then and a highlight ONLY in the application that you are using for map display. If you are using Openlayers one way to do it would be using a vector layer on top of unmodified Openstreetmap tiles.

permanent link

answered 25 Mar '11, 06:24

petschge's gravatar image

petschge
8.3k217398
accept rate: 21%

1

True. Of course, if the data is downloaded locally before displaying it (e.g. for offline display), it might be appropriate to modify the the data directly (e.g. by editing the XML). Just make sure you don't upload it later...

(25 Mar '11, 11:52) sleske

You can highlight (in blue) an object within OSM database by browsing it - for example see http://www.openstreetmap.org/browse/way/89696929. You only change the way number to yours. You can also use this type of link for nodes and relations - just change the "way" for "node" or "relation" with corresponding object number. If you do not know the object number, go to the map of your area and select "data" from the right menu (collapsed as "+" by default), then click on your object and you will see its number in left column.

However, this will only work for data that are already present in the OSM map database and thus are visible to EVERYONE (with or without highlighting). If your object has no geographical value and you only want to show random vector data to your friends, you should NOT use OSM database for this kind of activity and rather find other way of sharing private information.

permanent link

answered 30 Dec '11, 10:28

Kozuch's gravatar image

Kozuch
1.7k587285
accept rate: 8%

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:

×622
×535
×59
×15
×13

question asked: 24 Mar '11, 14:25

question was seen: 7,770 times

last updated: 30 Dec '11, 10:28

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