diff --git a/docs/components/MapView.md b/docs/components/MapView.md index 0ab33ea..530665f 100644 --- a/docs/components/MapView.md +++ b/docs/components/MapView.md @@ -524,6 +524,16 @@ The emitted frequency of regiondidchange events _defaults to:_ `500` +### deselectAnnotationOnTap + +```tsx +boolean +``` +Set to true to deselect any selected annotation when the map is tapped. If set to true you will not receive +the onPress event for the taps that deselect the annotation. Default is false. + +[Show Point Annotations](../examples/Annotations/ShowPointAnnotation) + diff --git a/docs/components/PointAnnotation.md b/docs/components/PointAnnotation.md index 66dcdee..7b81a82 100644 --- a/docs/components/PointAnnotation.md +++ b/docs/components/PointAnnotation.md @@ -181,4 +181,4 @@ On v10 and pre v10 android point annotation is rendered offscreen with a canvas - +[Show Point Annotations](../examples/Annotations/ShowPointAnnotation) diff --git a/docs/examples/Annotations/ShowPointAnnotation.md b/docs/examples/Annotations/ShowPointAnnotation.md index bb204cb..ff64f2e 100644 --- a/docs/examples/Annotations/ShowPointAnnotation.md +++ b/docs/examples/Annotations/ShowPointAnnotation.md @@ -1,6 +1,6 @@ --- title: Show Point Annotations -tags: [PointAnnotation] +tags: [PointAnnotation, MapView#deselectAnnotationOnTap, PointAnnotation#refresh, getAnnotationsLayerID] custom_props: example_rel_path: Annotations/ShowPointAnnotation.tsx custom_edit_url: https://github.com/rnmapbox/maps/tree/master/example/src/examples/Annotations/ShowPointAnnotation.tsx @@ -150,6 +150,7 @@ const ShowPointAnnotation = () => { ]); }} style={styles.matchParent} + deselectAnnotationOnTap={true} >