[OpenLayers-Users] Are String objects limited to 4096 characters?

Christopher Schmidt crschmidt at metacarta.com
Tue May 19 15:26:02 EDT 2009


On Tue, May 19, 2009 at 02:58:53PM -0400, Stephen Woodbridge wrote:
> Hi all,
> 
> I'm trying to parse some WKT out of an XML document in an OpenLayers 
> application and one of my WKT text nodes is getting truncated at 4096 
> character! The XML document is good, but when I extract the text from 
> the XML node it is getting truncated.
> 
> It seems to work in IE 6.0.2800 and Opera 9.64, but not FF 3.0.10.
> 
> So is looks like FF breaks the text into an array of strings where each 
> is 4096 characters or less. Can I pass this array to the WKT parser read 
> function? Or can I concat the items into a string?

http://dev.openlayers.org/apidocs/files/OpenLayers/Format/XML-js.html#OpenLayers.Format.XML.getChildValue

-- Chris


> var parser = new OpenLayers.Format.WKT();
> var edges = xmldoc.getElementsByTagNameNS('*', 'edge');
> var wkt = edges[0].getElementsByTagNameNS('*', 'wkt');
> var g = parser.read(wkt);
> 
> Any help or suggestions would be appreciated.
> 
> Thanks,
>    -Steve
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users

-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list