[OpenLayers-Users] [OpenLayers-Dev] WFS GetFeature - again

Andreas Hocevar ahocevar at opengeo.org
Wed Jun 30 09:30:06 EDT 2010


On Jun 29, 2010, at 18:29 , BERÉNYI Attila wrote:

> Hi,
> 
> To answer my own question: the response is created in the gmgml namespace so OpenLayers cannot interpret it. It can be solved by turning on the Feature Collection Namespace in WFS option in Geomedia before publishing the WFS service.
> 
> Probably it can be solved by implementing gmgml namespace in OpenLayers as well, does it worth a new feature ticket?

You can do this easily on the application level. Instantiate your GML format with the following option:
namespaces: OpenLayers.Util.extend({
    gmgml: "http://www.intergraph.com/geomedia/gml"
}, OpenLayers.Format.GML.Base.prototype.namespaces

Regards,
Andreas.

> 
> BR,
> Attila
> 
> 2010.06.22. 20:36 keltezéssel, BERÉNYI Attila írta:
>> Hi,
>> 
>> I've facing a problem regarding the GetFeature function again, and I'm not quite sure whether it is an OpenLayers bug or the server application fails. 
>> So, I've a WMS and a WFS service served by Geomedia WebMap: http://webmap.viamap.hu/ol/getFeatureTest.html
>> The GetFeature gets a correct response from the WFS service, e.g.:
>> <?xml version="1.0" encoding="UTF-8"?>
>> 
>> <gmgml:FeatureCollection xmlns="http://www.intergraph.com/geomedia/gml" xmlns:gml="http://www.opengis.net/gml" xmlns:gmgml="http://www.intergraph.com/geomedia/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation='http://www.intergraph.com/geomedia/gml http://webmap.viamap.hu/testWFS/request.aspx?request=DescribeFeatureType&amp;VERSION=1.1.0&amp;SERVICE=WFS&amp;OUTPUTFORMAT=text/xml;subtype=gml/3.1.1'><gml:boundedBy><gml:Envelope srsName="EPSG:23700"><gml:lowerCorner>660000 236000</gml:lowerCorner><gml:upperCorner>666000 240000</gml:upperCorner></gml:Envelope></gml:boundedBy><gml:featureMember><gmgml:szelvenyhalo gml:id="szelvenyhalo.2676"><gmgml:szelvenyszam>65-421</gmgml:szelvenyszam><gmgml:felmeres
>> >1997</gmgml:felmeres><gmgml:ID>2676</gmgml:I
>> D><gmgml:Geometry><gml:Polygon srsName="EPSG:23700"><gml
>> :exterior><gml:LinearRing><gml:posList srsDimension="2">660000 236000 660000 240000 666000 240000 666000 238000 666000 236000 660000 236000 </gml:posList></gml:LinearRing></gml:exterior></gml:Polygon></gmgml:Geometry></gmgml:szelvenyhalo></gml:featureMember></gmgml:FeatureCollection>
>> although the result cannot be processed, because of the following error:
>> obj.attributes is undefined
>> http://webmap.viamap.hu/ol/lib/OpenLayers-2.9.1/lib/OpenLayers/Format/GML/Base.js
>> Line 397
>> Is it an OpenLayers bug?
>> 
>> BR,
>> 
>> Attila
>> 
>> _______________________________________________
>> Users mailing list
>> 
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev

-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.




More information about the Users mailing list