Package org.geoserver.kml.regionate

Examples of org.geoserver.kml.regionate.Tile


    @Override
    void encodeDocumentContents(Document container) {
        boolean cachedMode = "cached".equals(context.getSuperOverlayMode());

        // normalize the requested bounds to match a WGS84 hierarchy tile
        Tile tile = new Tile(new ReferencedEnvelope(request.getBbox(), Tile.WGS84));
        while(tile.getZ() > 0 && !tile.getEnvelope().contains(request.getBbox())) {
            tile = tile.getParent();
        }
        Envelope normalizedEnvelope = null;
        if (tile.getZ() >= 0 && tile.getEnvelope().contains(request.getBbox())) {
            normalizedEnvelope = tile.getEnvelope();
        } else {
            normalizedEnvelope = KmlEncodingContext.WORLD_BOUNDS_WGS84;
        }
        int zoomLevel = (int) tile.getZ();
        // encode top level region, which is always visible
        addRegion(container, normalizedEnvelope, Integer.MAX_VALUE, -1);

        List<MapLayerInfo> layers = request.getLayers();
        for (int i = 0; i < layers.size(); i++) {
View Full Code Here

TOP

Related Classes of org.geoserver.kml.regionate.Tile

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.