custom kml layer function
This commit is contained in:
@@ -156,6 +156,7 @@ let MessageRate = 0;
|
||||
|
||||
let layers;
|
||||
let layers_group;
|
||||
let custom_layers;
|
||||
|
||||
const nullStyle = new ol.style.Style({});
|
||||
|
||||
@@ -7720,5 +7721,20 @@ if (adsbexchange && window.location.hostname.startsWith('inaccurate')) {
|
||||
jQuery('#inaccurate_warning').removeClass('hidden');
|
||||
}
|
||||
|
||||
function add_kml_overlay(url, name, opacity) {
|
||||
custom_layers.push(new ol.layer.Vector({
|
||||
source: new ol.source.Vector({
|
||||
url: url,
|
||||
format: new ol.format.KML(),
|
||||
}),
|
||||
name: name,
|
||||
title: 'custom_' + name,
|
||||
type: 'overlay',
|
||||
opacity: opacity,
|
||||
visible: true,
|
||||
zIndex: 99,
|
||||
}));
|
||||
}
|
||||
|
||||
parseURLIcaos();
|
||||
initialize();
|
||||
|
||||
Reference in New Issue
Block a user