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

Show multiple areas and color them

0

Hello, I would know if It is possible shows multile area simultaneously (like Countries, Region, City,..) selected one time by name or ID like Nominatim shows.

In instance I imagine a link like https://www.openstreetmap.org/relation/45319_44915 that shows simultaneously https://www.openstreetmap.org/relation/45319 (Monza, IT) city area and https://www.openstreetmap.org/relation/44915 (Milan, IT) auto adapt the zoom and center in order to show all areas (in this sample they are 2, but could be dozens...)

And also, I will pass other parameter (the area color) like https://www.openstreetmap.org/relation/45319_44915#FF0000_00FF00 so, first area will be RED (FF0000 , RGB Hexadecimal notation) painted and the second one Green (00FF00) all with transaprent (alpha channel) = 50% in order to show behind the coloured area.

asked 26 Sep '19, 11:02

Skelos's gravatar image

Skelos
11112
accept rate: 0%


One Answer:

1

You will have to write a program in e.g. JavaScript to do this. Perhaps the Chloropeth Leaflet Example has a lot of the functionality you need.

answered 26 Sep '19, 16:12

escada's gravatar image

escada
19.0k16166302
accept rate: 21%

Source code available on GitHub .