[OpenLayers-Users] Problems implementing WFS
Hugo
hfpmartins at gmail.com
Wed Jul 1 17:17:10 EDT 2009
Hi Alexandre,
Thanks for your help. Indeed it was a problem with the namespace. A dummy
mistake :)
Kind regards,
Hugo Martins
On Tue, Jun 30, 2009 at 1:00 PM, Alexandre Dube <adube at mapgears.com> wrote:
> Hi Hugo,
>
> This looks like a feature namespace problem. See the Format.XML readNode
> function, put a break point at line :
>
> var group = this.readers[this.namespaceAlias[node.namespaceURI]];
>
> This might be the problem,
>
> Alexandre
>
> Hugo wrote:
>
>> Hello all,
>>
>> I'm having troubles to implement a vector layer with WFS protocol. From
>> firebug i can see that the attributes from the layer are extracted, however
>> no vector feature is displayed in the map.
>> DO you have any suggestions??? My code is as follows:
>>
>> var saveStrategy = new OpenLayers.Strategy.Save();
>> var wfs2 = new OpenLayers.Layer.Vector(
>> "ExplorWFS2",
>> {
>> strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],
>> projection: wgs,
>> protocol: new OpenLayers.Protocol.WFS({
>> version: "1.1.0",
>> srsName: "EPSG:4326",
>> url: "http://isegi.dyndns.org:8080/geoserver/wfs?",
>> featureNS : "http://isegi.dyndns.org:8080/sigla",
>> featureType: "explor",
>> geometryName: "the_geom",
>> schema: "
>> http://isegi.dyndns.org:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=sigla:explor<
>> http://isegi.dyndns.org:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=sigla:explor
>> >",
>> format: new OpenLayers.Format.WFST.v1_1_0({
>> featureType: 'explor',
>> featureNS: "http://isegi.dyndns.org:8080/sigla",
>> featurePrefix: 'sigla',
>> geometryName: 'the_geom'
>> })
>> }) }
>> );
>>
>> I have tried these code with and without the format option.
>>
>> If i simply use the following code, everything goes perfect and vector
>> features are displayed in the map:
>>
>> var wfs = new OpenLayers.Layer.WFS(
>> "ExplorWFS",
>> "http://isegi.dyndns.org:8080/geoserver/wfs?",
>> {typename: 'sigla:explor'},
>> {
>> featureVersion: "1.0.0",
>> typename: 'explor',
>> featureNS: '"http://isegi.dyndns.org:8080/sigla',
>> geometryName: "the_geom",
>> projection: wgs,
>> extractAttributes: true,
>> schema: "
>> http://isegi.dyndns.org:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=sigla:explor<
>> http://isegi.dyndns.org:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=sigla:explor
>> >"
>> }
>> );
>>
>> Thanks in advance.
>> Kind regards,
>>
>> Hugo Martins
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
>>
>
>
> --
> Alexandre Dubé
> Mapgears
> www.mapgears.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090701/83638a84/attachment.html
More information about the Users
mailing list