【发布时间】:2019-09-27 08:55:58
【问题描述】:
我在底图上有 4 个图层叠加组,我需要将天气组图层设置为地图上的默认图层。
this.weather = L.layerGroup()
this.wind = L.featureGroup()
this.humd = L.layerGroup();
this.rain = L.layerGroup();
// Base-Maps with Overlayes
var mixed = {
"Grayscale": grayscale, // BaseMaps
"Streets": streets, // BaseMaps
"Metro": metro, // BaseMaps
"weather": this.weather, // OverlayMaps
"wind": this.wind, // OverlayMaps
"humd": this.humd, // OverlayMaps
"rain": this.rain, // OverlayMaps
};
this.map = new Map('mapId').setView([33, 44], 6);
tileLayer('https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}
{r}.png', {
attribution: '2019 © منظومة ارصاد العراق',
minZoom: 5,
maxZoom: 6
}).addTo(this.map);
L.control.layers(mixed).addTo(this.map);
【问题讨论】: