Mapbox-gl-js: Geometry displays wrong on some zooms

Created on 6 Dec 2019  Â·  10Comments  Â·  Source: mapbox/mapbox-gl-js

mapbox-gl-js version:
1.4.1 and 1.6.0 (did not test older)

browser:
Chrome or Firefox (tested on FF developers edition 71.0b12)

Steps to Trigger Behavior

  1. http://jsfiddle.net/k98habm4/3/
  2. zoom in (or out) on west bloomfield

at some zooms it looks like:
image

at others zooms it looks like:
image

Expected Behavior

That the shape will not change with zoom. And will match what that geojson looks like on http://geojsonlint.com/ (edit: or if the geojson is invalid for some reason then gives an error with why.)

Actual Behavior

Geometry pops in and out.

bug

Most helpful comment

This appears to be a bug in Earcut — investigating over at https://github.com/mapbox/earcut/issues/131

All 10 comments

/cc @mourner

Thanks for the solid reproduction @Eh2406 , this is probably related to #9072 as well.

This is pretty evident on a map I am working on. It is one of the things blocking us releasing this map we are excited about. Is there something I (or SEMCOGs customer care rep) can do to help investigate?

It happens when there's more than 2 sets of polygon.

@cs09g Yes, I did notice that when there is only one hole in the polygon the problem goes away. Our polygons come with many holes. Is there some way we can use your observation? Or, was it to help track down how to fix the bug?

This appears to be a bug in Earcut — investigating over at https://github.com/mapbox/earcut/issues/131

We think we are seeing related issues using the latest version of Earcut. Would you be able to post a cdn link to the latest mapbox gl build so that we can make an example?

Sorry I didn't see that in the changelog. We will continue our experimentation with that new version.

Would this problem also be evident in mapbox studio? I'm having a similiar type issue.

https://gis.stackexchange.com/questions/351470/mapbox-studio-distorts-and-removes-polygons-in-tileset

I'm making a reproducible now. Should I jump into this thread here?

Was this page helpful?
0 / 5 - 0 ratings