ag visual farm added to the dev branch field related stuff not imported yet, and the geocoder has some bugs with the new version

This commit is contained in:
csawatzky 2025-03-26 14:38:31 -06:00
parent b4da0d6859
commit 022925d7d7
41 changed files with 8895 additions and 79 deletions

View file

@ -566,7 +566,7 @@ export default function Bin(props: Props) {
};
const goToYard = (bin: IBin) => {
navigate("/fields", { state: {
navigate("/visualFarm", { state: {
long: bin.getLocation()?.longitude,
lat: bin.getLocation()?.latitude
}

26
src/pages/FieldMap.tsx Normal file
View file

@ -0,0 +1,26 @@
import AgMapController from "maps/mapObjectControllers/AgMapController";
import PageContainer from "./PageContainer";
import { useLocation } from "react-router";
export default function FieldMap() {
const location = useLocation();
return (
<PageContainer>
{location.state !== undefined &&
location.state !== null &&
location.state.long !== undefined &&
location.state.lat !== undefined ? (
<AgMapController
startingView={{
longitude: location.state.long,
latitude: location.state.lat,
zoom: 13,
transitionDuration: 0
}}
/>
) : (
<AgMapController />
)}
</PageContainer>
);
}