Created
August 7, 2013 09:25
-
-
Save pgiraud/6172561 to your computer and use it in GitHub Desktop.
OpenLayers doesn't parse an OGC response the same in Chrome or Firefox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://www.openlayers.org/dev/OpenLayers.js"></script> | |
<script type="text/javascript"> | |
function init(){ | |
var format = new OpenLayers.Format.WMSGetFeatureInfo(); | |
var features = format.read('<?xml version="1.0" encoding="UTF-8"?><wfs:FeatureCollection xmlns="http://www.opengis.net/wfs" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:ial="risques.pref.auvergne.gouv.fr" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="risques.pref.auvergne.gouv.fr http://ids.craig.fr:80/wxs/ial/wfs?service=WFS&version=1.0.0&request=DescribeFeatureType&typeName=ial%3A63_140 http://www.opengis.net/wfs http://ids.craig.fr:80/wxs/schemas/wfs/1.0.0/WFS-basic.xsd"><gml:boundedBy><gml:null>unknown</gml:null></gml:boundedBy><gml:featureMember><ial:63_140 fid="63_140.49"><ial:id_proc>proc63_001</ial:id_proc></ial:63_140></gml:featureMember><gml:featureMember><ial:63_140 fid="63_140.123"><ial:id_proc>proc63_033</ial:id_proc></ial:63_140></gml:featureMember><gml:featureMember><ial:63_140 fid="63_140.125"><ial:id_proc>proc63_033</ial:id_proc></ial:63_140></gml:featureMember></wfs:FeatureCollection>'); | |
alert(features.length); | |
} | |
</script> | |
</head> | |
<body onload="init()"> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment