-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Polyline annotations have miter join #7714
Comments
Thanks @andrewstay. Can you say if there is a reason you are not using the new (in 3.4.0) runtime styling API? That API would allow you to fully control line joins, caps, etc. |
This seems to be a regression from v3.3.0. You can see the original behavior in #1771 (comment): not perfect in all cases, but better than what you’re seeing. See also #1734 (comment), which would’ve exposed more styling options for annotations. As @boundsj notes, the runtime styling API provides many more styling options for polylines. That API should serve as a workaround for this issue, and indeed you may find that it better suits your needs than the annotation API. /cc @incanus |
There also seems to be an issue with the way that line ends meet with Here is the code that I used: https://gist.github.com/jmkiley/7296db34d52a51f5b1b2b4ebee1e903f The corner looks fine initially, but the line overlap becomes visible once you zoom in: The other corners render as expected for both One potential workaround is to use a |
Thanks @jmkiley – apparently I misread the original issue description. It looks like we automatically produce a miter join at some zoom levels but fail to do so at other zoom levels, which is surprising. Postponing to v3.5.0, because a fix would need to happen in mbgl. |
From the core side, the failure to join endpoints here is not a bug. This is the behavior of a feature added as an Left: polygon; right: polyline: I do find it strange that it joins smoothly when zoomed out. I assume this has to do with how we simplify GeoJSON. @mourner @jfirebaugh, I'm looking through this but can't tell for sure — would geojson-vt-cpp simplify a LineString with identical beginning and endpoints into a Polygon? |
No. |
This behavior looks like a bug to me, and happens because the code decides whether or not to join the start and end point together not based on whether the feature is a |
To clarify: |
Platform: iOS
Mapbox SDK version: ios-v3.4.0-beta.7
Steps to trigger behavior
MGLPolyline
as following:-[MGLMapViewDelegate mapView:lineWidthForPolylineAnnotation:]
Expected behavior
Line should be either smoothly joined or the join style should be somehow exposed by SDK to the client
Actual behavior
Bad line joining
The text was updated successfully, but these errors were encountered: