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

Valid style JSON causes infinite loading #786

Open
fenelon opened this issue Aug 29, 2022 · 1 comment
Open

Valid style JSON causes infinite loading #786

fenelon opened this issue Aug 29, 2022 · 1 comment
Labels

Comments

@fenelon
Copy link

fenelon commented Aug 29, 2022

Maputnik version: > 1.6.1
Browser: > Chrome
OS: macOS

Description of the bug:

Steps to reproduce the behavior:

  1. Have a style with a layer definition like this:
{
  "id": "water_lines_labels",
  "type": "symbol",
  "source": "osm",
  "source-layer": "water_lines",
  "minzoom": 14,
  "maxzoom": 24,
  "layout": {
    "visibility": "visible",
    "text-field": "{name}",
    "symbol-placement": "line",
    "text-pitch-alignment": "auto",
    "text-rotation-alignment": "auto",
    "text-size": 11,
    "text-anchor": "bottom",
    "text-letter-spacing": 0,
    "text-font": [
      "Backpack Regular",
      "Arial Unicode"
    ]
  },
  "paint": {
    "text-color": "rgba(255, 255, 255, 1)",
    "text-halo-color": "rgba(116, 207, 240, 1)",
    "text-halo-width": 1
  },
  "symbol-spacing": 500, 
  "text-anchor": "bottom"
}

  1. Upon trying to load this style, the editor enters an infinite loop of HTTP requests and never stops. No error message or console output is displayed.
  2. The error seems to be caused by symbol-spacing and text-anchor properties being in the root of the layer (which is malformed)

I had to binary-search by hand my style file to find it, so I hope this helps someone.

@HarelM
Copy link
Collaborator

HarelM commented Feb 4, 2024

@fenelon is this still an issue in latest version?

@HarelM HarelM added the question label Feb 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants