[OpenLayers-Users] IE: OpenLayers.Format.GML read() Breaks with special chars
DiegoFreelance
diego.freelance at gmail.com
Tue May 29 13:05:52 PDT 2012
version: Openlayers 2.11
Hi Andreas, or anybody,
I have a code that requests wfs files from mapserver,(reading dbf and shp
files)
it works OK in FF / Chrome,
it fails in IE (tested in IE8), when there are special chars in the dbf file
(some spanish characters).
IE error says: "Object Required" in Openlayers2.11/Openlayers.js, line 939
Code:
######################################
oGML = new OpenLayers.Format.GML.v3();
oFeatures = oGML.read(response.responseText); /*<-- HERE THE CODE STOPS, in
the read() method ***/
######################################
This is a xml response I get from FF (this works OK) :
######################################
<?xml version='1.0' encoding="UTF-8" ?>
<wfs:FeatureCollection
xmlns:ms="http://mapserver.gis.umn.edu/mapserver"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:gml="http://www.opengis.net/gml"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd
http://mapserver.gis.umn.edu/mapserver
http://10.86.37.229:81/cgi-bin/mapserv.exe?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=comunas&OUTPUTFORMAT=XMLSCHEMA">
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-58.531508,-34.705525
-58.335093,-34.527563</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<gml:featureMember>
<ms:comunas fid="comunas.2">
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-58.415970,-34.599730
-58.370667,-34.569329</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<ms:msGeometry>
...And so on...
######################################
Any advice on how to solve this error in IE??? (without having to change the
special chars? ) (they are utf-8 compatible)
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/IE-OpenLayers-Format-GML-read-Breaks-with-special-chars-tp4977848.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list