Package org.geoserver.wms

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


            rim.produceMap(mc);
           
            List<SimpleFeature> features = featureInfoListener.getFeatures();
            return aggregateByFeatureType(features);
        } finally {
            mc.dispose();
        }
    }

    private void rescaleRules(List<Rule> rules, FeatureInfoRequestParameters params) {
        Map<Object, Object> rendererParams = new HashMap<Object, Object>();
View Full Code Here


            layer.setQuery(new Query(MockData.BUILDINGS.getLocalPart(), f));
            map.addLayer(layer);

            document = getRSSResponse(map, AtomGeoRSSTransformer.GeometryEncoding.LATLONG);
        } finally {
            map.dispose();
        }
        NodeList items = document.getDocumentElement().getElementsByTagName("item");
        assertEquals(1, items.getLength());
    }
   
View Full Code Here

       
        Document document;
        try {
            document = getRSSResponse(map, AtomGeoRSSTransformer.GeometryEncoding.LATLONG);
        } finally {
            map.dispose();
        }
        NodeList items = document.getDocumentElement().getElementsByTagName("item");
       
        // check all items are there
        assertEquals(1, items.getLength());
View Full Code Here

        Document document;
        try {
            document = getRSSResponse(map, AtomGeoRSSTransformer.GeometryEncoding.LATLONG);
        } finally {
            map.dispose();
        }
        Element element = document.getDocumentElement();
        assertEquals("rss", element.getNodeName());

        Element channel = (Element) element.getElementsByTagName("channel").item(0);
View Full Code Here

        Document document;
        try {
            document = getRSSResponse(map, AtomGeoRSSTransformer.GeometryEncoding.LATLONG);
        } finally {
            map.dispose();
        }
        Element element = document.getDocumentElement();
        assertEquals("rss", element.getNodeName());

        NodeList items = element.getElementsByTagName("item");
View Full Code Here

        Document document;
        try {
            // print(document);
            document = getRSSResponse(map, GeoRSSTransformerBase.GeometryEncoding.SIMPLE);
        } finally {
            map.dispose();
        }
        Element element = document.getDocumentElement();
        assertEquals("rss", element.getNodeName());

        NodeList entries = element.getElementsByTagName("item");
View Full Code Here

            transformer.setIndentation(2);

            // print(document);
            document = WMSTestSupport.transform(featureSource.getFeatures(), transformer);
        } finally {
            mapContent.dispose();
        }
        // make sure we are generating icon styles, but that we're not sticking a color onto them
        XMLAssert.assertXpathEvaluatesTo("" + nfeatures, "count(//Style/IconStyle/Icon/href)",
                document);
        XMLAssert.assertXpathEvaluatesTo("0", "count(//Style/IconStyle/Icon/color)", document);
View Full Code Here

                    layer);
            transformer.setIndentation(2);
            // print(document);
            document = WMSTestSupport.transform(featureSource.getFeatures(), transformer);
        } finally {
            mapContent.dispose();
        }
        // make sure we are generating icon styles with the subdir path
        XMLAssert.assertXpathEvaluatesTo(
                "http://localhost:8080/geoserver/styles/graphics/bridgesubdir.png",
                "//Style/IconStyle/Icon/href", document);
View Full Code Here

                transformer.setIndentation(2);

                document = WMSTestSupport.transform(featureSource.getFeatures(), transformer);
                // print(document);
            } finally {
                mapContent.dispose();
            }
            // make sure we are using the proxy base URL
            XMLAssert.assertXpathEvaluatesTo("http://myhost:9999/gs/styles/bridge.png",
                    "//Style/IconStyle/Icon/href", document);
        } finally {
View Full Code Here

            KMLVectorTransformer transformer = new KMLVectorTransformer(getWMS(), mapContent,
                    layer);
            transformer.setIndentation(2);
            document = WMSTestSupport.transform(featureSource.getFeatures(), transformer);
        } finally {
            mapContent.dispose();
        }
        Element element = document.getDocumentElement();
        assertEquals("kml", element.getNodeName());
        assertEquals(1, element.getElementsByTagName("Placemark").getLength());
        assertEquals(1, element.getElementsByTagName("Style").getLength());
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.