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

Server is pending if tile not found (*.mvt and *.vt) #7

Open
boeckMt opened this issue Aug 11, 2021 · 0 comments
Open

Server is pending if tile not found (*.mvt and *.vt) #7

boeckMt opened this issue Aug 11, 2021 · 0 comments

Comments

@boeckMt
Copy link

boeckMt commented Aug 11, 2021

If the requested tile is null (so tileIndexes[layer].getTile(z, x, y) is not finding the tile in tileIndexes) there also should be a response not only return in the Express route otherwise the browser is stuck in a pending request.

E.g.

app.get("/:layer/:z/:x/:y...", (req, res) => {
    const { tile } = getTile(req, res);
    if (!tile || !tile.features) {
+     res.sendStatus(404);
      return;
    }
    ...
  });

I think this would also be good for *..geojson

It there are no features in the title, this should maybe be extra handled mapbox/mapbox-gl-js#9304

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant