geohash and message query stuff

This commit is contained in:
2026-06-05 21:09:34 +09:00
parent d5ddff9912
commit 8dcdd7a0e4
6 changed files with 1106 additions and 15 deletions

View File

@@ -5,21 +5,24 @@
// export let latitude;
// export let longitude;
// ^ this didn't work for some reason, so instead we get the props like this: (based on internet research this is the fix)
let { latitude, longitude } = $props();
let { lat, lng } = $props();
let mapDiv; // reference ot the map <div> below
onMount (async () => {
const centerLat = Number(lat);
const centerLng = Number(lng);
const { setOptions, importLibrary } = await import('@googlemaps/js-api-loader');
setOptions({
apiKey: env.PUBLIC_MAPS_KEY,
key: env.PUBLIC_MAPS_KEY,
version: 'weekly',
});
const { Map } = await importLibrary('maps');
new Map(mapDiv, {
center: { lat: latitude, lng: longitude },
center: { lat: centerLat, lng: centerLng },
zoom: 15,
disableDefaultUI: true,
gestureHandling: 'greedy'