Plugin Author
bozdoz
(@bozdoz)
It’s probably not easy; you might be able to iterate the gpx features and delete them with some custom javascript. Something like in this example here: https://github.com/bozdoz/wp-plugin-leaflet-map#how-can-i-add-another-leaflet-plugin
Plugin Contributor
hupe13
(@hupe13)
Once you know the solution, it’s very simple. It took me some time to find it.
(function() {
function main() {
if (!window.WPLeafletMapPlugin) {
console.log("no plugin found!");
return;
}
var maps = window.WPLeafletMapPlugin.maps;
for (var i = 0, mapslen = maps.length; i < mapslen; i++) {
var map = maps[i];
map.eachLayer(function(layer) {
if (layer.options.type == "gpx" ) {
layer.options.pointToLayer = function (feature, latlng) {
return L.circleMarker(latlng,
{"radius": 0 }
);
};
}
});
}
}
window.addEventListener("load", main);
})();