Package org.geotools.map

Examples of org.geotools.map.StyleLayer


            // Skip layers that do not have multiple FeatureTypeStyles
            if (!(layer instanceof StyleLayer)) {
                continue;
            }

            StyleLayer styleLayer = (StyleLayer) layer;
           
            if (styleLayer.getStyle().featureTypeStyles().size() < 2) continue;

            // count how many lite feature type styles are active
            int currCount = 0;
            MapLayer mapLayer = new MapLayer(layer);
            FeatureType ftype = mapLayer.getFeatureSource().getSchema();
            for (FeatureTypeStyle fts : styleLayer.getStyle().featureTypeStyles()) {
                if (isFeatureTypeStyleActive(ftype, fts)) {
                    // get applicable rules at the current scale
                    List[] splittedRules = splitRules(fts);
                    List ruleList = splittedRules[0];
                    List elseRuleList = splittedRules[1];
View Full Code Here


     * @param layer the layer to be styled
     * @throws IOException
     */
    private void doSetStyle( Layer layer ) throws IOException {
        if (layer instanceof StyleLayer) {
            StyleLayer styleLayer = (StyleLayer) layer;
            Style style = SimpleStyleConfigurator.showDialog(this.getTable().getShell(), layer);
            if (style != null) {
                styleLayer.setStyle(style);
            }
        }
    }
View Full Code Here

     *
     * @param layer the layer to be styled
     */
    private void doSetStyle(Layer layer) {
        if (layer instanceof StyleLayer) {
            StyleLayer styleLayer = (StyleLayer) layer;
            Style style = JSimpleStyleDialog.showDialog(this, styleLayer);
            if (style != null) {
                styleLayer.setStyle(style);
            }
        }
    }
View Full Code Here

            // raster image. Both are better served with the
            // placemarks.
            List<Layer> layers = mapContent.layers();
            for (int i = 0; i < layers.size(); i++) {
                if (layers.get(i) instanceof StyleLayer) {
                    StyleLayer layer = (StyleLayer) layers.get(i);
                    Style style = layer.getStyle();
                    style.accept(dupVisitor);
                    Style copy = (Style) dupVisitor.getCopy();
                    layer.setStyle(copy);
                }
            }
        }
        renderer.setRendererHints(rendererParams);
View Full Code Here

TOP

Related Classes of org.geotools.map.StyleLayer

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.