From: Christopher N. <cna...@gm...> - 2010-02-11 16:55:46
|
Hi, I'm trying to read WFS features from a geoserver using gwt-openlayers and I can't seem to figure out where I am going wrong. Using straight OpenLayers/Javascript/HTML I have the following, which works: // Proxy setup to fix XMLHttpRequest domain matching OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url="; // parameters for getting the WFS layer var params = { typename: "marketmaker:business_cu" }; var options = {}; // WFS Layer creation var layer = new OpenLayers.Layer.WFS( "WFS", "http://mmweb.ncsa.uiuc.edu:8080/geoserver/wfs", params, options ); // add the layer map.addLayer( layer ); My GWT-OpenLayers equivalent is: // parameters for wfs layer WFSParams wfsParams = new WFSParams(); wfsParams.getJSObject().setProperty( "typename", "marketmaker:business_cu" ); // no additional options WFSOptions wfsOptions = new WFSOptions(); // WFS layer creation WFS wfsLayer = new WFS( "wfs", WFS_URL, wfsParams, wfsOptions ); // add the layer map.addLayer( wfsLayer ); Is there some way to inject the value of OpenLayers.ProxyHost using GWT-OpenLayers? I'm not sure if that is the issue. I am new to javascript and perhaps this is wrong, but I tried writing the value of OpenLayers.ProxyHost directly into the compiled javascript file that GWT creates. Any help is appreciated. Regards, Chris |