Closed fedeojeda95 closed 6 years ago
Thanks for the report @fedeojeda95.
Out of curiosity, have you tried this on Android?
/cc @kkaefer @jfirebaugh
Thanks for the answer @julianrex. The exact same source and layers on Android work perfectly on version 5.5.1 of the Android SDK.
Can you post the GeoJSON?
Hi @jfirebaugh. I can post the GeoJson, indeed. I'd like to remind that it's not only happening for this specific GeoJson, it's happening for a lot of different ones. I'll post it nevertheless.
Hope this helps to reproduce it. Thank you very much!
@fedeojeda95 I'm unable to reproduce your case with a simple line layer. Are you able to share a sample project that demonstrates the problem?
Hi! I created a sample project where I could reproduce the bug. I pushed it on a repo because I didn't know another way to send it. I commented out the method in the AppDelegate where the API key is set for obvious reasons. The url is the following one: https://github.com/fedeojeda95/MapboxDrawingBug
Here is a GIF of what's happening. On the original project, it happens even more.
I tested it both on simulator and on a phisical device (iphone 8). Thanks!
Thanks @fedeojeda95 - can confirm I'm seeing the same results as you, so thanks so much for the sample project.
/cc @kkaefer
Heads up that @mollymerp just confirmed that https://github.com/mapbox/mapbox-gl-native/pull/12982 fixes this issue! 🎉
Sounds good! I'll try it out as soon as that is merged and a version is release 🎉
closed by #12982
The bug persists on SDK 7.1.1 [android version]
After upgrading from version 3.7 of the iOS SDK to version 4.1, the behaviour of layers has been inconsistent. Particularly, the drawing of layers from a GeoJson has been extremely inconsistent. With some layers, specifically lineLayers, the drawing is changed unexpectedly when zooming in and zooming out.
To give some context for the issue, I'm adding a single GeoJson source (
MGLShapeSource
created with aMGLShapeCollectionFeature
). Afterwards, I'm adding severalMGLLineStyleLayer
with that source.As en example, when I load a map with the GeoJson and it's layers, it looks like the following:
When I zoom in a little bit, the drawing changes completely, by removing some parts and adding some unexpected ones
When I zoom out, it changes how the layers are drawn in an even weirder way, by adding one line:
In order to verify that the source (the GeoJson) is correct and is not a malformed json, I tried using the web http://geojson.io/. When putting the GeoJson used as the source there, it shows it correctly, as it is first rendered.
On our application, we also implemented the touch event on each feature in order to show a small callout view. Even though the shape is drawn incorrectly, the touch events are recognized on the original lines (where the correct shape should be drawn). I believe this may imply that the source and layers are correct, but the drawing is wrong
I could not find any reason why this could be happening. Even though I used this example, this is happening with several sources and layers of different types. If you need any further information on how to reproduce this, please feel free to ask for it.
Steps to reproduce
Expected behavior
The maps renders correctly with the layers
Actual behavior
The layers are not shown correctly, the drawing changes randomly
Configuration
Mapbox SDK versions: 4.1.1, but happens with every 4.* version iOS/macOS versions: 11.2, but happens with any version Device/simulator models: iPhone 8 (Real device), iPad Pro (Simulator), iPhone X (simulator). I haven't found a device where it doesn't happen Xcode version: 9.2
Thank you very much!