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: >
|
command: >
|
||||||
bash -c "
|
bash -c "
|
||||||
cargo install cargo-watch &&
|
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:
|
ports:
|
||||||
- "8001:8001"
|
- "8001:8001"
|
||||||
|
|
@ -29,8 +29,6 @@ services:
|
||||||
- .:/app
|
- .:/app
|
||||||
- cargo-home:/usr/local/cargo
|
- cargo-home:/usr/local/cargo
|
||||||
- cargo-target:/app/server-rs/target
|
- cargo-target:/app/server-rs/target
|
||||||
- ./property-data:/app/data:ro
|
|
||||||
- ./finder/data:/app/finder-data:ro
|
|
||||||
environment:
|
environment:
|
||||||
# Fallback only — the binary uses jemalloc as its global allocator
|
# Fallback only — the binary uses jemalloc as its global allocator
|
||||||
# (tuned via a baked-in malloc_conf). Caps glibc to 2 arenas.
|
# (tuned via a baked-in malloc_conf). Caps glibc to 2 arenas.
|
||||||
|
|
@ -53,8 +51,8 @@ services:
|
||||||
BUGSINK_ENVIRONMENT: ${BUGSINK_ENVIRONMENT:-development}
|
BUGSINK_ENVIRONMENT: ${BUGSINK_ENVIRONMENT:-development}
|
||||||
BUGSINK_RELEASE: ${BUGSINK_RELEASE:-}
|
BUGSINK_RELEASE: ${BUGSINK_RELEASE:-}
|
||||||
BUGSINK_SEND_DEFAULT_PII: ${BUGSINK_SEND_DEFAULT_PII:-false}
|
BUGSINK_SEND_DEFAULT_PII: ${BUGSINK_SEND_DEFAULT_PII:-false}
|
||||||
ACTUAL_LISTINGS_PATH: /app/finder-data/online_listings_buy_enriched.parquet
|
ACTUAL_LISTINGS_PATH: /app/finder/data/online_listings_buy_enriched.parquet
|
||||||
CRIME_BY_YEAR_PATH: /app/data/crime_by_postcode_by_year.parquet
|
CRIME_BY_YEAR_PATH: /app/property-data4/crime_by_postcode_by_year.parquet
|
||||||
depends_on:
|
depends_on:
|
||||||
screenshot:
|
screenshot:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
|
||||||
|
|
@ -895,7 +895,6 @@ export default memo(function Map({
|
||||||
|
|
||||||
const handleFlyTo = useCallback(
|
const handleFlyTo = useCallback(
|
||||||
(lat: number, lng: number, zoom: number, options?: MapFlyToOptions) => {
|
(lat: number, lng: number, zoom: number, options?: MapFlyToOptions) => {
|
||||||
setInternalViewState((prev) => {
|
|
||||||
const targetPoint =
|
const targetPoint =
|
||||||
getViewportRelativeVisibleAreaCenter(dimensions, containerRef.current, options) ??
|
getViewportRelativeVisibleAreaCenter(dimensions, containerRef.current, options) ??
|
||||||
getMapRelativeVisibleAreaCenter(dimensions, options);
|
getMapRelativeVisibleAreaCenter(dimensions, options);
|
||||||
|
|
@ -909,8 +908,23 @@ export default memo(function Map({
|
||||||
targetPoint.y
|
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]
|
[dimensions]
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue