File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
packages/maps/src/components Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -180,12 +180,19 @@ class MapView<T> extends React.Component<
180180 }
181181
182182 // Dismiss all other callouts except the one just pressed. Maintains that only one is opened at a time
183- private onMarkerPress ( markerIdentifier : string ) {
184- for ( const [ idenfitifer , markerRef ] of this . markerRefs ) {
185- if ( idenfitifer !== markerIdentifier ) markerRef . current ?. hideCallout ( ) ;
183+ // Web specfic, this is the default on native
184+ private dismissAllOtherCallouts ( markerIdentifier : string ) {
185+ if ( Platform . OS === "web" ) {
186+ for ( const [ idenfitifer , markerRef ] of this . markerRefs ) {
187+ if ( idenfitifer !== markerIdentifier ) markerRef . current ?. hideCallout ( ) ;
188+ }
186189 }
187190 }
188191
192+ private onMarkerPress ( markerIdentifier : string ) {
193+ this . dismissAllOtherCallouts ( markerIdentifier ) ;
194+ }
195+
189196 private getMarkerRef ( markerIdentifier : string ) {
190197 if ( this . markerRefs . has ( markerIdentifier ) ) {
191198 return this . markerRefs . get ( markerIdentifier ) ;
You can’t perform that action at this time.
0 commit comments