PointAnnotation not loading icons/markers, MarkerView doesn't have click event even if i ad touchable opacity it does not work can some help!! #2833
Unanswered
sabinsthnp
asked this question in
Q&A
Replies: 2 comments 1 reply
-
I wouldn't expect PointAnnotation to work outside of a MapView. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Hi mate, it's a bit late now but I found a workaround for this. The |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
const Marker = ({ selectedCordinates,coordinate, image, id,data}) => {
console.log("🚀 ~ file: MapBox.js:74 ~ Marker ~ selectedCordinates:", selectedCordinates,coordinate)
const dispatch = useDispatch();
const componentRef = useRef(null)
const clickHandle = () => {
console.log(":::Opening Details:::");
navigate(dashboard, { page: PROSHOP, passedData: {item:data.data}})
dispatch(setSelectedCoordinates([parseInt(coordinate.longitude),parseInt(coordinate.latitude)]))
};
return (
<MapboxGL.PointAnnotation
// centerCoordinate={coordinate}
// key="PointAnnotation"
id={
place-${id}
}isSelected={true}
title="Test"
anchor={{ x: 0.5, y: 1.0 }}
// key={
place-${data?.data?.vendor_id || data?.data?.id}
}// draggable
// onDragEnd={(data)=>{console.log("drag end",data);}}
coordinate={coordinate}
onSelected={clickHandle}
>
);
};
Beta Was this translation helpful? Give feedback.
All reactions