[openstreetmap/openstreetmap-website] Replace vendored leaflet.polyline plugin with @mapbox/polyline (PR #6996)

Marwin Hochfelsner notifications at github.com
Sun Apr 12 08:39:08 UTC 2026


@hlfan commented on this pull request.



> @@ -0,0 +1,6 @@
+//= require @mapbox/polyline/src/polyline
+
+OSM.decodePolyline = function (encoded, options) {
+  return polyline.decode(encoded, options && options.precision)
+    .map(([lat, lng]) => ({ lat, lng }));

> All Leaflet methods that accept LatLng objects also accept them in a simple Array form and simple object form

https://leafletjs.com/reference.html#polyline

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6996#discussion_r3069217928
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/6996/review/4094824469 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260412/ff77870b/attachment.htm>


More information about the rails-dev mailing list