Binary files openlayers/lib/OpenLayers/.DS_Store and openlayers_patched/lib/OpenLayers/.DS_Store differ Binary files openlayers/lib/OpenLayers/Control/.DS_Store and openlayers_patched/lib/OpenLayers/Control/.DS_Store differ diff -rupN openlayers/lib/OpenLayers/Control/AgsControl.js openlayers_patched/lib/OpenLayers/Control/AgsControl.js --- openlayers/lib/OpenLayers/Control/AgsControl.js 2009-03-13 10:06:42.000000000 -0700 +++ openlayers_patched/lib/OpenLayers/Control/AgsControl.js 2009-03-19 13:02:27.000000000 -0700 @@ -441,7 +441,115 @@ OpenLayers.Control.AgsControl= OpenLayer resetDefaultTaskParameters: function() { OpenLayers.Console.error("...resetDefaultTaskParameters of AgsControl not implemented..."); throw "...resetDefaultTaskParameters of AgsControl not implemented..."; - }, + }, + + /** + * Method: setMap (from SelectFeature.js) + * Set the map property for the control. + * + * Parameters: + * map - {} + */ + setMap: function(map) { + this.handlers.feature.setMap(map); + if (this.box) { + this.handlers.box.setMap(map); + } + OpenLayers.Control.prototype.setMap.apply(this, arguments); + }, + + /** + * Method: activate + * Activates the control. + * + * Returns: + * {Boolean} The control was effectively activated. + */ + activate: function () { + if (!this.active) { + this.handlers.feature.activate(); + if(this.box && this.handlers.box) { + this.handlers.box.activate(); + } + } + return OpenLayers.Control.prototype.activate.apply( + this, arguments + ); + }, + + /** + * Method: deactivate + * Deactivates the control. + * + * Returns: + * {Boolean} The control was effectively deactivated. + */ + deactivate: function () { + if (this.active) { + this.handlers.feature.deactivate(); + if(this.handlers.box) { + this.handlers.box.deactivate(); + } + } + return OpenLayers.Control.prototype.deactivate.apply( + this, arguments + ); + }, + + /** + * Method: unselectAll + * Unselect all selected features. To unselect all except for a single + * feature, set the options.except property to the feature. + * + * Parameters: + * options - {Object} Optional configuration object. + */ + unselectAll: function(options) { + // we'll want an option to supress notification here + var feature; + for(var i=this.layer.selectedFeatures.length-1; i>=0; --i) { + feature = this.layer.selectedFeatures[i]; + if(!options || options.except != feature) { + this.unselect(feature); + } + } + }, + + /** + * Method: destroy + * The destroy method is used to perform any clean up before the control + * is dereferenced. Typically this is where event listeners are removed + * to prevent memory leaks. + */ + destroy: function () { + if(this.events) { + if(this.eventListeners) { + this.events.un(this.eventListeners); + } + this.events.destroy(); + this.events = null; + } + this.eventListeners = null; + + // eliminate circular references + if (this.handler) { + this.handler.destroy(); + this.handler = null; + } + if(this.handlers) { + for(var key in this.handlers) { + if(this.handlers.hasOwnProperty(key) && + typeof this.handlers[key].destroy == "function") { + this.handlers[key].destroy(); + } + } + this.handlers = null; + } + if (this.map) { + this.map.removeControl(this); + this.map = null; + } + }, CLASS_NAME: "OpenLayers.Control.AgsControl" }); \ No newline at end of file Binary files openlayers/lib/OpenLayers/Handler/.DS_Store and openlayers_patched/lib/OpenLayers/Handler/.DS_Store differ diff -rupN openlayers/lib/OpenLayers/Handler/MultiPath.js openlayers_patched/lib/OpenLayers/Handler/MultiPath.js --- openlayers/lib/OpenLayers/Handler/MultiPath.js 2009-03-13 10:10:42.000000000 -0700 +++ openlayers_patched/lib/OpenLayers/Handler/MultiPath.js 2009-03-19 13:02:04.000000000 -0700 @@ -244,6 +244,58 @@ OpenLayers.Handler.MultiPath = OpenLayer } return false; }, + + /** + * Method: setMap (from control.js) + * Set the map property for the control. This is done through an accessor + * so that subclasses can override this and take special action once + * they have their map variable set. + * + * Parameters: + * map - {} + */ + setMap: function(map) { + this.map = map; + if (this.handler) { + this.handler.setMap(map); + } + }, + + /** + * Method: destroy + * The destroy method is used to perform any clean up before the control + * is dereferenced. Typically this is where event listeners are removed + * to prevent memory leaks. + */ + destroy: function () { + if(this.events) { + if(this.eventListeners) { + this.events.un(this.eventListeners); + } + this.events.destroy(); + this.events = null; + } + this.eventListeners = null; + + // eliminate circular references + if (this.handler) { + this.handler.destroy(); + this.handler = null; + } + if(this.handlers) { + for(var key in this.handlers) { + if(this.handlers.hasOwnProperty(key) && + typeof this.handlers[key].destroy == "function") { + this.handlers[key].destroy(); + } + } + this.handlers = null; + } + if (this.map) { + this.map.removeControl(this); + this.map = null; + } + }, CLASS_NAME: "OpenLayers.Handler.MultiPath" }); \ No newline at end of file diff -rupN openlayers/lib/OpenLayers.js openlayers_patched/lib/OpenLayers.js --- openlayers/lib/OpenLayers.js 2009-03-19 13:19:14.000000000 -0700 +++ openlayers_patched/lib/OpenLayers.js 2009-03-19 11:13:55.000000000 -0700 @@ -67,6 +67,7 @@ if(!singleFile) { var jsfiles = new Array( "OpenLayers/Util.js", + "OpenLayers/Util/AgsUtil.js", "OpenLayers/BaseTypes.js", "OpenLayers/BaseTypes/Class.js", "OpenLayers/BaseTypes/Bounds.js", @@ -125,6 +126,8 @@ "OpenLayers/Feature/Vector.js", "OpenLayers/Feature/WFS.js", "OpenLayers/Handler.js", + "OpenLayers/Handler/MultiPath.js", + "OpenLayers/Handler/MultiPolygon.js", "OpenLayers/Handler/Click.js", "OpenLayers/Handler/Hover.js", "OpenLayers/Handler/Point.js", @@ -137,6 +140,14 @@ "OpenLayers/Handler/MouseWheel.js", "OpenLayers/Handler/Keyboard.js", "OpenLayers/Control.js", + "OpenLayers/Control/AgsControl.js", + "OpenLayers/Control/AgsFindTask.js", + "OpenLayers/Control/AgsGeometryService.js", + "OpenLayers/Control/AgsGeoprocessor.js", + "OpenLayers/Control/AgsIdentifyTask.js", + "OpenLayers/Control/AgsLocator.js", + "OpenLayers/Control/AgsQueryTask.js", + "OpenLayers/Control/AgsTaskbar.js", "OpenLayers/Control/Attribution.js", "OpenLayers/Control/Button.js", "OpenLayers/Control/ZoomBox.js", @@ -195,6 +206,8 @@ "OpenLayers/Protocol/WFS/v1.js", "OpenLayers/Protocol/WFS/v1_0_0.js", "OpenLayers/Protocol/WFS/v1_1_0.js", + "OpenLayers/Layer/AgsDynamic.js", + "OpenLayers/Layer/AgsTiled.js", "OpenLayers/Layer/PointTrack.js", "OpenLayers/Layer/GML.js", "OpenLayers/Style.js", @@ -206,6 +219,7 @@ "OpenLayers/Filter/Comparison.js", "OpenLayers/Filter/Spatial.js", "OpenLayers/Format.js", + "OpenLayers/Format/AgsJsAdapter.js", "OpenLayers/Format/XML.js", "OpenLayers/Format/GML.js", "OpenLayers/Format/GML/Base.js",