WFS Dynamic
by Alexey Valikov
HTML
<script src="https://rawgit.com/highsource/jsonix/master/dist/Jsonix-all.js"></script>
<script src="https://rawgit.com/highsource/w3c-schemas/1.0.3/scripts/lib/XLink_1_0.js"></script>
<script src="https://rawgit.com/highsource/w3c-schemas/1.0.3/scripts/lib/XSD_1_0.js"></script>
<script src="https://rawgit.com/highsource/ogc-schemas/2.0.2/scripts/lib/OWS_1_1_0.js"></script>
<script src="https://rawgit.com/highsource/ogc-schemas/2.0.2/scripts/lib/Filter_2_0.js"></script>
<script src="https://rawgit.com/highsource/ogc-schemas/2.0.2/scripts/lib/GML_3_2_1.js"></script>
<script src="https://rawgit.com/highsource/jsonix-support/master/fiddles/zdqqL1jp/WFS_2_0.js"></script>
JavaScript
var TOPP = {
"n": "TOPP",
"dens": "http://www.openplans.org/topp",
"tis": [
{
"ln": "tasmania_state_boundariesType",
"ps": [
{
"n": "the_geom"
},
{
"n": "STATE"
},
{
"n": "COUNTRY"
},
{
"n": "CURR_TYPE"
},
{
"n": "CURR_CODE"
}
]
}
],
"eis": [
{
"en": "tasmania_state_boundaries",
"ti": ".tasmania_state_boundariesType"
}
]
};
var context = new Jsonix.Context([XLink_1_0, OWS_1_1_0, Filter_2_0, GML_3_2_1, WFS_2_0, TOPP], {
namespacePrefixes : { },
mappingStyle : "simplified"
});
var url = "https://rawgit.com/highsource/jsonix-support/master/fiddles/zdqqL1jp/01.xml";
var unmarshaller = context.createUnmarshaller();
unmarshaller.unmarshalURL(url, function(featureCollection) {
console.log(featureCollection);
console.log(JSON.stringify(featureCollection, null, 2));
});