Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

adjust map clustering and refresh system sqlite

Maurice4f1d0aa2105b
diff --git a/Dockerfile b/Dockerfile
index 4b1e7bdc9..d11fdb0dd 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -54,7 +54,7 @@ COPY server/package.json ./server/
# would copy up every inode it touches and duplicate the whole tree in the image.
RUN apt-get update && \
apt-get install -y --no-install-recommends tzdata dumb-init wget ca-certificates python3 build-essential \
- libkitinerary-bin && \
+ libkitinerary-bin libsqlite3-0 && \
npm ci --workspace=server --omit=dev && \
ln -sf "$(find /usr/lib -name kitinerary-extractor -type f | head -1)" /usr/local/bin/kitinerary-extractor; \
apt-get purge -y python3 build-essential && \
diff --git a/client/src/components/Map/MapView.tsx b/client/src/components/Map/MapView.tsx
index 0e222ef27..3dacc18c3 100644
--- a/client/src/components/Map/MapView.tsx
+++ b/client/src/components/Map/MapView.tsx
@@ -1049,8 +1049,8 @@ export const MapView = memo(function MapView({
chunkedLoading
chunkInterval={30}
chunkDelay={0}
- maxClusterRadius={30}
- disableClusteringAtZoom={11}
+ maxClusterRadius={20}
+ disableClusteringAtZoom={9}
spiderfyOnMaxZoom
showCoverageOnHover={false}
zoomToBoundsOnClick
diff --git a/client/src/components/Map/MapViewGL.test.tsx b/client/src/components/Map/MapViewGL.test.tsx
index 71696ba54..418cf011a 100644
--- a/client/src/components/Map/MapViewGL.test.tsx
+++ b/client/src/components/Map/MapViewGL.test.tsx
@@ -408,8 +408,8 @@ describe('MapViewGL', () => {
expect(glMap.addSource).toHaveBeenCalledWith('trip-place-clusters', expect.objectContaining({
type: 'geojson',
cluster: true,
- clusterRadius: 30,
- clusterMaxZoom: 10,
+ clusterRadius: 20,
+ clusterMaxZoom: 8,
}))
expect(glMap.addLayer).toHaveBeenCalledWith(expect.objectContaining({ id: 'trip-place-clusters-circle' }))
expect(glMap.addLayer).toHaveBeenCalledWith(expect.objectContaining({ id: 'trip-place-clusters-count' }))
diff --git a/client/src/components/Map/MapViewGL.tsx b/client/src/components/Map/MapViewGL.tsx
index 1295c4e22..06d4d7959 100644
--- a/client/src/components/Map/MapViewGL.tsx
+++ b/client/src/components/Map/MapViewGL.tsx
@@ -208,8 +208,8 @@ interface Props {
}
/** How eagerly place markers merge into a cluster. */
-const CLUSTER_RADIUS = 30
-const CLUSTER_MAX_ZOOM = 10
+const CLUSTER_RADIUS = 20
+const CLUSTER_MAX_ZOOM = 8
/** The cluster source and the three layers over it. Extracted so the rebuild on a mode
* change and the initial build cannot drift apart. */
diff --git a/client/src/components/Roadtrip/RoadtripLimitsCard.tsx b/client/src/components/Roadtrip/RoadtripLimitsCard.tsx
index bba178623..9700c5087 100644
--- a/client/src/components/Roadtrip/RoadtripLimitsCard.tsx
+++ b/client/src/components/Roadtrip/RoadtripLimitsCard.tsx
@@ -483,6 +483,13 @@ export default function RoadtripLimitsCard({ onSave, onResetDayBoundaries, loadi
/>
))}
</Panel>
+ <Panel icon={Signpost} title={t('roadtrip.stops.section')} note={t('roadtrip.stops.daysHint')}>
+ <AvoidRow icon={Link2} label={t('roadtrip.stops.inDays')}
+ on={settings.roadtrip_service_stops_in_days !== false}
+ disabled={!onSave}
+ onToggle={() => onSave?.('roadtrip_service_stops_in_days', settings.roadtrip_service_stops_in_days === false)}
+ />
+ </Panel>
</div>
<div className="flex min-w-0 flex-col gap-4">
@@ -646,13 +653,7 @@ export default function RoadtripLimitsCard({ onSave, onResetDayBoundaries, loadi
<AvoidRow icon={Signpost} label={t('roadtrip.hazards.show')} on={settings.roadtrip_show_hazards === true} disabled={!onSave}
onToggle={() => onSave?.('roadtrip_show_hazards', !settings.roadtrip_show_hazards)} />
</Panel>
- <Panel icon={Signpost} title={t('roadtrip.stops.section')} note={t('roadtrip.stops.daysHint')}>
- <AvoidRow icon={Link2} label={t('roadtrip.stops.inDays')}
- on={settings.roadtrip_service_stops_in_days !== false}
- disabled={!onSave}
- onToggle={() => onSave?.('roadtrip_service_stops_in_days', settings.roadtrip_service_stops_in_days === false)}
- />
- </Panel>
+
</div>
</div>
</div>