Skip to content

Mapbox line-pattern distorts the image #8752

Open

Description

@alexcza

I am applying line-pattern property to a Line but the result is distorted.

The image width is a factor of two (32 or 64px) and I am using a fixed width for the line (I am not trying to scale it with the zoom - which is much worse btw)

paint: {
'line-pattern':fillPatternName,
'line-width': 32,
},

Example:
Here is the pattern: https://imgur.com/a/uJqkkTj
And this is the actual result: https://imgur.com/a/4sj1jgv

As you can see it will create an angle in the pattern and also the repeat is inconsistent as it will start repeating the pattern without finishing the previous pattern draw (overlaping).

Activity

  1. alexcza commented on Sep 12, 2019

    @alexcza
    Author

    This is only happening if I am passing a multipoint line, for a simple line just from A to B it looks acceptable

  2. asheemmamoowala commented on Jan 2, 2020

    @asheemmamoowala
    Contributor

    @alexcza Can you please provide a minimal reproducing sample to help us diagnose the underlying issue.

  3. asheemmamoowala commented on Jan 3, 2020

    @asheemmamoowala
    Contributor

    Closing this ticket for lack on information.

    The issue can be reopened if you can provide a minimal, complete, verifiable demonstration of the issue. We recommend using https://jsbin.com. Please include information about the browser version and operating system used. This helps the maintainers and community understand and address the problem accurately.

  4. jrdb commented on Jan 6, 2020

    @jrdb
  5. astojilj commented on Aug 29, 2024

    @astojilj
    Contributor

    This is resolved for geoJSON source, PTAL at https://docs.mapbox.com/mapbox-gl-js/example/line-pattern and distortion-free dotted pattern line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions