kopia lustrzana https://github.com/OpenDroneMap/WebODM
26 wiersze
509 B
JavaScript
26 wiersze
509 B
JavaScript
import Utils from '../Utils';
|
|
import L from 'leaflet';
|
|
|
|
const { assert } = Utils;
|
|
|
|
const leafletPreCheck = (options) => {
|
|
assert(options.map !== undefined);
|
|
assert(options.tiles !== undefined);
|
|
};
|
|
|
|
const layersControlPreCheck = (options) => {
|
|
assert(options.controls !== undefined);
|
|
leafletPreCheck(options);
|
|
}
|
|
|
|
export default {
|
|
namespace: "Map",
|
|
|
|
endpoints: [
|
|
["willAddControls", leafletPreCheck],
|
|
["didAddControls", layersControlPreCheck],
|
|
["addActionButton", leafletPreCheck],
|
|
]
|
|
};
|
|
|