Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sirmmo committed Nov 27, 2024
1 parent 35f4088 commit 0948eeb
Showing 1 changed file with 31 additions and 35 deletions.
66 changes: 31 additions & 35 deletions src/app/components/Map/VectorWrapperLayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,19 @@ export const VectorWrapperLayer = (props: any) => {
};
// console.log(payload)
selectCallback(payload);
if (
currentTimeSerie &&
currentTimeSerie.values &&
currentTimeSerie.values.length > 0
) {
setTimeout(() => {
try {
popupRef.current.openPopup();
} catch (ex) {
console.log(ex);
}
}, 550);
}
//if (
// currentTimeSerie &&
// currentTimeSerie.values &&
// currentTimeSerie.values.length > 0
//) {
setTimeout(() => {
try {
popupRef.current.openPopup();
} catch (ex) {
console.log(ex);
}
}, 550);
//}
}
});
map.addLayer(_vectorLayer);
Expand All @@ -108,28 +108,24 @@ export const VectorWrapperLayer = (props: any) => {
return (
selectedPoint && (
<Pane name="custom" style={{ zIndex: 1000 }}>
{currentTimeSerie &&
currentTimeSerie.values &&
currentTimeSerie.values.length > 0 && (
<CircleMarker
ref={popupRef}
center={[selectedPoint.latlng.lat, selectedPoint.latlng.lng]}
radius={2}
pathOptions={{ color: '#164d36' }}
>
<Popup>
<Box sx={PopupStyle}>
<MapPopup
openCharts={openCharts}
value={selectedPoint}
currentTimeserie={currentTimeSerie}
unit={unit}
precision={precision}
></MapPopup>
</Box>
</Popup>
</CircleMarker>
)}
<CircleMarker
ref={popupRef}
center={[selectedPoint.latlng.lat, selectedPoint.latlng.lng]}
radius={2}
pathOptions={{ color: '#164d36' }}
>
<Popup>
<Box sx={PopupStyle}>
<MapPopup
openCharts={openCharts}
value={selectedPoint}
currentTimeserie={currentTimeSerie}
unit={unit}
precision={precision}
></MapPopup>
</Box>
</Popup>
</CircleMarker>
</Pane>
)
);
Expand Down

0 comments on commit 0948eeb

Please sign in to comment.