react-native-maps-super-cluster icon indicating copy to clipboard operation
react-native-maps-super-cluster copied to clipboard

On iOS, after pressing a cluster and zooming, pressing a marker shows it and then quickly hides it

Open findhumane opened this issue 2 years ago • 2 comments
trafficstars

Reproducible example: https://github.com/findhumane/testmapstouch

  1. git clone https://github.com/findhumane/testmapstouch
  2. cd testmapstouch
  3. npm install
  4. npx expo start --tunnel
  5. Scan the QR code in Expo Go
  6. Tap on the "3" cluster
  7. Move the map over a bit to the left
  8. Tap on the left marker
  9. The callout shows very quickly and then disappears (see demo video below)
  10. However, then, move down and to the right and tap that marker and the callout is persistent, as expected

bug.webm

Some notes:

  1. The above demonstration is with Expo SDK47 and [email protected]. The problem also happened on SDK46 and [email protected]. I was waiting to report this until I could upgrade to SDK47 and the newer react-native-maps.
  2. This issue does not happen if react-native-maps-super-cluster is not used (i.e. just react-native-maps and markers).
  3. This has been reproduced on multiple iPhones, old and new.

Any ideas?

findhumane avatar Nov 27 '22 18:11 findhumane

I noticed that the develop branch is ahead of master, and I had been forking off of master (to fix some issues integrating with newer versions of Expo). I applied the diff between develop and master and the issue is the same.

findhumane avatar Nov 27 '22 18:11 findhumane

Proximate cause and workaround described here: https://github.com/react-native-maps/react-native-maps/issues/4573#issuecomment-1369146465

diff --git a/ios/AirMaps/AIRMapMarker.m b/ios/AirMaps/AIRMapMarker.m
index 65098aa..0d66061 100644
--- a/ios/AirMaps/AIRMapMarker.m
+++ b/ios/AirMaps/AIRMapMarker.m
@@ -267,7 +267,7 @@ NSInteger const AIR_CALLOUT_OPEN_ZINDEX_BASELINE = 999;
     _calloutIsOpen = NO;
     [self setZIndex:_zIndexBeforeOpen];
     // hide the callout view
-    [self.map.calloutView dismissCalloutAnimated:YES];
+    [self.map.calloutView dismissCalloutAnimated:NO];
 
     [self setSelected:NO animated:NO];
     [self.map deselectAnnotation:self animated:NO];

findhumane avatar Jan 02 '23 19:01 findhumane