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

How can I import the color of the marker with input csv file?

2
1

I have a csv file holding coordinates, I am able to import it correctly into umap. I managed to also have the marker name imported through an additional column named 'name'. However, I would like to import the color of the marker.

Here is an example of input file:

lon;lat;name;color
2.2908106734441;48.8421565600018;aaa;green
2.40580700033425;48.8756657433978;bbb;red
2.33270615799049;48.8661396641722;ccc;blue
2.34734689771536;48.8668886093452;ddd;yellow

This does not work. I also tried using HTML/CSS colors (i.e. replacing 'red' with #ff0000). This does not work either. What I don't understand is that is is stated here: https://wiki.openstreetmap.org/wiki/UMap/Guide/Import_data_files

csv: [...] All other columns will be imported as properties.

Did I misunderstand something?

If this is not possible with csv, is it possible with other file formats?

Thanks for all suggestions.

Edit: the real file is about 5000 markers, so I can't edit them one by one...

asked 27 Oct '21, 13:55

sebkramm's gravatar image

sebkramm
41114
accept rate: 0%

edited 27 Oct '21, 14:34


One Answer:

1

In umap Github there is a description how this can be achieved using GeoJSON. Maybe that is a way for you to do it.

answered 27 Oct '21, 18:26

TZorn's gravatar image

TZorn
12.3k764225
accept rate: 15%

Thanks, I'll have a look, but I have to check how can I convert my csv file to geoJSON.

(27 Oct '21, 21:40) sebkramm

You can also try if _umap_options can be passed as a csv column somehow.

(28 Oct '21, 07:36) TZorn

Thanks for you suggestion. Tried this: https://pastebin.com/WezLpauz => no result...

(29 Oct '21, 13:44) sebkramm

Source code available on GitHub .