[openstreetmap/openstreetmap-website] Allow option to view child relations via parent (#2772)

Tom Hughes notifications at github.com
Thu Aug 13 21:35:43 UTC 2020


I'm not sure your diagnosis is actually correct but it's a bit hard to be sure without more details about what you think is missing.

It fetches the full relation from the API using the `/api/0.6/relation/N/full` call and then uses https://github.com/openstreetmap/leaflet-osm to render it - if you look at that you'll see there is a comment where it ignore ways and relations embedded in a relation but that actually doesn't matter because it doesn't actually turn relations into features at all - it just generates from the separate node and way objects that are in the API response.

I think what may be happening is that the API response include the relation you asked for, and the ways and relations that are part of it (there is certainly more that one relation in the response) but not the ways which are members of the child relations and hence you effectively don't see the child relation.

Only recursing one deep there is entirely deliberate I believe because otherwise the response might be practically unbounded if you've ever seen some of the insane relations people create...

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/2772#issuecomment-673722290
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20200813/acc9f0b7/attachment.htm>


More information about the rails-dev mailing list