[OpenLayers-Users] Trouble after upgrading to Geoserver 2.0
totom
tommaso.lavoro at gmail.com
Tue Nov 3 06:08:07 EST 2009
Hi evrybody, I have some problems after upgrading form Geoserver 1.7.3 to 2.0
I have a vector layer (i'm using vectro instead wfs to use custom filters
instead of BBOX) so defined:
var fixedStrategy = new OpenLayers.Strategy.Fixed();
poly = new OpenLayers.Layer.Vector
(
'Pippo',
{
strategies: [fixedStrategy,saveStrategy ],
projection: new OpenLayers.Projection("EPSG:4326"),
styleMap: stylemm,
outputFormat:'json',
protocol: new OpenLayers.Protocol.WFS.v1_1_0(
{
version: '1.1.0',
srsName: 'EPSG:4326',
url: 'http://$151.100.152.220/geoserver2/wfs',
featureType: 'urbis_dev:data_crash_feature',
geometryName: 'the_geom',
extractAttribute: true
}),
getFeatureByFid: function(fid)
{
var layer = this;
if (!layer) return null;
var features = layer.features;
if (!features)return null;
for (var i = 0; i < features.length; ++i)
if (features[i].fid == fid) return features[i];
return null;
}
}
);
map.addLayer(poly);
It used to work, but after upgrading Openlayers seems to not parse the
geoserver response.
The server will response with correct xml (i think gml3...possible?), but if
I make poly.features.length, it will return 0 instead of 3 (i have 3
features)
Has anybody any ideas? maybe I have to specify the format of the response?
In case, where?
Thanks in advance...
ps: there is a $ in the url because the request is proxied by a script that
replace it with the user credential for geoserver autentication....
--
View this message in context: http://n2.nabble.com/Trouble-after-upgrading-to-Geoserver-2-0-tp3937791p3937791.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list