maps icon indicating copy to clipboard operation
maps copied to clipboard

[Bug]: MarkerView and iOS (Gestures won't work on iOS with 20 MarkerViews)

Open atif089 opened this issue 11 months ago • 7 comments

Mapbox Implementation

Mapbox

Mapbox Version

11.4.1 and up to 11.9.0

React Native Version

0.76.5

Platform

iOS

@rnmapbox/maps version

10.1.33

Standalone component to reproduce

Observed behavior and steps to reproduce

I am running into this issue where I have a bunch of MarkerViews (roughly 20-30). As soon as I render these, I'm unable to pan or zoom the map anymore. It would work at some points, but mostly won't work on the map

I don't know if it is related to hit boxes or anything else, but if I zoom out to a different location where I don't have markers anymore, then it works.

Is there any way I can debug and publish more report on whats going on?

And it works perfectly fine on Android, but not on iOS

I can try to recreate this for the demo, but I fear it might not be reproducible.

image

react-native": "^0.76.5",
"expo": "~52.0.20",
"@rnmapbox/maps": "^10.1.33",

app.config

RNMapboxMapsVersion: "11.9.0"

Expected behavior

Panning and Zooming Gestures should work

Notes / preliminary analysis

  1. Works fine on Android but not on iOS
  2. If I render null inside MarkerView then it works fine
  3. Doesn't matter what is inside MarkerView (Text/View etc and not does its width/height)

Additional links and references

console.log(1);

atif089 avatar Jan 03 '25 17:01 atif089

Additional Info: It works fine when I have 1 MarkerViews and starts breaking with 8.

atif089 avatar Jan 03 '25 17:01 atif089

Stumbled upon this, wondering if it has anything to do.

https://github.com/rnmapbox/maps/blob/fa80ae549a65d8473cd731f79f57a65fcc9c9fbc/src/components/MarkerView.tsx#L102-L107

atif089 avatar Jan 03 '25 17:01 atif089

Same issue here!

jamesbtlr avatar Jan 10 '25 17:01 jamesbtlr

Images may overlap the map view. Try debugging the images used for markers (e.g., add a backgroundColor to the image wrapper)

yuriydrobniy avatar Jan 27 '25 10:01 yuriydrobniy

I've tried the above already. For some reason, even if I have a small image (e.g. 50x50px) it renders a seemingly much larger invisible layer, and they all start to overlap each other. Which stops the map interactions from working, so no pinch and zoom, rotation, touches etc.

jamesbtlr avatar Feb 07 '25 20:02 jamesbtlr

Same problem here.

pauloamc avatar Feb 28 '25 17:02 pauloamc

@atif089 unrelated to this issue, but I see you got images working on react native 0.76.5. There's an outstanding issue where images are not showing. Did you do anything special to get those images to show?

https://github.com/rnmapbox/maps/issues/3695

kevinxu3 avatar May 22 '25 17:05 kevinxu3