Hi Lammie, Thanks for your reply. You have mentioned about a proxy here. Does that mean I have to use one? Sorry if you feel this as a dumb question, but I'm new to openlayers and whole GIS stuff. Please guide me on this.
Regards, damith On Wed, Dec 9, 2009 at 2:02 AM, Lammie Jonson <[email protected]> wrote: > // Here's is how I did this. > > // You need to use the openlayers proxy: > > OpenLayers.ProxyHost="proxy.cgi?url="; > > // WFS layer points to geoserver or your host > > state_layer = new OpenLayers.Layer.WFS( "States WFS", > "http://yourhost:8080/geoserver/wfs", > { typename: 'topp:states'} ); > > =============== > > I'm using rails, so I create a sort of fake proxy in config/routes.rb > > map.connect '/proxy.cgi', > :controller => 'wfs', > :action => 'myproxy' > > Then inside the myproxy() action: > > if url =~ /geoserver/ > # geo server WFS data > uri = URI.parse(url) > resp = Net::HTTP.get_response(uri) > send_data(resp.body, :type => 'text/xml') > end > > _______________________________________________ > Users mailing list > [email protected] > http://openlayers.org/mailman/listinfo/users > >
_______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
