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:
parent
b4da0d6859
commit
022925d7d7
41 changed files with 8895 additions and 79 deletions
|
|
@ -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
26
src/pages/FieldMap.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue