fixes
Some checks failed
CI / Check (push) Failing after 2m0s
Build and publish Docker image / build-and-push (push) Successful in 5m22s

This commit is contained in:
Andras Schmelczer 2026-06-05 23:24:45 +01:00
parent 3fd64785a2
commit 44b4e0d72f
3 changed files with 32 additions and 20 deletions

View file

@ -11,7 +11,7 @@ services:
command: >
bash -c "
cargo install cargo-watch &&
cargo watch --poll -i logs/ -x 'run -- --properties /app/data/properties.parquet --postcode-features /app/data/postcode.parquet --pois /app/data/filtered_uk_pois.parquet --places /app/data/places.parquet --tiles /app/data/uk.pmtiles --postcodes /app/data/postcode_boundaries --travel-times /app/data/travel-times'
cargo watch --poll -i logs/ -x 'run -- --properties /app/property-data4/properties.parquet --postcode-features /app/property-data4/postcode.parquet --pois /app/property-data4/filtered_uk_pois.parquet --places /app/property-data4/places.parquet --tiles /app/property-data4/uk.pmtiles --postcodes /app/property-data4/postcode_boundaries --travel-times /app/property-data4/travel-times'
"
ports:
- "8001:8001"
@ -29,8 +29,6 @@ services:
- .:/app
- cargo-home:/usr/local/cargo
- cargo-target:/app/server-rs/target
- ./property-data:/app/data:ro
- ./finder/data:/app/finder-data:ro
environment:
# Fallback only — the binary uses jemalloc as its global allocator
# (tuned via a baked-in malloc_conf). Caps glibc to 2 arenas.
@ -53,8 +51,8 @@ services:
BUGSINK_ENVIRONMENT: ${BUGSINK_ENVIRONMENT:-development}
BUGSINK_RELEASE: ${BUGSINK_RELEASE:-}
BUGSINK_SEND_DEFAULT_PII: ${BUGSINK_SEND_DEFAULT_PII:-false}
ACTUAL_LISTINGS_PATH: /app/finder-data/online_listings_buy_enriched.parquet
CRIME_BY_YEAR_PATH: /app/data/crime_by_postcode_by_year.parquet
ACTUAL_LISTINGS_PATH: /app/finder/data/online_listings_buy_enriched.parquet
CRIME_BY_YEAR_PATH: /app/property-data4/crime_by_postcode_by_year.parquet
depends_on:
screenshot:
condition: service_healthy

View file

@ -895,22 +895,36 @@ export default memo(function Map({
const handleFlyTo = useCallback(
(lat: number, lng: number, zoom: number, options?: MapFlyToOptions) => {
setInternalViewState((prev) => {
const targetPoint =
getViewportRelativeVisibleAreaCenter(dimensions, containerRef.current, options) ??
getMapRelativeVisibleAreaCenter(dimensions, options);
const center = getMapCenterForTargetScreenPoint(
lat,
lng,
zoom,
dimensions.width,
dimensions.height,
targetPoint.x,
targetPoint.y
);
const targetPoint =
getViewportRelativeVisibleAreaCenter(dimensions, containerRef.current, options) ??
getMapRelativeVisibleAreaCenter(dimensions, options);
const center = getMapCenterForTargetScreenPoint(
lat,
lng,
zoom,
dimensions.width,
dimensions.height,
targetPoint.x,
targetPoint.y
);
return { ...prev, ...center, zoom };
});
// Drive the camera imperatively rather than only through the controlled
// `viewState` prop. In controlled mode react-map-gl silently DROPS view
// state updates while the map is mid-movement — _updateViewState writes to
// the real transform only `if (!map.isMoving())`. So a fly issued right
// after a scroll-zoom or pan, while inertia is still settling, was being
// ignored, which is why the jump/zoom only landed sometimes. stop() cancels
// any in-flight animation/inertia and jumpTo then applies unconditionally;
// its move events sync `internalViewState` back through handleMove.
const map = mapRef.current;
if (map) {
map.stop();
map.jumpTo({ center: [center.longitude, center.latitude], zoom });
} else {
// Map not mounted yet (e.g. an initial deep-link selection before load):
// seed the controlled state so it applies once react-map-gl initialises.
setInternalViewState((prev) => ({ ...prev, ...center, zoom }));
}
},
[dimensions]
);