mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-26 00:09:38 +02:00
Add clear map function
This commit is contained in:
parent
f75c650a20
commit
43c134bf2b
1 changed files with 17 additions and 12 deletions
|
@ -295,20 +295,25 @@
|
||||||
activity_type: ''
|
activity_type: ''
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
let res = await fetch(
|
if (adventure.type == 'visited') {
|
||||||
`/api/countries/check_point_in_region/?lat=${e.detail.lngLat.lat}&lon=${e.detail.lngLat.lng}`
|
let res = await fetch(
|
||||||
);
|
`/api/countries/check_point_in_region/?lat=${e.detail.lngLat.lat}&lon=${e.detail.lngLat.lng}`
|
||||||
let data = await res.json();
|
);
|
||||||
if (data.error) {
|
let data = await res.json();
|
||||||
addToast('error', data.error);
|
if (data.error) {
|
||||||
} else {
|
addToast('error', data.error);
|
||||||
if (data.in_region) {
|
|
||||||
region_name = data.region_name;
|
|
||||||
region_id = data.region_id;
|
|
||||||
} else {
|
} else {
|
||||||
region_id = null;
|
if (data.in_region) {
|
||||||
region_name = null;
|
region_name = data.region_name;
|
||||||
|
region_id = data.region_id;
|
||||||
|
} else {
|
||||||
|
region_id = null;
|
||||||
|
region_name = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
region_id = null;
|
||||||
|
region_name = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(markers);
|
console.log(markers);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue