Merge branch 'dev_environment' into staging_environment
This commit is contained in:
commit
1c41157281
11 changed files with 486 additions and 364 deletions
|
|
@ -185,6 +185,8 @@ import { Result } from "@mapbox/mapbox-gl-geocoder";
|
|||
const [measurement, setMeasurement] = useState(false);
|
||||
const [measurementData, setMeasurementData] = useState<Map<string, MeasurementData>>(new Map());
|
||||
const measurementRef = useRef(measurementData);
|
||||
const zoomRef = useRef(15)
|
||||
const fieldMarkerZoom = 15
|
||||
|
||||
//watches for changes to the viewing as and sets the load boolean to trigger a load
|
||||
useEffect(() => {
|
||||
|
|
@ -591,12 +593,13 @@ import { Result } from "@mapbox/mapbox-gl-geocoder";
|
|||
}
|
||||
let newFM = fieldMarkers.get(newKey);
|
||||
if (newFM) {
|
||||
setCurrentView({
|
||||
let view = {
|
||||
latitude: newFM.lat(),
|
||||
longitude: newFM.long(),
|
||||
zoom: 12,
|
||||
zoom: currentView.zoom,
|
||||
transitionDuration: 1000
|
||||
});
|
||||
}
|
||||
setCurrentView(view);
|
||||
}
|
||||
setObjectKey(newKey);
|
||||
setFMIndexKey(newID);
|
||||
|
|
@ -621,12 +624,13 @@ import { Result } from "@mapbox/mapbox-gl-geocoder";
|
|||
}
|
||||
let newFM = fieldMarkers.get(newKey);
|
||||
if (newFM) {
|
||||
setCurrentView({
|
||||
let view = {
|
||||
latitude: newFM.lat(),
|
||||
longitude: newFM.long(),
|
||||
zoom: 12,
|
||||
zoom: currentView.zoom,
|
||||
transitionDuration: 1000
|
||||
});
|
||||
}
|
||||
setCurrentView(view);
|
||||
}
|
||||
setObjectKey(newKey);
|
||||
setFMIndexKey(newID);
|
||||
|
|
@ -728,13 +732,14 @@ import { Result } from "@mapbox/mapbox-gl-geocoder";
|
|||
subtype: fm.type(),
|
||||
mini: true,
|
||||
clickFunc: (event, index) => {
|
||||
console.log(zoomRef)
|
||||
clickDelay();
|
||||
closeDrawers();
|
||||
setIgnoreFeatures(true);
|
||||
setCurrentView({
|
||||
latitude: fm.lat(),
|
||||
longitude: fm.long(),
|
||||
zoom: 12,
|
||||
zoom: zoomRef.current,
|
||||
transitionDuration: 0
|
||||
//transitionInterpolator: new FlyToInterpolator()
|
||||
});
|
||||
|
|
@ -1115,14 +1120,16 @@ import { Result } from "@mapbox/mapbox-gl-geocoder";
|
|||
let xOff = !mobileOffset ? -250 : undefined;
|
||||
let yOff = mobileOffset ? -150 : undefined;
|
||||
|
||||
setCurrentView({
|
||||
let view = {
|
||||
latitude: lat,
|
||||
longitude: long,
|
||||
zoom: zoom,
|
||||
transitionDuration: transDuration,
|
||||
xOffset: center ? 0 : xOff,
|
||||
yOffset: center ? 0 : yOff
|
||||
});
|
||||
}
|
||||
setCurrentView(view);
|
||||
zoomRef.current = zoom
|
||||
};
|
||||
|
||||
const markerDialog = () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue