[OpenLayers-Dev] problem with GML v2 parser

Bart van den Eijnden (OSGIS) bartvde at osgis.nl
Thu Nov 13 13:40:39 EST 2008


Hey Tim,

I've opened up:

http://trac.openlayers.org/ticket/1829

for this. Do you have any clue what could be the root cause of this error?

Best regards,
Bart

Tim Schaub wrote:
> Hey Bart-
>
> Thanks for the report.  If you haven't already, could you attach your 
> sample data to a ticket?  It would be good to incorporate it into the 
> test data when the issue is closed.  (And we won't have to hunt for this 
> email.)
>
> Tim
>
> bartvde at osgis.nl wrote:
>   
>> Hi list,
>>
>> I've got a slight problem with the GML v2 parser when running it over the
>> attached GML file. What I run into is that obj.attributes is undefined,
>> but I can't really find an explanation why this is happening ... and
>> ofcourse it would be good to know why instead of just patching it the way
>> I did below.
>>
>> GML/Base.js, readers:
>>
>>             "_attribute": function(node, obj) {
>>                 var local = node.localName || node.nodeName.split(":").pop();
>>                 var value = this.getChildValue(node);
>>                 if (!obj.attributes) {
>>                     obj.attributes = {};
>>                 }
>>                 obj.attributes[local] = value;
>>             }
>>
>> I've also attached an example to reproduce the error.
>>
>> obj.attributes is undefined
>> /OpenLayers/Format/GML/Base.js
>> Line 342
>>
>> TIA.
>>
>> Best regards,
>> Bart
>>
>>
>> ------------------------------------------------------------------------
>>
>>
>>   GML Parser Example
>>
>> Demonstrate the operation of the GML parser.
>>
>> This script reads data from a GML file and parses out the coordinates, 
>> appending them to a HTML string with markup tags. This markup is dumped 
>> to an element in the page.
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Dev mailing list
>> Dev at openlayers.org
>> http://openlayers.org/mailman/listinfo/dev
>>     
>
>
>   


-- 
Bart van den Eijnden
OSGIS, Open Source GIS
bartvde at osgis.nl
http://www.osgis.nl




More information about the Dev mailing list