I couldn't see a way to disable marker icons for the start and end points.
Closed this issue · 1 comments
kreativejuices commented
Love this plugin, just couldn't see any way to disable the start and end markers. I only wanted the polyline to be shown. So i tried this,
marker_options: {
startIconUrl: '',
endIconUrl: '',
shadowUrl: ''
}
It does the job but wondered if there was a better way to do this?
Thanks! :)
mpetazzoni commented
That's the way; a slightly cleaner version is to set them to null
instead of an empty string. The code just checks for "falsy":
if (options.marker_options.startIcon || options.marker_options.startIconUrl) {
https://github.com/mpetazzoni/leaflet-gpx/blob/main/gpx.js#L537-L554