fixes
This commit is contained in:
parent
3fd64785a2
commit
44b4e0d72f
3 changed files with 32 additions and 20 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -895,7 +895,6 @@ 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);
|
||||
|
|
@ -909,8 +908,23 @@ export default memo(function Map({
|
|||
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]
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue