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

"Geometry exceeds allowed extent, reduce your vector tile buffer size" during zooming in newest version #8639

Closed
simonhuwiler opened this issue Aug 15, 2019 · 13 comments

Comments

@simonhuwiler
Copy link

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;
@ryanhamley
Copy link
Contributor

This is because of a bug fix in 1.2. See #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.

@rlueder
Copy link

rlueder commented Sep 26, 2019

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 #8479 supposed to fix this?

@yumindeckard
Copy link

same warning

annoying

@ryanhamley
Copy link
Contributor

@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.

@rlueder
Copy link

rlueder commented Oct 3, 2019

@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!

@ryanhamley
Copy link
Contributor

@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.

@pathmapper
Copy link
Contributor

pathmapper commented Oct 6, 2019

This is because of a bug fix in 1.2.

Seeing this warning often since 1.2 / #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 #2568 and the PR which closed it #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

@mourner
Copy link
Member

mourner commented Oct 8, 2019

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.

@dmytro-gokun
Copy link
Contributor

@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.

@vgoklani
Copy link

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

@Absvep
Copy link

Absvep commented Nov 19, 2019

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

@rebz
Copy link

rebz commented Nov 19, 2019

+1 to fix this

@Dagge1
Copy link

Dagge1 commented Nov 21, 2019

Still not fixed as of today

@mapbox mapbox locked and limited conversation to collaborators Nov 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests