From 77824f9e209559a77879d0f33546de7234b12c39 Mon Sep 17 00:00:00 2001 From: Peter Bowyer Date: Wed, 6 Nov 2024 15:24:36 +0000 Subject: [PATCH 1/2] Remove dependency on jQuery in TracksLayer.js --- src/MoveableMarker.js | 5 +---- src/TracksLayer.js | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/MoveableMarker.js b/src/MoveableMarker.js index f37c358..66731aa 100644 --- a/src/MoveableMarker.js +++ b/src/MoveableMarker.js @@ -4,12 +4,9 @@ L.Playback.MoveableMarker = L.Marker.extend({ initialize: function (startLatLng, options, feature) { var marker_options = options.marker || {}; - if (jQuery.isFunction(marker_options)){ + if (typeof(marker_options)=== 'function'){ marker_options = marker_options(feature); } - - L.Marker.prototype.initialize.call(this, startLatLng, marker_options); - this.popupContent = ''; this.feature = feature; diff --git a/src/TracksLayer.js b/src/TracksLayer.js index 87bd4c3..ca6d5de 100644 --- a/src/TracksLayer.js +++ b/src/TracksLayer.js @@ -7,7 +7,7 @@ L.Playback.TracksLayer = L.Class.extend({ initialize : function (map, options) { var layer_options = options.layer || {}; - if (jQuery.isFunction(layer_options)){ + if (typof(layer_options) === 'function') { layer_options = layer_options(feature); } From 3627b7e004a730e8eb05bc352ff6195227251f6b Mon Sep 17 00:00:00 2001 From: Peter Bowyer Date: Wed, 6 Nov 2024 15:28:51 +0000 Subject: [PATCH 2/2] Remove dependency on jQuery in MoveableMarker.js --- src/TracksLayer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TracksLayer.js b/src/TracksLayer.js index ca6d5de..c91cf34 100644 --- a/src/TracksLayer.js +++ b/src/TracksLayer.js @@ -7,7 +7,7 @@ L.Playback.TracksLayer = L.Class.extend({ initialize : function (map, options) { var layer_options = options.layer || {}; - if (typof(layer_options) === 'function') { + if (typeof(layer_options) === 'function') { layer_options = layer_options(feature); }