Package com.bbn.openmap.layer.shape

Examples of com.bbn.openmap.layer.shape.ShapeLayer


            URL propertiesURL = new URL(propertiesFile);
            InputStream is = propertiesURL.openStream();
            properties.load(is);

            // Let's make a file
            ShapeLayer sl = new ShapeLayer();
            sl.setProperties(prefix, properties);

            AreaHandler ah = new AreaHandler(sl.getSpatialIndex(), sl.getDrawingAttributes());

            // Set the properties in the handler.
            ah.setProperties(prefix, properties);
            // Write the saved graphics.
            ah.getGraphics().writeGraphics(outputFile);
View Full Code Here


        // Set the properties of the layer. This assumes that the
        // datafiles "dcwpo-browse.shp" and "dcwpo-browse.ssx" are in
        // a path specified in the CLASSPATH variable. These files
        // are distributed with OpenMap and reside in the toplevel
        // "share" subdirectory.
        ShapeLayer shapeLayer = new ShapeLayer();
        Properties shapeLayerProps = new Properties();
        shapeLayerProps.put("prettyName", "Political Solid");
        shapeLayerProps.put("lineColor", "000000");
        shapeLayerProps.put("fillColor", "BDDE83");
        shapeLayerProps.put("shapeFile", "data/shape/dcwpo-browse.shp");
        shapeLayerProps.put("spatialIndex", "data/shape/dcwpo-browse.ssx");
        shapeLayer.setProperties(shapeLayerProps);

        // Add the political layer to the map
        mapBean.add(shapeLayer);

        // Add the map to the frame
View Full Code Here

             * datafiles "dcwpo-browse.shp" and "dcwpo-browse.ssx" are
             * in a path specified in the CLASSPATH variable. These
             * files are distributed with OpenMap and reside in the
             * toplevel "share" subdirectory.
             */
            ShapeLayer shapeLayer = new ShapeLayer();

            // Since this Properties object is being used just for
            // this layer, the properties do not have to be scoped
            // with marker name, like the layer properties in the
            // ../hello/HelloWorld.properties file.
            Properties shapeLayerProps = new Properties();
            shapeLayerProps.put("prettyName", "Political Solid");
            shapeLayerProps.put("lineColor", "000000");
            shapeLayerProps.put("fillColor", "BDDE83");
            shapeLayerProps.put("shapeFile", "data/shape/dcwpo-browse.shp");
            shapeLayerProps.put("spatialIndex", "data/shape/dcwpo-browse.ssx");
            shapeLayer.setProperties(shapeLayerProps);
            shapeLayer.setVisible(true);

           
            // Last on top.
            mapHandler.add(shapeLayer);
            mapHandler.add(new GraticuleLayer());
View Full Code Here

        if (!showPolitical.booleanValue()) {
            return null;
        }

        ShapeLayer politicalLayer = new ShapeLayer();
        politicalLayer.setProperties("political", properties);

        return politicalLayer;
    }
View Full Code Here

TOP

Related Classes of com.bbn.openmap.layer.shape.ShapeLayer

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.