<script>
+ import { onDestroy } from 'svelte';
import UrlSubmitForm from '../components/UrlSubmitForm.svelte';
import { zoomLevels } from '../lib/helpers.js';
refresh_page('reverse', params);
}
- map_store.subscribe(map => {
+ const unsubscribe = map_store.subscribe(map => {
if (map) {
map.on('click', (e) => {
let coords = e.latlng.wrap();
function set_api_param(e) {
document.querySelector('input[name=' + e.target.dataset.apiParam + ']').value = e.target.value;
}
+
+ onDestroy(unsubscribe);
</script>
<UrlSubmitForm page="reverse">