Examples of WMSMapLayer


Examples of org.geotools.map.WMSMapLayer

                // see if we can merge this layer with the previous one
                boolean merged = false;
                if (mapContext.getLayerCount() > 0) {
                    MapLayer lastLayer = mapContext.getLayer(mapContext.getLayerCount() - 1);
                    if (lastLayer instanceof WMSMapLayer) {
                        WMSMapLayer lastWMS = (WMSMapLayer) lastLayer;
                        WebMapServer otherWMS = lastWMS.getWebMapServer();
                        if (otherWMS.equals(wms)) {
                            lastWMS.addLayer(gt2Layer);
                            merged = true;
                        }
                    }
                }
                if (!merged) {
                    WMSMapLayer mapLayer = new WMSMapLayer(wms, gt2Layer);
                    mapLayer.setTitle(wmsLayer.getPrefixedName());
                    mapContext.addLayer(mapLayer);
                }
            } else {
                throw new IllegalArgumentException("Unkown layer type " + layerType);
            }
View Full Code Here

Examples of org.geotools.map.WMSMapLayer

        }

        // the wms layer does request in a CRS that's compatible with the WMS server srs
        // list,
        // we may need to transform
        WMSMapLayer ml = new WMSMapLayer(wms, layer);
        // delegate to the web map layer as there's quite a bit of reprojection magic
        // code
        // that we want to be consistently reproduced for GetFeatureInfo as well
        final InputStream is = ml.getFeatureInfo(bbox, width, height, x, y,
                "application/vnd.ogc.gml", maxFeatures);
        List<FeatureCollection> results = null;
        try {
            Parser parser = new Parser(new WFSConfiguration());
            parser.setStrict(false);
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.