<script>
import * as L from 'leaflet';
- import * as LMM from 'leaflet-minimap';
+ import 'leaflet-minimap';
import 'leaflet/dist/leaflet.css';
import 'leaflet-minimap/dist/Control.MiniMap.min.css';
import { get } from 'svelte/store';
- import { get_config_value } from '../lib/config_reader.js'
+ import { get_config_value } from '../lib/config_reader.js';
import { map_store, current_result_store, current_request_latlon } from '../lib/stores.js';
import MapPosition from '../components/MapPosition.svelte';
const MapPositionControl = L.Control.extend({
options: { position: 'topright' },
- onAdd: () => { return document.getElementById('show-map-position') }
+ onAdd: () => { return document.getElementById('show-map-position'); }
});
map.addControl(new MapPositionControl());
setMapData(get(current_result_store));
return {
- destroy: () => { map.remove() }
+ destroy: () => { map.remove(); }
};
}
let map = get(map_store);
if (!map) { return; }
- dataLayers.forEach(function(layer) {
+ dataLayers.forEach(function (layer) {
map.removeLayer(layer);
- })
+ });
}
function setMapData(aFeature) {
}
current_result_store.subscribe(aFeature => {
- setMapData(aFeature);
+ setMapData(aFeature);
});