finished designing the list and mobile view of the field list
This commit is contained in:
parent
3567190c3a
commit
4db21a3d0c
9 changed files with 287 additions and 113 deletions
|
|
@ -6,7 +6,7 @@ interface Props {
|
|||
objectCollection: FeatureCollection;
|
||||
measurementCollection?: FeatureCollection;
|
||||
showTitle?: boolean;
|
||||
setInteractiveLayers: (layers: string[]) => void;
|
||||
setInteractiveLayers?: (layers: string[]) => void;
|
||||
}
|
||||
|
||||
export default function GeoMapLayer(props: Props) {
|
||||
|
|
@ -18,7 +18,9 @@ export default function GeoMapLayer(props: Props) {
|
|||
// }, [measurementCollection, objectCollection]);
|
||||
|
||||
useEffect(() => {
|
||||
setInteractiveLayers(["shapefill", "shapeborder", "measurementBorder"]);
|
||||
if(setInteractiveLayers){
|
||||
setInteractiveLayers(["shapefill", "shapeborder", "measurementBorder"]);
|
||||
}
|
||||
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
||||
|
||||
return (
|
||||
|
|
@ -60,6 +62,7 @@ export default function GeoMapLayer(props: Props) {
|
|||
/>
|
||||
)}
|
||||
</Source>
|
||||
{measurementCollection &&
|
||||
<Source type="geojson" data={measurementCollection} id={"measurements"}>
|
||||
<Layer
|
||||
id="measurementBorder"
|
||||
|
|
@ -90,6 +93,7 @@ export default function GeoMapLayer(props: Props) {
|
|||
}}
|
||||
/>
|
||||
</Source>
|
||||
}
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue