ArcGIS = {
const Config = await (await import(`${JS_API_BASE_URL}/config.js`)).default;
const Map = await (await import(`${JS_API_BASE_URL}/Map.js`)).default;
const MapView = await (
await import(`${JS_API_BASE_URL}/views/MapView.js`)
).default;
const ScaleBar = await (
await import(`${JS_API_BASE_URL}/widgets/ScaleBar.js`)
).default;
const reactiveUtils = await import(
`${JS_API_BASE_URL}/core/reactiveUtils.js`
);
Config.apiKey = JS_API_KEY;
if (!Config._style) {
const href = await require.resolve(
`${JS_API_BASE_URL}/assets/esri/themes/light/main.css`
);
document.head.appendChild(
(Config._style = html`<link href=${href} rel=stylesheet>`)
);
}
return {
Config,
Map,
MapView,
reactiveUtils,
ScaleBar
};
}