kopia lustrzana https://github.com/OpenDroneMap/WebODM
Fixed basemap bug
rodzic
3a0d97d463
commit
df1696f61e
|
@ -195,7 +195,9 @@ class Map extends React.Component {
|
||||||
}).addTo(this.map);
|
}).addTo(this.map);
|
||||||
|
|
||||||
if (showBackground) {
|
if (showBackground) {
|
||||||
this.basemaps = Basemaps.map((src, idx) => {
|
this.basemaps = {};
|
||||||
|
|
||||||
|
Basemaps.forEach((src, idx) => {
|
||||||
const { url, ...props } = src;
|
const { url, ...props } = src;
|
||||||
const layer = L.tileLayer(url, props);
|
const layer = L.tileLayer(url, props);
|
||||||
|
|
||||||
|
@ -203,11 +205,7 @@ class Map extends React.Component {
|
||||||
layer.addTo(this.map);
|
layer.addTo(this.map);
|
||||||
}
|
}
|
||||||
|
|
||||||
return [props.label, layer];
|
this.basemaps[props.label] = layer;
|
||||||
}).reduce((acc, [k, v]) => {
|
|
||||||
acc[k] = v;
|
|
||||||
|
|
||||||
return acc;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue