nitaliano / react-native-mapbox-gl

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

Overlapping polygons at tile buffer when location dot enabled #1130

Open kbauhausness opened 6 years ago

kbauhausness commented 6 years ago

On an Android device, darker/more opaque areas appear along what looks like the tile buffer. Looks like when the location dot is on a tile, it's the polygon on that tile that renders with a darker overlapping area. No need to zoom to reproduce.

Found using react-native-mapbox-gl version 6.1.0, which pulls in Android SDK version 5.4.1 (and iOS SDK version 3.7.3).

image 4

nitaliano commented 6 years ago

At first glance this is for sure related to the accuracy layer around the user location with the id mapbox-location-accuracy-layer, when I hide that layer when the map camera stops moving this artifact disappears.

kbauhausness commented 6 years ago

Thanks @nitaliano. Note when troubleshooting, we also did a test in the MacOS test app from gl native using a proxy for the accuracy layer (a transparent circle) and some other semi-transparent polygons, but weren't able to replicate the issue that way. We used this style.

Also, may be worth trying to replicate this on iOS as I've heard that the overlapping polygons at tile buffer has been seen on iOS too.

nitaliano commented 6 years ago

Ok, I'll try that style out in my test project on iOS and I'll let you know what happens.

jluxenberg-scoot commented 6 years ago

@nitaliano @kbauhaus Any update you can share?

nitaliano commented 6 years ago

I haven't been able to reproduce this issue yet on iOS.

From the react native standpoint while using a user location icon we won't be able to see this behavior on iOS since that is an annotation view, and Android is using sources/layers.

Some potential possible quick fixes could be

nitaliano commented 6 years ago

@jluxenberg-scoot I can make a PR where we hide the accuracy-layer for now if you would like to test it out?

garymccormick commented 6 years ago

Hey @nitaliano was Jared's test app useful in reproducing this? Any luck implementing a long term solution for this bug?

nitaliano commented 6 years ago

@garymccormick I was able to reproduce this issue only on Android.

If this is indeed caused by a circle layer interacting with a tile boundary the long term fix would exist in gl-native which this repo doesn't have much control over.

We can however work around the issue in this repo, and I can submit a PR with a fix if you're willing to test it out?

ralphking commented 6 years ago

screen shot 2018-05-30 at 13 19 11

I have a similar issue on gl-js in the browser.