Package org.geoserver.wms

Examples of org.geoserver.wms.WebMap


     * @see WebMap#getResponseHeaders()
     */
    @Override
    public String[][] getHeaders(Object value, Operation operation) throws ServiceException {
        Assert.isInstanceOf(WebMap.class, value);
        WebMap map = (WebMap) value;
        String[][] responseHeaders = map.getResponseHeaders();
        return responseHeaders;
    }
View Full Code Here


     * @see WebMap#getResponseHeaders()
     */
    @Override
    public String[][] getHeaders(Object value, Operation operation) throws ServiceException {
        Assert.isInstanceOf(WebMap.class, value);
        WebMap map = (WebMap) value;
        String[][] responseHeaders = map.getResponseHeaders();
        return responseHeaders;
    }
View Full Code Here

        mapContent.getRequest().setBbox(
            new Envelope(-0.17578125, -0.087890625, 0.17578125, 0.087890625));
        mapContent.getRequest().getFormatOptions().put("min_zoom", "10");
        mapContent.getRequest().getFormatOptions().put("max_zoom", "11");
       
        WebMap map = format.produceMap(mapContent);
        GeoPackage geopkg = createGeoPackage(map);

        assertTrue(geopkg.features().isEmpty());
        assertTrue(geopkg.rasters().isEmpty());
        assertEquals(1, geopkg.tiles().size());
View Full Code Here

            maxY = maxRow == null? maxY : Math.min(maxRow, maxY);
           
            for (long x = minX; x < maxX; x++) {
                for (long y = minY; y < maxY; y++) {
                    req.setBbox(new Envelope( xOffset + x * resX , xOffset + (x+1) * resX, yOffset + y * resY, yOffset + (y+1) * resY));
                    WebMap result = webMapService.getMap(req);
                    Tile t = new Tile();
                    t.setZoom(matrix.getZoomLevel());
                    t.setColumn((int) x);
                    t.setRow((int) y);
                    t.setData(toBytes(result));
View Full Code Here

        mapContent.getRequest().setBbox(
            new Envelope(-0.17578125, -0.087890625, 0.17578125, 0.087890625));
        mapContent.getRequest().getFormatOptions().put("min_zoom", "10");
        mapContent.getRequest().getFormatOptions().put("max_zoom", "11");
       
        WebMap map = format.produceMap(mapContent);
        MBTilesFile mbtiles = createMbTilesFiles(map);
       
        MBTilesMetadata metadata = mbtiles.loadMetaData();
       
        assertEquals("World_Lakes", metadata.getName());
View Full Code Here

        checkArgument(arguments.length == 1);
        checkArgument(arguments[0] instanceof GetMapRequest);

        final GetMapRequest request = (GetMapRequest) arguments[0];

        WebMap map = (WebMap) invocation.proceed();

        final Map<String, String> rawKvp = request.getRawKvp();
        boolean isSeedingRequest = rawKvp != null
                && rawKvp.containsKey(GeoServerTileLayer.GWC_SEED_INTERCEPT_TOKEN);
        if (isSeedingRequest) {
View Full Code Here

        final StringBuilder requestMistmatchTarget = new StringBuilder();
        ConveyorTile cachedTile = gwc.dispatch(request, requestMistmatchTarget);

        if (cachedTile == null) {
            WebMap dynamicResult = (WebMap) invocation.proceed();
            dynamicResult.setResponseHeader("geowebcache-cache-result", MISS.toString());
            dynamicResult.setResponseHeader("geowebcache-miss-reason",
                    requestMistmatchTarget.toString());
            return dynamicResult;
        }
        checkState(cachedTile.getTileLayer() != null);
        final TileLayer layer = cachedTile.getTileLayer();
View Full Code Here

    private RenderedImageMap dispatchGetMap(final ConveyorTile tile, final MetaTile metaTile)
            throws Exception {

        Map<String, String> params = buildGetMap(tile, metaTile);
        WebMap map;
        try {
            HttpServletRequest actualRequest = tile.servletReq;
            Cookie[] cookies = actualRequest == null ? null : actualRequest.getCookies();

            GWC.get().dispatchOwsRequest(params, cookies);
View Full Code Here

        FrameCatalogVisitor visitor = new FrameCatalogVisitor();
        frameCatalog.getFrames(visitor);
        RenderedImage imageList = visitor.produce(frameCatalog.getWmsConfiguration());

        // run a single getmap to get the right mime type and map context
        WebMap wmsResponse = wms.getMap(request);

        return new RenderedImageMap(((RenderedImageMap) wmsResponse).getMapContext(), imageList,
                wmsResponse.getMimeType());
    }
View Full Code Here

            long maxY = maxRow == null? intersect[3] : Math.min(maxRow, intersect[3]);
            for (long x = minX; x <= maxX; x++) {
                for (long y = minY; y <= maxY; y++) {
                    BoundingBox box = gridSubset.boundsFromIndex(new long[] { x, y, z });
                    req.setBbox(new Envelope(box.getMinX(), box.getMaxX(), box.getMinY(), box.getMaxY()));
                    WebMap result = webMapService.getMap(req);
                    tiles.addTile(z, (int) x, (int) (flipy ? gridSubset.getNumTilesHigh(z)
                            - (y + 1) : y), toBytes(result));
                    // Cleanup
                    cleaner.finished(null);
                }
View Full Code Here

TOP

Related Classes of org.geoserver.wms.WebMap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.