[OpenLayers-Users] WFS broken in 2+

chrislist@narx.net chrislist at narx.net
Mon Aug 21 22:58:59 CDT 2006


There seems to be a few issues with WFS which i wasn't able to resolve with
both the RC1 and the latest SVN revision.

Bug 1. Small typo?

Line 81 of Tile/WFS.js

var url = this.urls[i] + OpenLayers.Util.getParameterString(params);

should read 

var url = this.urls[i] + "&" + OpenLayers.Util.getParameterString(params);

as getParameterString() only appends the ampersand. Currently the WFS
request results in something like SRS=EPSG:4326BBOX=.... nice and easy fix

2. The ProxyHost script which comes bundled i have replaced with a php/curl
solution. I know most dont usually have access to python as cgi so the
following might be of some use (very basic, no hostname checking so be
careful)

<?php
// PHP Proxy example for Openlayers
// OL only needs to support GET calls
$url = $_GET['url'];
$parseurl = urldecode($url);
// Open the Curl session (with support for services over SSL
$ch = curl_init();
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_URL,$parseurl);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,  2);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);  
$xml=curl_exec ($ch);
curl_close ($ch);
// OL expects text/XML to be able to parse into the DOM. Set the header
accordingly
header("Content-Type: text/xml");
echo $xml;
?>

After sorting out the above issues, OL does not render the markers as
expected. No exceptions are being thrown, there is definately
featureMembers containing points being returned ... but nothing is
happening :/

Ideas that cannot be confirmed:

a. The DOM traversal looks for an element called Point (Line 50
Feature/WFS.js). Does the prefix (eg. gml:Point) need to be added? I tried
but did not seem to change anything ..  
b. Is there anyway to use WFS in a manner similar to WMS.Untiled? Tiling
the WFS requests is not exactly beneficial in the same way it is for WMS
*wishlist*

Any ideas? I'm really keen to show a clientside WFS solution (even if it is
just for points)

Chris Tweedie

--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .





More information about the Users mailing list