Commit 238373e9 authored by Pierre Marchand's avatar Pierre Marchand

[client/solar] fixed circular import

parent b94c9695
......@@ -29,15 +29,7 @@ import { getMapInfo } from '../queries/app';
const logger = debug('sdi:comp:map');
export const mapId = 'solar-map';
const options: IMapOptions = {
element: null,
getBaseLayer: getCurrentBaseLayer,
getView,
getMapInfo,
updateView: viewEvents.updateMapView,
setScaleLine: scalelineEvents.setScaleLine,
};
let mapSetTarget: (t: Element | null) => void;
let mapUpdate: () => void;
......@@ -47,6 +39,16 @@ const pickPlace =
const attachMap = (element: Element | null) => {
if (!mapUpdate) {
const options: IMapOptions = {
element: null,
getBaseLayer: getCurrentBaseLayer,
getView,
getMapInfo,
updateView: viewEvents.updateMapView,
setScaleLine: scalelineEvents.setScaleLine,
};
const { update, setTarget, clickable } = create(mapId, {
...options,
element,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment