{"action":"closed","issue":{"url":"https://api.github.com/repos/Leaflet/Leaflet/issues/3164","labels_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/3164/labels{/name}","comments_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/3164/comments","events_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/3164/events","html_url":"https://github.com/Leaflet/Leaflet/issues/3164","id":55255797,"number":3164,"title":"Leaflet + GeoJson converted from OSM Data - Relations","user":{"login":"VoyteckPL","id":10666159,"avatar_url":"https://avatars.githubusercontent.com/u/10666159?v=3","gravatar_id":"","url":"https://api.github.com/users/VoyteckPL","html_url":"https://github.com/VoyteckPL","followers_url":"https://api.github.com/users/VoyteckPL/followers","following_url":"https://api.github.com/users/VoyteckPL/following{/other_user}","gists_url":"https://api.github.com/users/VoyteckPL/gists{/gist_id}","starred_url":"https://api.github.com/users/VoyteckPL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VoyteckPL/subscriptions","organizations_url":"https://api.github.com/users/VoyteckPL/orgs","repos_url":"https://api.github.com/users/VoyteckPL/repos","events_url":"https://api.github.com/users/VoyteckPL/events{/privacy}","received_events_url":"https://api.github.com/users/VoyteckPL/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-23T08:18:02Z","updated_at":"2015-01-24T17:24:07Z","closed_at":"2015-01-24T17:24:07Z","body":"Hi,\r\nI'm new to Leaflet and JavaScript so please forgive if I ask silly questions. Here is my main purpose. I'm trying to display bicycle relations which I downloaded from geofabrik, converted with osmconvert, filtered with osmfilter and converted to geojson. At the moment Leaflet displays line strings and nodes correctly on the map. The problem is with data from relations that are included in the file. Here is a part of my GeoJson file (I won't include whole file becauce it's just too big):\r\nvar rower = {\r\n    \"type\": \"FeatureCollection\",\r\n    \"features\": [\r\n        {\r\n            \"type\": \"Feature\",\r\n            \"id\": \"way/27149688\",\r\n            \"properties\": {\r\n                \"type\": \"way\",\r\n                \"id\": \"27149688\",\r\n                \"tags\": {\r\n                    \"agricultural\": \"no\",\r\n                    \"bicycle\": \"yes\",\r\n                    \"highway\": \"residential\",\r\n                    \"maxweightrating:hgv\": \"24\",\r\n                    \"maxweightrating:hgv:condtitional\": \"none @ marked\",\r\n                    \"name\": \"Mikołaja Reja\",\r\n                    \"source:maxweightrating:hgv\": \"PL:sign_B-5-note\"\r\n                },\r\n                \"relations\": [\r\n                    {\r\n                        \"role\": \"\",\r\n                        \"rel\": \"4046118\",\r\n                        \"reltags\": {\r\n                            \"colour\": \"blue\",\r\n                            \"description\": \"Leśna trasa rowerowa, preferowany rower górski / Forest track, Mountain Bike preferred\",\r\n                            \"lcn_ref\": \"niebieski\",\r\n                            \"name\": \"Szlak Trójmiejski\",\r\n                            \"network\": \"rcn\",\r\n                            \"route\": \"bicycle\",\r\n                            \"type\": \"route\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"meta\": {\r\n                    \"timestamp\": \"2014-04-17T11:58:45Z\",\r\n                    \"version\": \"20\",\r\n                    \"changeset\": \"21747999\",\r\n                    \"user\": \"wojtas82\",\r\n                    \"uid\": \"729745\"\r\n                },\r\n                \"tainted\": true\r\n            },\r\n            \"geometry\": {\r\n                \"type\": \"LineString\",\r\n                \"coordinates\": [\r\n                    [\r\n                        18.5024141,\r\n                        54.4354139\r\n                    ],\r\n                    [\r\n                        18.503622,\r\n                        54.4353485\r\n                    ],\r\n                    [\r\n                        18.5053714,\r\n                        54.4352858\r\n                    ]\r\n                ]\r\n            }\r\n        },\r\n\r\nAs you can see relations are in square brackets. I wish to display different colours of tracks depending on relations>reltags>colour tag. Here is my main html file (actually the party that doesnt work):\r\n\r\nvar rower2 = L.geoJson(rower, {\r\n\t\tstyle: function (feature) {\r\n\t\tswitch (feature.properties.relations) {\r\n            case 'blue': return {color: \"#ff0000\"};\r\n            case 'red':  return {color: \"#0000ff\"};\r\n\t\t\t}\r\n\t\t}\t\r\n\t\t}).addTo(map);\r\n\r\nI tried to modify this part (feature.properties.relations) to (feature.properties.relations.reltags.colour) but it doesn't work. Is there any way to overpass this problem? Thanks a lot in advance for your help!\r\nBest regards,\r\n\r\n"}}