nitaliano / react-native-mapbox-gl

A Mapbox GL react native module for creating custom maps
Other
2.16k stars 697 forks source link

Some items on SymbolLayer disappear if overlapped #1521

Closed winseyli closed 5 years ago

winseyli commented 5 years ago

We use the ShapeSource with SymbolLayer to display the map markers. For MapboxGL.StyleSheet style applied on this markers, iconAllowOverlap: true and iconIgnorePlacement: true are set. Is there any other settings are required to prevent the markers from disappearing? Thank you.

53702643-06a03c80-3e6e-11e9-9485-2e6a5a0f12e553702644-0738d300-3e6e-11e9-8913-e53c4b528ebf

onitzschke commented 5 years ago

Is it zoom dependent? I have the same issue with SymbolLayer. There is a option for point shape to disable the clustering.

onitzschke commented 5 years ago

Duplicate https://github.com/mapbox/react-native-mapbox-gl/issues/1356

kristfal commented 5 years ago

Ok, closing in favor of #1356

winseyli commented 5 years ago

Yes it is happening when zoom out. So the solution is cluster={false} on MapboxGL.ShapeSource but it doesn't work as mentioned in #1356 ?

winseyli commented 5 years ago

Hi there. I think the issue is not exactly the same as #1356 because if I remove the textField value on the SymbolLayer's style, the map markers will not disappear.

winseyli commented 5 years ago

Hey I found the problem is solved when I add textAllowOverlap: true as style of the SymbolLayer. For anyone reading this and having the same problem please make sure

    iconAllowOverlap: true,
    textAllowOverlap: true,
    iconIgnorePlacement: true,
    textIgnorePlacement: true,

are added!

LucasYver commented 5 years ago

THANKS THANKS THANKS !!!