mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-04 05:19:12 -04:00
fix: link to openstreetmap
This commit is contained in:
parent
20e138cdf6
commit
a0b8cf0301
1 changed files with 4 additions and 3 deletions
|
@ -17,14 +17,15 @@ const fields: Array<{ field: string; name: string }> = [
|
|||
];
|
||||
|
||||
const geoInfos = ref<CKeyValueListItems>([]);
|
||||
const geoInfosData = ref<any>({});
|
||||
const geoInfosData = ref<{
|
||||
loc?: string
|
||||
}>({});
|
||||
const status = ref<'pending' | 'error' | 'success'>('pending');
|
||||
const token = useStorage('ip-geoloc:token', '');
|
||||
|
||||
const openStreetMapUrl = computed(
|
||||
() => {
|
||||
const gpsLatitude = geoInfosData.value.lat;
|
||||
const gpsLongitude = geoInfosData.value.lon;
|
||||
const [gpsLatitude, gpsLongitude] = geoInfosData.value.loc?.split(',') || [];
|
||||
return gpsLatitude && gpsLongitude ? `https://www.openstreetmap.org/?mlat=${gpsLatitude}&mlon=${gpsLongitude}#map=18/${gpsLatitude}/${gpsLongitude}` : undefined;
|
||||
},
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue