This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Different colors in xml file ?

0

Hi, I use xml to diplay several tracks at the same time in OSM. Is it possible for OSM to display each track in a different color based on the xml contents ? Thanks

Edit : I use Leaflet to display tracks on OSM map.

To do so I give to Leaflet an XML file URL.

This XML fils contains several tracks.

My question is : is there a color parameter I can set for each track in the XML file so that OSM displays each track with the specified color ?

XML file example : link text

Usage example : link text

asked 14 Feb '21, 10:49

Rudy's gravatar image

Rudy
11224
accept rate: 0%

edited 15 Feb '21, 07:53

scai's gravatar image

scai ♦
33.3k21309459

1

Can you be more specific what you mean by "in OSM"? I can only assume that you try to display a track on top of a OSM base map. From your other question I assume it is about your web site using Leaflet. If so your question should be how to display tracks in different colors in Leaflet. That has nothing to do with OSM itself.

(14 Feb '21, 11:29) TZorn

One Answer:

1

Leaflet is not an "OSM product" in any sense, you will need to ask in a more suitable venue, for example https://gis.stackexchange.com/

answered 14 Feb '21, 20:03

SimonPoole's gravatar image

SimonPoole ♦
44.7k13326701
accept rate: 18%

New questions seems to be here: https://gis.stackexchange.com/q/387278/23837

(15 Feb '21, 09:16) scai ♦

Source code available on GitHub .