Hi Roel-

Apologies for the delay. I suspect the problem is that the parser is
looking for XML inside a KML namespace, and your standalone XML string
isn't inside a namespace. You could try modifying the LineString
constructor logic to not look for the kml namespace. Right now it
says:

public function LineString(x:XMLList)
                {
                        super(x);
                        if (ParsingTools.nullCheck(this.x.kml::coordinates) != 
null) {
                                this._coordinates = new
Coordinates(ParsingTools.nullCheck(this.x.kml::coordinates));
                        }
                }

You could try changing this.x.kml::coordinates to this.x::coordinate.

- pamela



On Mon, Sep 29, 2008 at 8:04 PM, RW <[EMAIL PROTECTED]> wrote:
>
> Hi Pamela,
>
> Thanks for your quick reply! Your advice is a step in the right
> direction, I am able to generate 'valid' xml from an item in the
> ArrayCollection. However, the constructor of LineString will still not
> the generated xml.
>
> This is my actual code
>
> shortestPathAC = new ArrayCollection( result.result as Array );
> var xml:XML = new XML(shortestPathAC.getItemAt(i).line_coords);
> var lineString:LineString = new LineString(xml::LineString)
>
> Let me show you the code and the resulting output.
>
> shortestPathAC.getItemAt(i).line_coords is a string:
> "<LineString><coordinates>6.88056,52.22626 6.88044,52.22631</
> coordinates></LineString>"
>
> var xml:XML = new XML(shortestPathAC.getItemAt(i).line_coords);
>
> Alert.show(ObjectUtil.toString(xml));
> --> shows :
> <LineString>
>  <coordinates>6.88056,52.22626 6.88044,52.22631</coordinates>
> </LineString>
>
> Alert.show(ObjectUtil.toString(xml.coordinates));
> --> shows
> 6.88056,52.22626 6.88044,52.22631
>
> var lineString:LineString = new LineString(xml::LineString)
> --> shows
> TypeError: Error #1034: Type Coercion failed: cannot convert
> [EMAIL PROTECTED] element <LineString> to Namespace.
>
> This leads me to believe that the problem is not in the xml, but the
> LineString constructor can simply not use xml.
>
> Is this correct?
>
> Roel
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API For Flash" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-maps-api-for-flash?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to