From 9af707a56e176ba6127f13046e93a191387b084b Mon Sep 17 00:00:00 2001 From: Norbert Renner Date: Fri, 13 Dec 2019 14:45:58 +0100 Subject: [PATCH] Set loaded markers non-interactive, below route markers (#240) --- js/plugin/TracksLoader.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/js/plugin/TracksLoader.js b/js/plugin/TracksLoader.js index 07b2c45..1347667 100644 --- a/js/plugin/TracksLoader.js +++ b/js/plugin/TracksLoader.js @@ -2,7 +2,18 @@ BR.tracksLoader = function(map, layersControl, routing) { TracksLoader = L.Control.FileLayerLoad.extend({ options: { layer: L.geoJson, - layerOptions: { style: { color: 'blue' }, interactive: false }, + layerOptions: { + style: { color: 'blue' }, + interactive: false, + pointToLayer: function(geoJsonPoint, latlng) { + return L.marker(latlng, { + interactive: false, + opacity: 0.7, + // prevent being on top of route markers + zIndexOffset: -1000 + }); + } + }, addToMap: false, // File size limit in kb (default: 1024) ? fileSizeLimit: 1024