[OpenLayers-Users] WFS can't be shown. Can any one help me?

lorkyo lorkyo at 163.com
Sat Aug 2 08:56:15 EDT 2008


 Thank you very much. there are truly some problem with the proxy.  make a  directory"proxy" under the $CATALINA_HOME/webapps/. And I add one line in to my code " OpenLayers.ProxyHost="/proxy/proxy.cgi?url=". 
But now I can get several WMS shown, after  I changed anyone of them into WFS, it could not be shown. But I can get the GML  data using the wfs url through the browser.  Is there some thing wrong in my configuration?


 
 
 

ÔÚ2008-08-02£¬"Arnd Wippermann" <arnd.wippermann at web.de> дµÀ£º

Hi,
 
have you considered this:
http://trac.openlayers.org/wiki/FrequentlyAskedQuestions#ProxyHost
 
Arnd Wippermann

 
Von:users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] Im Auftrag von lorkyo
Gesendet: Freitag, 1. August 2008 17:00
An:users at openlayers.org
Betreff: [OpenLayers-Users] WFS can't be shown. Can any one help me?


I wrote a page to show wms and  wfs, at the same time, but I can't get the WFS data show. the codes are listed below.It can only show the WMS data , I exchange the place of "topp:tasmania_water_bodies" and "topp:tasmania_state_boundaries", then it can only show the "topp:tasmania_state_boundaries"(WMS). I have check  the checkbox of the layerswitch,and these two layers is the of the same place and have the same SRS, I have used udig to open them:
 
var map, layer;
map = new OpenLayers.Map('map', {controls:[], 'projection': 'EPSG:4326', 'units':'degrees'}); 
  OpenLayers.IMAGE_RELOAD_ATTEMPTS = 5;
          
          var bounds = new OpenLayers.Bounds(143.60260815000004,-43.851764249999995,148.71135685000002,-39.370182750000005)
  // setup untiled layer
          untiled = new OpenLayers.Layer.WMS.Untiled(
            "", "http://192.168.6.140:8080/geoserver/wms",
            {
              layers: 'topp:tasmania_water_bodies',
              styles: '',
              height: '382',
              width: '800',
              srs: 'EPSG:4326',
              format: 'image/png'
            },
               {maxExtent: bounds, maxResolution: 0.019956049609374915, projection: "EPSG:4326"}
          );
          untiled.ratio=1;
          untiled.setVisibility(false, false);
       map.addLayer(untiled);
       var roads = new OpenLayers.Layer.WFS(
                "Roads (WFS)", 
                "http://192.168.6.140:8080/geoserver/wfs?",
                {   
               layers: 'topp:tasmania_state_boundaries',
                request: 'GetFeature',
                    maxfeatures: 100, visibility:true
                  },
 {maxExtent: bounds, maxResolution: 0.019956049609374915, projection: "EPSG:4326"});
       map.addControl(new OpenLayers.ControlPanZoomBar({div:$('nav')}));
          map.addControl(new OpenLayers.Control.MouseDefaults());
          map.addControl(new OpenLayers.Control.Scale($('scale')));
          map.addControl(new OpenLayers.Control.MousePosition({element: $('position')}));
          map.addControl(new OpenLayers.Control.LayerSwitcher());
          map.addControl(new OpenLayers.Control.OverviewMap());
          map.zoomToExtent(bounds);
          
                                                                                  lorkyo

 



22Ôª³¬Öµ·¹Ãæ,8.5ÕÛ´¿Õä±ÈÈø,±Øʤլ¼±ËÍÍøÉϵã²ÍÓŻݶà
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080802/9402e342/attachment.html


More information about the Users mailing list