Examples of layers()


Examples of org.geoserver.wms.WMSMapContent.layers()

    @Test
    public void testChannelDescription() throws Exception {
        WMSMapContent map = new WMSMapContent(createGetMapRequest(MockData.BASIC_POLYGONS));
        map.addLayer(createMapLayer(MockData.BASIC_POLYGONS));
        map.layers().get(0).getUserData().put("abstract", "Test Abstract");

        Document document;
        try {
            document = getRSSResponse(map, AtomGeoRSSTransformer.GeometryEncoding.LATLONG);
        } finally {
View Full Code Here

Examples of org.geoserver.wms.WMSMapContent.layers()

            ZipEntry images = new ZipEntry("images/");
            zip.putNextEntry(images);
           
            // write the images
            List<Layer> layers = mapContent.layers();
            for (int i = 0; i < layers.size(); i++) {
                Layer mapLayer = layers.get(i);

                // create a context for this single layer
                WMSMapContent subContext = new WMSMapContent();
View Full Code Here

Examples of org.geoserver.wms.WMSMapContent.layers()

        String getGroundOverlayHRef(Layer layer) {
            WMSMapContent mapContent = context.getMapContent();
            if (context.isKmz()) {
                // embed the ground overlay in the kmz archive
                int mapLayerOrder = mapContent.layers().indexOf(layer);
                String href = "images/layers_" + mapLayerOrder + ".png";
                context.addKmzGroundOverlay(href, layer);
                return href;
            } else {
                // refer to a GetMap request
View Full Code Here

Examples of org.geoserver.wms.WMSMapContent.layers()

        Map formatOptions = request.getFormatOptions();
        LookAtDecoratorFactory lookAtFactory = new LookAtDecoratorFactory();
        LookAtOptions lookAtOptions = new LookAtOptions(formatOptions);

        // compute the layer bounds and the total bounds
        List<ReferencedEnvelope> layerBounds = new ArrayList<ReferencedEnvelope>(mapContent
                .layers().size());
        ReferencedEnvelope aggregatedBounds = computePerLayerQueryBounds(mapContent, layerBounds,
                null);
        if (aggregatedBounds != null) {
            LookAt la = lookAtFactory.buildLookAt(aggregatedBounds, lookAtOptions, false);
View Full Code Here

Examples of org.geotools.map.MapContent.layers()

        menu.add( new SafeAction("Grayscale display") {
            public void action(ActionEvent e) throws Throwable {
                Style style = createGreyscaleStyle();
                if (style != null) {
                    ((StyleLayer) map.layers().get(0)).setStyle(style);
                    frame.repaint();
                }
            }
        });
View Full Code Here

Examples of org.geotools.map.MapContent.layers()

        menu.add( new SafeAction("RGB display") {
            public void action(ActionEvent e) throws Throwable {
                Style style = createRGBStyle();
                if (style != null) {
                    ((StyleLayer) map.layers().get(0)).setStyle(style);
                    frame.repaint();
                }
           }
        });
        // Finally display the map frame.
View Full Code Here

Examples of org.geotools.map.MapContent.layers()

        pane.setMapLayerTable(this);
        mapLayerTableViewer.setPane(pane);

        MapContent mapContent = pane.getMapContent();
        List<Layer> layers = mapContent.layers();
        for( Layer mapLayer : layers ) {
            mapLayerTableViewer.addLayer(mapLayer);
        }
    }
View Full Code Here

Examples of org.geotools.map.MapContent.layers()

        if (selectedMapLayer == null)
            return;
        List<Layer> layersList = mapLayerTableViewer.getLayersList();
        MapContent mapContent = pane.getMapContent();

        int contextIndex = mapContent.layers().indexOf(selectedMapLayer);

        int viewerIndex = layersList.indexOf(selectedMapLayer);
        int newViewerIndex = viewerIndex + delta;
        if (newViewerIndex < 0 || newViewerIndex > layersList.size() - 1) {
            return;
View Full Code Here

Examples of org.geotools.map.MapContent.layers()

        /*
        * MapLayerTable stores layers in the reverse order to
        * DefaultMapContext (see comment in javadocs for this class)
        */
        int newContextIndex = contextIndex - delta;
        if (newContextIndex < 0 || newContextIndex > mapContent.layers().size() - 1) {
            return;
        }

        if (contextIndex != newContextIndex) {
            mapContent.moveLayer(contextIndex, newContextIndex);
View Full Code Here

Examples of org.geotools.map.MapContent.layers()

   
    @Test
    public void resetAfterRemovingAllLayersIsIgnored() {
        MapContent mapContent = createMapContent(WORLD);
        mapPane.setMapContent(mapContent);
        mapContent.removeLayer(mapContent.layers().get(0));

        // just checking no exception is thrown
        mapPane.reset();
    }
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.