mirror of
https://github.com/ArthurDanjou/artsite.git
synced 2026-01-22 13:51:37 +01:00
Replace Mapbox integration with custom Globe component
Switched from Mapbox to a custom globe visualization using 'cobe' library. Removed all Mapbox-related code, dependencies, and environmental variables. Introduced a WebSocket-based system to display live visitor data on the globe.
This commit is contained in:
8
app/plugins/location.server.ts
Normal file
8
app/plugins/location.server.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export default defineNuxtPlugin(() => {
|
||||
const event = useRequestEvent()
|
||||
|
||||
useState('location', () => ({
|
||||
latitude: event?.context.cf?.latitude || Math.random() * 180 - 90, // default to random latitude (only in dev)
|
||||
longitude: event?.context.cf?.longitude || Math.random() * 360 - 180, // default to random longitude (only in dev)
|
||||
}))
|
||||
})
|
||||
Reference in New Issue
Block a user