From 658df9df728d5d49337916a2e05f5bc579f2c83e Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 5 Jul 2007 18:54:38 +0000 Subject: [PATCH] #802 - giving all classes a constructor that don't currently have one - this for Natural Docs git-svn-id: http://svn.openlayers.org/trunk/openlayers@3595 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Control/Navigation.js | 19 +++++++++++++++++++ lib/OpenLayers/Format/GML.js | 16 +++++++++++++++- lib/OpenLayers/Format/GeoRSS.js | 16 +++++++++++++++- lib/OpenLayers/Format/KML.js | 15 ++++++++++++++- 4 files changed, 63 insertions(+), 3 deletions(-) diff --git a/lib/OpenLayers/Control/Navigation.js b/lib/OpenLayers/Control/Navigation.js index d40151e1a8..9d0f8b9175 100644 --- a/lib/OpenLayers/Control/Navigation.js +++ b/lib/OpenLayers/Control/Navigation.js @@ -8,6 +8,13 @@ * @requires OpenLayers/Handler/MouseWheel.js * * Class: OpenLayers.Control.Navigation + * The navigation control handles map browsing with mouse events (dragging, + * double-clicking, and scrolling the wheel). Create a new navigation + * control with the control. + * + * Note that this control is added to the map by default (if no controls + * array is sent in the options object to the + * constructor). * * Inherits: * - @@ -34,6 +41,18 @@ OpenLayers.Control.Navigation.prototype = */ wheelHandler: null, + /** + * Constructor: OpenLayers.Control.Navigation + * Create a new navigation control + * + * Parameters: + * options - {Object} An optional object whose properties will be set on + * the control + */ + initialize: function(options) { + OpenLayers.Control.prototype.initialize.apply(this, arguments); + }, + /** * Method: activate */ diff --git a/lib/OpenLayers/Format/GML.js b/lib/OpenLayers/Format/GML.js index 965efc4384..cef0b26785 100644 --- a/lib/OpenLayers/Format/GML.js +++ b/lib/OpenLayers/Format/GML.js @@ -9,7 +9,8 @@ * @requires OpenLayers/Geometry.js * * Class: OpenLayers.Format.GML - * Read/Wite GML. + * Read/Wite GML. Create a new instance with the + * constructor. * * Inherits from: * - @@ -65,6 +66,19 @@ OpenLayers.Format.GML.prototype = */ extractAttributes: true, + + /** + * Constructor: OpenLayers.Format.GML + * Create a new parser for GML + * + * Parameters: + * options - {Object} An optional object whose properties will be set on + * this instance. + */ + initialize: function(options) { + OpenLayers.Format.prototype.initialize.apply(this, [options]); + }, + /** * APIMethod: read * Read data from a string, and return a list of features. diff --git a/lib/OpenLayers/Format/GeoRSS.js b/lib/OpenLayers/Format/GeoRSS.js index aef93a8ca4..072081da7e 100644 --- a/lib/OpenLayers/Format/GeoRSS.js +++ b/lib/OpenLayers/Format/GeoRSS.js @@ -6,7 +6,8 @@ * @requires OpenLayers/Format.js * * Class: OpenLayers.Format.GeoRSS - * Write-only GeoRSS. + * Write-only GeoRSS. Create a new instance with the + * constructor. * * Inherits from: * - @@ -33,6 +34,19 @@ OpenLayers.Format.GeoRSS.prototype = */ georssns: "http://www.georss.org/georss", + + /** + * Constructor: OpenLayers.Format.GeoRSS + * Create a new parser for GeoRSS + * + * Parameters: + * options - {Object} An optional object whose properties will be set on + * this instance. + */ + initialize: function(options) { + OpenLayers.Format.prototype.initialize.apply(this, [options]); + }, + /** * APIMethod: write * Accept Feature Collection, and return a string. diff --git a/lib/OpenLayers/Format/KML.js b/lib/OpenLayers/Format/KML.js index d236451117..cb98d82e65 100644 --- a/lib/OpenLayers/Format/KML.js +++ b/lib/OpenLayers/Format/KML.js @@ -9,7 +9,8 @@ * * Class: OpenLayers.Format.KML * Read only KML. Largely Proof of Concept: does not support advanced Features, - * including Polygons. + * including Polygons. Create a new instance with the + * constructor. * * Inherits from: * - @@ -24,6 +25,18 @@ OpenLayers.Format.KML.prototype = */ kmlns: "http://earth.google.com/kml/2.0", + /** + * Constructor: OpenLayers.Format.KML + * Create a new parser for KML + * + * Parameters: + * options - {Object} An optional object whose properties will be set on + * this instance. + */ + initialize: function(options) { + OpenLayers.Format.prototype.initialize.apply(this, [options]); + }, + /** * APIMethod: read * Read data from a string, and return a list of features.