From e0c1c2f08a5e230d647ce49d0a76ea43741c6c5a Mon Sep 17 00:00:00 2001 From: johndoe Date: Sat, 24 Aug 2019 13:29:39 +0300 Subject: [PATCH] compatibility workaround for iitc plugins --- src/L.Geodesic.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/L.Geodesic.js b/src/L.Geodesic.js index b171e88..50a85b1 100644 --- a/src/L.Geodesic.js +++ b/src/L.Geodesic.js @@ -105,7 +105,13 @@ L.GeodesicPolyline = L.Polyline.extend(PolyMixin); - PolyMixin.options = polyOptions; // workaround for https://github.com/Leaflet/Leaflet/pull/6766/ + L.extend(PolyMixin, { + options: polyOptions, // workaround for https://github.com/Leaflet/Leaflet/pull/6766/ + + getLatLngs: function () { // compatibility workaround for iitc plugins: + return this._latlngs[0]; // it would be more proper to fix plugins themselves (layer-count, cross-links) + } // but it'd be a pain for 3rd-party ones + }); L.GeodesicPolygon = L.Polygon.extend(PolyMixin); L.GeodesicCircle = L.Polygon.extend({