[openstreetmap/openstreetmap-website] don't set map coords if mapParams contains object, but no "map" in hash (PR #5698)
Martin Raifer
notifications at github.com
Mon Feb 17 20:09:17 UTC 2025
tyrasd left a comment (openstreetmap/openstreetmap-website#5698)
> The map parameter would always be set.
not in the iframe's `src` parameter before 5310c5b :shrug:

> Why would you not want to use the coordinates for nodes, ways and notes if these are already loaded in the [site_controller](https://github.com/openstreetmap/openstreetmap-website/blob/483f4c1341ee2b0eb438dc7704e4ba272d1e74fe/app/controllers/site_controller.rb#L86)?
Ok, wait. Of course it would be good to load the editor right away at the correct coordinates. For nodes and notes this is trivial (we can use the `lat`/`lon` directly), not sure how doable it would be in the ruby code for ways and relations, as there would be some zoom-level calculation to do (which depends on the size of the feature as well as the size of the browser window and the applied browser-zoom %).
What I was trying to do here is to merely fix the regression from #5632 by restoring the previous behavior, and nothing more. If you can come up with a better fix, please go ahead, I'm happy to close this one in favor of a better solution.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5698#issuecomment-2663993901
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5698/c2663993901 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250217/73d5bda9/attachment.htm>
More information about the rails-dev
mailing list