Пример #1
0
  /** NB The following code is shared across Google Maps, Mobile Google Maps and Virtual Earth */
  public void handleRequest(ConveyorTile tile) throws GeoWebCacheException {
    if (tile.getHint() != null) {
      // boolean requestTiled = true;

      if (tile.getHint().equals("not_cached,not_metatiled")) {
        // requestTiled = false;
      } else if (!tile.getHint().equals("not_cached")) {
        throw new GeoWebCacheException("Hint " + tile.getHint() + " is not known.");
      }

      TileLayer tl = tld.getTileLayer(tile.getLayerId());

      if (tl == null) {
        throw new GeoWebCacheException("Unknown layer " + tile.getLayerId());
      }

      if (!tl.isCacheBypassAllowed().booleanValue()) {
        throw new GeoWebCacheException(
            "Layer " + tile.getLayerId() + " is not configured to allow bypassing the cache.");
      }

      tile.setTileLayer(tl);
      tl.getNoncachedTile(tile);

      Service.writeTileResponse(tile, false);
    }
  }