Mapbox-gl-js: "Geometry exceeds allowed extent, reduce your vector tile buffer size" during zooming in newest version

Created on 15 Aug 2019  Â·  13Comments  Â·  Source: mapbox/mapbox-gl-js

Hello there

I am using Mapbox GL and react. In the newest version (1.2.1) Mapbox throws a warning (Chrome, Mac):
Geometry exceeds allowed extent, reduce your vector tile buffer size
Sometimes already after loading, at least during navigation on the map. No layers added, no special settings, just a plain (custom) map.
Made a test with an older project (version 1.1.1). Works fine. Updating it to 1.2.1 -> Warning.

Here is an example: http://www.prod.storytelling.blick.ch/testing/mapboxgl_exceeds/
Here is the code: https://github.com/simonhuwiler/mapboxgl_exceeds

import React from 'react';
import './App.css';
import mapboxgl from 'mapbox-gl';

class App extends React.Component {

  componentDidMount()
  {
    mapboxgl.accessToken = "XXX";

    this.map = new mapboxgl.Map({
      container: this.mapContainer,
      style: 'mapbox://styles/blick-storytelling/cjghx2h8f00582rs2kk0h3c3r',
      zoom: 7,
      minZoom: 1,
      maxZoom: 15,
      center: [8.272, 46.662],
      interactive: true
    });
  }

  render() 
  {
    return (
      <div style={{width: '100%', height: '100%'}} ref={el => this.mapContainer = el} />
    )
  }
}

export default App;

Most helpful comment

This seems to be a minor issue with some tiles in Mapbox Streets on our side — you can safely ignore the warning while we investigate a fix; it shouldn't affect rendering in any way.

It's an off-by-one error (a coordinate having 16384 value while we can only allow 16383 max), and the geometry in question just gets clamped by one pixel.

All 13 comments

This is because of a bug fix in 1.2. See https://github.com/mapbox/mapbox-gl-js/pull/8479. An earlier change had changed the threshold but the warning itself wasn't updated. The warning is to let you know that GL JS is clamping the geometry to avoid visual artifacts.

I'm still seeing this same warning on 1.3.2 when zooming in/out:

Geometry exceeds allowed extent, reduce your vector tile buffer size

Was https://github.com/mapbox/mapbox-gl-js/pull/8479 supposed to fix this?

same warning

annoying

@rlueder The warning is valid. What #8479 fixed was the threshold at which the warning would be triggered. Since that PR lowered the threshold, it's likely that this warning is now more common, but it's accurate.

@ryanhamley where can I find documentation explaining how to solve this? I first assumed one of my layers was causing those warnings, but even just a base map seems to trigger them. Knowing a bit more would also help with "should I even care?". Thanks!

@rlueder This warning is actually coming from the vector tiles themselves so the recommended way to avoid it is to set smaller buffers when generating tiles. This limitation and warning aren't new, but at one point the threshold was relaxed. It was recently reverted so this warning is probably showing up more often for some users. Reducing the buffer size shouldn't have any impact on rendering. In general, this warning can probably be ignored if you're not noticing any other issues.

This is because of a bug fix in 1.2.

Seeing this warning often since 1.2 / https://github.com/mapbox/mapbox-gl-js/pull/8479, also with Mapbox sources:

Here is an example (just open the browser console) which uses the streets-v11 style /
mapbox-streets-v8 tileset:

1.4
https://jsbin.com/lovaleneku/1/edit?html,output
1.1.1
https://jsbin.com/mimutapofe/1/edit?html,output

One source layer which triggers the warning is natural_label from mapbox-streets-v8:
https://jsbin.com/nugovotufi/1/edit?html,output

Is this considered a data issue or should this be fixed within GL JS?

Old issue regarding this warning with Mapbox sources https://github.com/mapbox/mapbox-gl-js/issues/2568 and the PR which closed it https://github.com/mapbox/mapbox-gl-js/pull/2858 with some background information.

The current documentation regarding the allowed extent for geometric coordinates in vector tiles seems to be not correct: https://github.com/mapbox/mapbox-gl-js-docs/issues/102

This seems to be a minor issue with some tiles in Mapbox Streets on our side — you can safely ignore the warning while we investigate a fix; it shouldn't affect rendering in any way.

It's an off-by-one error (a coordinate having 16384 value while we can only allow 16383 max), and the geometry in question just gets clamped by one pixel.

@mourner Is there any issue/place where the state of the investigation is tracked? The thing is that this warning screws our e2e test. Not that it is critical, but would be nice to understand state of the things here.

Is there a way to disable this warning. It completely clogs up the dev console with junk. Moreover, are there any plans for a fix? Thanks

Any news about the fix? Have same warning...

+1 to fix this

Still not fixed as of today

Was this page helpful?
0 / 5 - 0 ratings

Related issues

foundryspatial-duncan picture foundryspatial-duncan  Â·  3Comments

yoursweater picture yoursweater  Â·  3Comments

iamdenny picture iamdenny  Â·  3Comments

shotor picture shotor  Â·  3Comments

Scarysize picture Scarysize  Â·  3Comments