mirror of
https://github.com/rybbit-io/rybbit.git
synced 2025-05-11 04:15:36 +02:00
Implement real-time session location map with zoom functionality
- Added a new RealtimePage component to display live session locations on a map. - Integrated zoom handling to adjust circle sizes based on session counts. - Utilized GeoJSON for rendering country boundaries and added tooltips for session count visibility. - Updated server routes to fetch live session locations data.
This commit is contained in:
parent
67af002ec7
commit
cf62c8ccc8
6 changed files with 246 additions and 5 deletions
|
@ -64,6 +64,7 @@ class PageviewQueue {
|
|||
const regionCode = dataForIp?.data?.subdivisions?.[0]?.isoCode || "";
|
||||
const latitude = dataForIp?.data?.latitude || 0;
|
||||
const longitude = dataForIp?.data?.longitude || 0;
|
||||
const city = dataForIp?.data?.city || "";
|
||||
|
||||
return {
|
||||
site_id: pv.site_id,
|
||||
|
@ -88,6 +89,7 @@ class PageviewQueue {
|
|||
country: countryCode,
|
||||
iso_3166_2:
|
||||
countryCode && regionCode ? countryCode + "-" + regionCode : "",
|
||||
city: city || "",
|
||||
lat: latitude || 0,
|
||||
lon: longitude || 0,
|
||||
type: pv.type || "pageview",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue