[OpenLayers-Users] WFS map from shapefiles

sunny74 sb.ray at hotmail.com
Thu Mar 25 08:14:02 EDT 2010


Hi,

I am able to get WFS atop a WMs.
The URL I get when I make a GetFeatureInfo request tells that
service=WFS&version=1.0.0.
But the problem is that GetFeatureInfo doesn't work.

I get a proxy error as given in the proxy.cgi file.
Is it because I am firing the OL code from a aspx webpage.
The aspx page is loaded by IIS and it calls apache in the ms4w folder.So is
there a conflict b/w IIS & apache?

The code for GetFeatureInfo is as in OL 2.7

 map.events.register('click', map, function(e) {
                  alert('clicked');
                  OpenLayers.Util.getElement('nodeList').innerHTML =
"Loading... please wait...";
                  var url = layer.getFullRequestString({
                      REQUEST: "GetFeatureInfo",
                      EXCEPTIONS: "application/vnd.ogc.se_xml",
                      BBOX: map.getExtent().toBBOX(),
                      X: e.xy.x,
                      Y: e.xy.y,
                      INFO_FORMAT: 'text/plain',
                      QUERY_LAYERS: "STATE",
                      FEATURE_COUNT: 6,
                      WIDTH: map.size.w,
                      HEIGHT: map.size.h
                  });
                  //  var msg = document.getElementById('urlmsg');
                  //  msg.value = url;
                  alert(url);
                  OpenLayers.loadURL(url, '', this, setHTML);
                  OpenLayers.Event.stop(e);
              });

 function setHTML(response) {
              OpenLayers.Util.getElement('nodeList').innerHTML =
response.responseText;
          }

Can u help me get rid of this error msg and GetFeatureInfo working.

Thanks.

-- 
View this message in context: http://n2.nabble.com/WFS-map-from-shapefiles-tp4795937p4797213.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list