Mapbox-gl-js: "Geometry exceeds allowed extent" warning from Mapbox tiles

Created on 13 May 2016  路  5Comments  路  Source: mapbox/mapbox-gl-js

This warning is being triggered on data in Mapbox tiles.

To reproduce, npm start and load http://localhost:9966/#7.92/-0.176/0.063.

The layer is "marine-label-sm-ln", tile is https://a.tiles.mapbox.com/v4/mapbox.mapbox-terrain-v2,mapbox.mapbox-streets-v7/7/63/63.vector.pbf

release blocker

Most helpful comment

I'm getting this error in the same situation as @geoangelotti, and I don't want to fall back to setting height in vh because it will mess up my layout. :( Does anyone have ideas on how to fix it?

All 5 comments

The offending x coordinate is 16384, one more than the EXTENT_MAX of 16383. I know there was some discussion of off-by-one errors in the original PR; looks like there's still some of these lurking in either this code or our VT generation code.

cc @yhahn @ansis

After a bit of digging, here is my understanding of the problem:

  • Mapnik supports buffer sizes up to and including the extent size
  • our marine label layer has a buffer size equal to its extent size
  • GL JS supports buffer sizes up to _but not including_ the extent size (due to how we pack coordinates into our StructArrays)

The fix is to:

  • [ ] adjust how we pack coordinates into our StructArrays to allow the full range of allowed buffer sizes here
  • [ ] centralize our extent conversion math
  • [ ] clearly document our extent conversion math and add some light background on vector tile extents and buffers
  • [ ] port this change to GL Native

Thanks to @flippmoke and @ajashton for the help!

When I zoom out fast enough at load time in streets-v8, I got allot of those errors?

PS Always performance above graphics please :P same as in video games :)

For some reason i got this error when I had width="100%" height="100%" inside my MapGL component.

After removing it and assigning the height and width on the viewport the warning disappeared.

I'm getting this error in the same situation as @geoangelotti, and I don't want to fall back to setting height in vh because it will mess up my layout. :( Does anyone have ideas on how to fix it?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Scarysize picture Scarysize  路  3Comments

BernhardRode picture BernhardRode  路  3Comments

stevage picture stevage  路  3Comments

jfirebaugh picture jfirebaugh  路  3Comments

rasagy picture rasagy  路  3Comments