Package org.geotools.map

Examples of org.geotools.map.Layer


    mapContext.getViewport().setCoordinateReferenceSystem(mapCrs);
    mapContext.getViewport().setScreenArea(paintArea);
    // add the configured layers
    for (ClientLayerInfo clientLayerInfo : clientMapInfo.getLayers()) {
      clientLayerInfo.getWidgetInfo(RasterizingConstants.WIDGET_KEY);
      Layer layer = layerFactoryService.createLayer(mapContext, clientLayerInfo);
      boolean showing = (Boolean) layer.getUserData().get(LayerFactory.USERDATA_KEY_SHOWING);
      if (showing) {
        mapContext.addLayer(layer);
      }
    }
    // add the extra layers
    for (ClientLayerInfo clientLayerInfo : mapRasterizingInfo.getExtraLayers()) {
      Layer layer = layerFactoryService.createLayer(mapContext, clientLayerInfo);
      boolean showing = (Boolean) layer.getUserData().get(LayerFactory.USERDATA_KEY_SHOWING);
      if (showing) {
        mapContext.addLayer(layer);
      }
    }
  }
View Full Code Here


                ((LabelCacheImpl) labelCache).setLabelRenderingMode(LabelRenderingMode.valueOf(getTextRenderingMethod()));
            }
            final int layersNumber = mapContent.layers().size();
            for (int i = 0; i < layersNumber; i++) // DJB: for each layer (ie. one
            {
                Layer layer = mapContent.layers().get(i);
   
                if (!layer.isVisible()) {
                    // Only render layer when layer is visible
                    continue;
                }
   
                if (renderingStopRequested) {
View Full Code Here

        // Create a map content and add our shapefile to it
        MapContent map = new MapContent();
        map.setTitle("Using cached features");
        Style style = SLD.createSimpleStyle(featureSource.getSchema());
        Layer layer = new FeatureLayer(cache, style);
        map.addLayer(layer);

        // Now display the map
        JMapFrame.showMap(map);
    }
View Full Code Here

        // Create a map content and add our shapefile to it
        MapContent map = new MapContent();
        map.setTitle("Quickstart");
       
        Style style = SLD.createSimpleStyle(featureSource.getSchema());
        Layer layer = new FeatureLayer(featureSource, style);
        map.addLayer(layer);

        // Now display the map
        JMapFrame.showMap(map);
    }
View Full Code Here

        // Set up a MapContent with the two layers
        final MapContent map = new MapContent();
        map.setTitle("ImageLab");
       
        Layer rasterLayer = new GridReaderLayer(reader, rasterStyle);
        map.addLayer(rasterLayer);
       
        Layer shpLayer = new FeatureLayer(shapefileSource, shpStyle);
        map.addLayer(shpLayer);

        // Create a JMapFrame with a menu to choose the display style for the
        frame = new JMapFrame(map);
        frame.setSize(800, 600);
View Full Code Here

        featureSource = store.getFeatureSource();

        // Create a map context and add our shapefile to it
        map = new MapContent();
        Style style = SLD.createSimpleStyle(featureSource.getSchema());
        Layer layer = new FeatureLayer(featureSource, style);
        map.layers().add(layer);

        // Create a JMapFrame with custom toolbar buttons
        JMapFrame mapFrame = new JMapFrame(map);
        mapFrame.enableToolBar(true);
View Full Code Here

         * with a default line and colour style
         */
        MapContent map = new MapContent();
        map.setTitle("Feature selection tool example");
        Style style = createDefaultStyle();
        Layer layer = new FeatureLayer(featureSource, style);
        map.addLayer(layer);
        mapFrame = new JMapFrame(map);
        mapFrame.enableToolBar(true);
        mapFrame.enableStatusBar(true);

View Full Code Here

        } else {
            style = createSelectedStyle(IDs);
        }

        Layer layer = mapFrame.getMapContent().layers().get(0);
        ((FeatureLayer) layer).setStyle(style);
        mapFrame.getMapPane().repaint();
    }
View Full Code Here

        // Create a basic Style to render the features
        Style style = createStyle(file, featureSource);

        // Add the features and the associated Style object to
        // the MapContent as a new Layer
        Layer layer = new FeatureLayer(featureSource, style);
        map.addLayer(layer);

        // Now display the map
        JMapFrame.showMap(map);
    }
View Full Code Here

        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
        ps.setGeometry(ff.function("convert", ff.property("wkt"), ff.literal(Point.class)));

        // setup the map
        MapContent map = new MapContent();
        Layer layer = new FeatureLayer(features, style);
        map.addLayer(layer);
       
        // render it
        BufferedImage bi = new BufferedImage(100, 100, BufferedImage.TYPE_3BYTE_BGR);
        StreamingRenderer renderer = new StreamingRenderer();
View Full Code Here

TOP

Related Classes of org.geotools.map.Layer

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.