You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to render a custom tooltip positioned properly above the marker as Callout doesn't seem to handle centering well. I have custom markers and am hoping to store the MarkerPressEvent#position to state which will position the tooltip.
return(<Markercoordinate={{latitude: location.lat,longitude: location.lng}}identifier={datum.id}key={datum.id}onPress={event=>console.log(event)}// this event doesn't match `MarkerPressEvent`><View>{clickedMarker===i&&(<Calloutstyle={[mapStyles.callout]}tooltip><View><Typography>{datum.locationName}</Typography></View><Viewstyle={mapStyles.triangle}></View></Callout>)}<MapPinIcon/></View></Marker>
However, when I try to access the position value for that marker, it's undefined. I also tried the onMarkerPress event from the MapView itself and this too is undefined.
Am I doing something wrong in terms of accessing the MarkerPressEvent?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am trying to render a custom tooltip positioned properly above the marker as
Callout
doesn't seem to handle centering well. I have custom markers and am hoping to store theMarkerPressEvent#position
to state which will position the tooltip.However, when I try to access the
position
value for that marker, it's undefined. I also tried theonMarkerPress
event from theMapView
itself and this too is undefined.Am I doing something wrong in terms of accessing the
MarkerPressEvent
?Beta Was this translation helpful? Give feedback.
All reactions