geojson-tile-server icon indicating copy to clipboard operation
geojson-tile-server copied to clipboard

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

Open boeckMt opened this issue 3 years ago • 0 comments

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.

  • https://github.com/TNOCS/geojson-tile-server/blob/master/src/server.ts#L99
  • https://github.com/TNOCS/geojson-tile-server/blob/master/src/server.ts#L108
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

  • https://github.com/TNOCS/geojson-tile-server/blob/master/src/server.ts#L90

It there are no features in the title, this should maybe be extra handled https://github.com/mapbox/mapbox-gl-js/issues/9304

boeckMt avatar Aug 11 '21 13:08 boeckMt

Flash object does not recognize params after "?". I pass params via route, /:param1/:param2/:param3

over avatar Feb 17 '10 19:02 over