Set loaded markers non-interactive, below route markers (#240)

This commit is contained in:
Norbert Renner 2019-12-13 14:45:58 +01:00
parent 40ad243176
commit 9af707a56e

View file

@ -2,7 +2,18 @@ BR.tracksLoader = function(map, layersControl, routing) {
TracksLoader = L.Control.FileLayerLoad.extend({ TracksLoader = L.Control.FileLayerLoad.extend({
options: { options: {
layer: L.geoJson, 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, addToMap: false,
// File size limit in kb (default: 1024) ? // File size limit in kb (default: 1024) ?
fileSizeLimit: 1024 fileSizeLimit: 1024