Show icon to mark start and end of each .gpx
PedroF20 opened this issue · 1 comments
PedroF20 commented
I'm using Omnivore to run through a directory of .gpx
files, and I need to mark where is the start and end of each track.
I was using this:
for (var i = 0; i < jsonRes.length; i += 1) {
var runLayer = omnivore.gpx(folderPath + jsonRes[i], null, customLayer)
.on('ready', function() {
//runLayer.showExtremities('arrowM');
})
.addTo(trackmaps[trackmapCount])
.on('click', function(d) {
console.log(d);
});
}
But that showExtremities
function (plugin - https://github.com/makinacorpus/Leaflet.LineExtremities) makes the map slow, because for whatever reason draws not only on the start and end of each track. Is there any solution for this problem?
tmcw commented
Using the plugin you mentioned would be the best technique - leaflet-omnivore doesn't and shouldn't include any style-related code.