Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS - Metal - v6.1.0] - lineDashPattern with steps disappears #2130

Closed
nitrag opened this issue Feb 20, 2024 · 5 comments · Fixed by #3010
Closed

[iOS - Metal - v6.1.0] - lineDashPattern with steps disappears #2130

nitrag opened this issue Feb 20, 2024 · 5 comments · Fixed by #3010
Assignees
Labels
bug Something isn't working metal

Comments

@nitrag
Copy link
Contributor

nitrag commented Feb 20, 2024

Describe the bug
A line with a dash pattern + steps (forMLNStepping) will disappear or fail to render at certain zooms. Video compares iOS 5.13 and v6.

To Reproduce

let styleLayer = MLNLineStyleLayer(identifier: layer.title, source: publishedVector)
styleLayer.sourceLayerIdentifier = "title"
styleLayer.minimumZoomLevel = 4
styleLayer.maximumZoomLevel = 18
styleLayer.lineColor = NSExpression(forConstantValue: UIColor.green)
styleLayer.lineWidth = NSExpression(forMLNInterpolating: .zoomLevelVariable,
                                   curveType: .linear,
                                   parameters: NSExpression(forConstantValue: 1),
                                   stops: NSExpression(forConstantValue: [4: 4,
                                                                          12: 5,
                                                                          15: 6]))
styleLayer.lineCap = NSExpression(forConstantValue: "round")
styleLayer.lineJoin = NSExpression(forConstantValue: "round")
styleLayer.lineDashPattern = NSExpression(forMLNStepping: .zoomLevelVariable,
                                          from: NSExpression(forConstantValue: [0.25, 1.5]),
                                          stops: NSExpression(forConstantValue: [
					                        9: NSExpression(forConstantValue: [1.0, 2.0]),
					                        16: NSExpression(forConstantValue: [2.0, 2.0])
					                      ]))
style.addLayer(styleLayer)

Expected behavior
The line renders correctly without disappearing.

Screenshots
If applicable, add screenshots to help explain your problem.

v5

maplibre-dashpattern-v5-13.MP4

v6

maplibre-dashpatthern-v6-1.MP4

Platform information (please complete the following information):

  • OS: iOS
  • Platform: iOS
  • Version v6.1
@nitrag nitrag added the bug Something isn't working label Feb 20, 2024
@louwers louwers added the metal label Feb 20, 2024
@louwers
Copy link
Collaborator

louwers commented Feb 21, 2024

Thanks for the detailed bug report!

Is there any chance you can share the style used? Or another style that replicates the problem? This would help with debugging.

cc @sjg-wdw

@nitrag
Copy link
Contributor Author

nitrag commented Feb 22, 2024

Here is a minimal reproducible sample app using MapLibre v6.1, XCode 15.2, latest Swift v5, and iOS 17.2.

MapLibreBugDashArray_v6_1.zip

@matthiaskmt
Copy link

I'm also experiencing this issue with our style implementation. Is there any update on this issue?

@louwers
Copy link
Collaborator

louwers commented Nov 7, 2024

@matthiaskmt Could you try the latest version just to make sure the bug is still present?

@sjg-wdw What do you think?

@matthiaskmt
Copy link

I'm currently using 6.8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working metal
Projects
Status: Draft
Development

Successfully merging a pull request may close this issue.

4 participants