From ea346a785dc1b3f7c156f6fc33da634e1f1a627b Mon Sep 17 00:00:00 2001 From: Chris Schlaeger Date: Tue, 12 Aug 2014 21:56:44 +0200 Subject: Adding jquery, flot and openlayers to be included with the GEM. --- .../OpenLayers/Format/SOSGetFeatureOfInterest.js | 190 +++++++++++++++++++++ 1 file changed, 190 insertions(+) create mode 100644 misc/openlayers/lib/OpenLayers/Format/SOSGetFeatureOfInterest.js (limited to 'misc/openlayers/lib/OpenLayers/Format/SOSGetFeatureOfInterest.js') diff --git a/misc/openlayers/lib/OpenLayers/Format/SOSGetFeatureOfInterest.js b/misc/openlayers/lib/OpenLayers/Format/SOSGetFeatureOfInterest.js new file mode 100644 index 0000000..aac2030 --- /dev/null +++ b/misc/openlayers/lib/OpenLayers/Format/SOSGetFeatureOfInterest.js @@ -0,0 +1,190 @@ +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the 2-clause BSD license. + * See license.txt in the OpenLayers distribution or repository for the + * full text of the license. */ + +/** + * @requires OpenLayers/Format/XML.js + * @requires OpenLayers/Format/GML/v3.js + */ + +/** + * Class: OpenLayers.Format.SOSGetFeatureOfInterest + * Read and write SOS GetFeatureOfInterest. This is used to get to + * the location of the features (stations). The stations can have 1 or more + * sensors. + * + * Inherits from: + * - + */ +OpenLayers.Format.SOSGetFeatureOfInterest = OpenLayers.Class( + OpenLayers.Format.XML, { + + /** + * Constant: VERSION + * {String} 1.0.0 + */ + VERSION: "1.0.0", + + /** + * Property: namespaces + * {Object} Mapping of namespace aliases to namespace URIs. + */ + namespaces: { + sos: "http://www.opengis.net/sos/1.0", + gml: "http://www.opengis.net/gml", + sa: "http://www.opengis.net/sampling/1.0", + xsi: "http://www.w3.org/2001/XMLSchema-instance" + }, + + /** + * Property: schemaLocation + * {String} Schema location + */ + schemaLocation: "http://www.opengis.net/sos/1.0 http://schemas.opengis.net/sos/1.0.0/sosAll.xsd", + + /** + * Property: defaultPrefix + */ + defaultPrefix: "sos", + + /** + * Property: regExes + * Compiled regular expressions for manipulating strings. + */ + regExes: { + trimSpace: (/^\s*|\s*$/g), + removeSpace: (/\s*/g), + splitSpace: (/\s+/), + trimComma: (/\s*,\s*/g) + }, + + /** + * Constructor: OpenLayers.Format.SOSGetFeatureOfInterest + * + * Parameters: + * options - {Object} An optional object whose properties will be set on + * this instance. + */ + + /** + * APIMethod: read + * Parse a GetFeatureOfInterest response and return an array of features + * + * Parameters: + * data - {String} or {DOMElement} data to read/parse. + * + * Returns: + * {Array()} An array of features. + */ + read: function(data) { + if(typeof data == "string") { + data = OpenLayers.Format.XML.prototype.read.apply(this, [data]); + } + if(data && data.nodeType == 9) { + data = data.documentElement; + } + + var info = {features: []}; + this.readNode(data, info); + + var features = []; + for (var i=0, len=info.features.length; i