From 7265782c70b0cd43c2d3ce02c37081ee12a80694 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 fa5c085..a9946ac 100644 --- a/src/L.Geodesic.js +++ b/src/L.Geodesic.js @@ -107,7 +107,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({