Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Tapping on markers doesn't relayout. #5560

Closed
dapetcu21 opened this issue Jul 4, 2016 · 3 comments
Closed

Tapping on markers doesn't relayout. #5560

dapetcu21 opened this issue Jul 4, 2016 · 3 comments

Comments

@dapetcu21
Copy link

In my particular scenario, I'm trying to port Mapbox to React Native (see this huge PR for what I'm trying to do).

The problem is that markers don't show up unless I manually trigger a re-layout:

Workaround here

I haven't managed to reproduce this on the example, but I tried stripping my code bare and I can only conclude it probably has something to do to React's internal view hierarchy.

Platform: Android
Mapbox SDK version: 4.1.0

Steps to trigger behavior

  1. Initialize map inside React Native component.
  2. Add markers to the map.
  3. Tap on a marker to show its tooltip.

Expected behavior

The tooltip should show up.

Actual behavior

The tooltip doesn't show up, but if a relayout is triggered (by rotating the screen, for example), the tooltip is rendered in its correct position.

@tobrun
Copy link
Member

tobrun commented Jul 4, 2016

@dapetcu21 thank you for reaching out. As mentioned by you this isn't an issue with the Android SDK but a react related issue. Feel free to open an issue downstream in https://github.com/mapbox/react-native-mapbox-gl/issues. Closing for now.

@tobrun tobrun closed this as completed Jul 4, 2016
@dapetcu21
Copy link
Author

dapetcu21 commented Jul 4, 2016

You have misunderstood me. I'm not talking about finding a bug while using react-native-mapbox-gl. I'm talking about the fact that I found a bug in mapbox-gl-native while working on react-native-mapbox-gl.

It could be a react-native issue, at most, but I think it's very unlikely for it to be that. The easiest explanation is that the issue is most likely in mapbox-gl-native and that it happens to manifest when being used with RN.

@dapetcu21
Copy link
Author

I'll investigate further and try to reproduce it without RN, though.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants