Package org.geoserver.wms

Examples of org.geoserver.wms.WMS


    /**
     * @see KMLLookAt
     */
    @Test
    public void testEncodeLookAtVendorSpecificParameters() throws Exception {
        WMS wms = mockData.getWMS();
        KMLNetworkLinkTransformer transformer = new KMLNetworkLinkTransformer(wms, mapContent);
        transformer.setEncodeAsRegion(false);
        transformer.setIndentation(2);

        request.setBbox(new Envelope(-1, 1, -10, 10));
View Full Code Here


        assertXpathEvaluatesTo("absolute", "//kml/Folder/LookAt/altitudeMode", dom);
    }
   
    @Test
    public void testKmltitleFormatOption() throws Exception {
        WMS wms = mockData.getWMS();
        KMLNetworkLinkTransformer transformer = new KMLNetworkLinkTransformer(wms, mapContent);
        transformer.setEncodeAsRegion(false);
        transformer.setIndentation(2);

        request.setBbox(new Envelope(-1, 1, -10, 10));
View Full Code Here

     */
    @Test
    public void testQueryNonQueryableLayer() throws Exception {
        // HACK: fake the WMS facade to inform the layer is non queryable. Looks like we would need
        // a LayerInfo.isQueryable() property
        final WMS wms = (WMS) applicationContext.getBean("wms");
        GetFeatureInfoKvpReader reader = (GetFeatureInfoKvpReader) applicationContext
                .getBean("getFeatureInfoKvpReader");
        try {
            WMS fakeWMS = new WMS(wms.getGeoServer()) {
                @Override
                public boolean isQueryable(LayerInfo layer) {
                    if ("Forests".equals(layer.getName())) {
                        return false;
                    }
View Full Code Here

        URL sldUrl = GetMapIntegrationTest.class.getResource("../externalEntities.sld");
        String url = "wms?bbox=" + bbox + "&styles="
                + "&layers=" + layers + "&Format=image/png" + "&request=GetMap" + "&width=550"
                + "&height=250" + "&srs=EPSG:4326" + "&sld=" + sldUrl.toString();

        WMS wms = new WMS(getGeoServer());
        GeoServerInfo geoserverInfo = wms.getGeoServer().getGlobal();
        try {
            // enable entities in external SLD files
            geoserverInfo.setXmlExternalEntitiesEnabled(true);
            getGeoServer().save(geoserverInfo);
           
View Full Code Here

        URL sldUrl = GetMapIntegrationTest.class.getResource("../externalEntities.sld");
        String url = "wms?bbox=" + bbox + "&styles="
                + "&layers=" + layers + "&Format=image/png" + "&request=GetMap" + "&width=550"
                + "&height=250" + "&srs=EPSG:4326" + "&sld=" + sldUrl.toString();

        WMS wms = new WMS(getGeoServer());
        GeoServerInfo geoserverInfo = wms.getGeoServer().getGlobal();
        try {
            // enable entities in external SLD files
            geoserverInfo.setXmlExternalEntitiesEnabled(true);
            getGeoServer().save(geoserverInfo);
           
View Full Code Here

        BBoxAsserts.assertEqualsBbox(new ReferencedEnvelope(48.62,48.62,-123.15,-123.15,logCrs),data.getBbox(), 0.01);
    }
   
    @Test
    public void testWMSGetLegendGraphic() throws Exception {
        WMS wms = new WMS(createMock(GeoServer.class));
        GetLegendGraphicRequest glg = new GetLegendGraphicRequest();
       
        FeatureType type = createMock(FeatureType.class);
        expect(type.getName()).andReturn(new NameImpl("http://acme.org", "foo")).anyTimes();
        replay(type);
View Full Code Here

TOP

Related Classes of org.geoserver.wms.WMS

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.