diff --git a/build/full.cfg b/build/full.cfg index 5ed2b7b71c..91c817a89f 100644 --- a/build/full.cfg +++ b/build/full.cfg @@ -11,3 +11,4 @@ Firebug OpenLayers.js OpenLayers/Lang +deprecated.js diff --git a/examples/panel.html b/examples/panel.html index 685bdacf37..be9785c192 100644 --- a/examples/panel.html +++ b/examples/panel.html @@ -16,14 +16,6 @@ background-color:white; } - .olControlPanel .olControlMouseDefaultsItemActive { - background-color: blue; - background-image: url("../theme/default/img/pan_on.png"); - } - .olControlPanel .olControlMouseDefaultsItemInactive { - background-color: orange; - background-image: url("../theme/default/img/pan_off.png"); - } .olControlPanel .olControlDrawFeatureItemActive { width: 22px; height: 22px; @@ -75,8 +67,6 @@ {title:"Zoom box: Selecting it you can zoom on an area by clicking and dragging."}); var panel = new OpenLayers.Control.Panel({defaultControl: zb}); panel.addControls([ - new OpenLayers.Control.MouseDefaults( - {title:'You can use the default mouse configuration'}), zb, new OpenLayers.Control.DrawFeature(vlayer, OpenLayers.Handler.Path, {title:'Draw a feature'}), diff --git a/examples/wms-untiled.html b/examples/wms-untiled.html index 1d3c4dc4a1..e9dcacc6e6 100644 --- a/examples/wms-untiled.html +++ b/examples/wms-untiled.html @@ -40,9 +40,7 @@

- An untiled layer will only request a single image at a time. - This is equivalent to using the deprecated - OpenLayers.Layer.WMS.Untiled class, which will be removed at 3.0. + An untiled (with singleTile: true) layer will only request a single image at a time.
diff --git a/examples/zoomify.html b/examples/zoomify.html index 3bec55bb9f..6b610aad83 100644 --- a/examples/zoomify.html +++ b/examples/zoomify.html @@ -23,7 +23,6 @@ /* Map with raster coordinates (pixels) from Zoomify image */ var options = { - controls: [], maxExtent: new OpenLayers.Bounds(0, 0, zoomify_width, zoomify_height), maxResolution: Math.pow(2, zoomify.numberOfTiers-1 ), numZoomLevels: zoomify.numberOfTiers, @@ -33,11 +32,6 @@ map = new OpenLayers.Map("map", options); map.addLayer(zoomify); - map.addControl(new OpenLayers.Control.MousePosition()); - map.addControl(new OpenLayers.Control.PanZoomBar()); - map.addControl(new OpenLayers.Control.MouseDefaults()); - map.addControl(new OpenLayers.Control.KeyboardDefaults()); - map.setBaseLayer(zoomify); map.zoomToMaxExtent(); }; diff --git a/lib/OpenLayers.js b/lib/OpenLayers.js index 22fb1b8500..933407c4ec 100644 --- a/lib/OpenLayers.js +++ b/lib/OpenLayers.js @@ -109,7 +109,6 @@ "OpenLayers/Kinetic.js", "Rico/Corner.js", "Rico/Color.js", - "OpenLayers/Ajax.js", "OpenLayers/Events.js", "OpenLayers/Request.js", "OpenLayers/Request/XMLHttpRequest.js", @@ -136,7 +135,6 @@ "OpenLayers/Layer/Grid.js", "OpenLayers/Layer/MapGuide.js", "OpenLayers/Layer/MapServer.js", - "OpenLayers/Layer/MapServer/Untiled.js", "OpenLayers/Layer/KaMap.js", "OpenLayers/Layer/KaMapCache.js", "OpenLayers/Layer/MultiMap.js", @@ -145,8 +143,6 @@ "OpenLayers/Layer/WorldWind.js", "OpenLayers/Layer/ArcGIS93Rest.js", "OpenLayers/Layer/WMS.js", - "OpenLayers/Layer/WMS/Untiled.js", - "OpenLayers/Layer/WMS/Post.js", "OpenLayers/Layer/WMTS.js", "OpenLayers/Layer/ArcIMS.js", "OpenLayers/Layer/GeoRSS.js", @@ -186,7 +182,6 @@ "OpenLayers/Control/Navigation.js", "OpenLayers/Control/PinchZoom.js", "OpenLayers/Control/TouchNavigation.js", - "OpenLayers/Control/MouseDefaults.js", "OpenLayers/Control/MousePosition.js", "OpenLayers/Control/OverviewMap.js", "OpenLayers/Control/KeyboardDefaults.js", @@ -344,7 +339,6 @@ "OpenLayers/Format/OGCExceptionReport.js", "OpenLayers/Layer/WFS.js", "OpenLayers/Control/GetFeature.js", - "OpenLayers/Control/MouseToolbar.js", "OpenLayers/Control/NavToolbar.js", "OpenLayers/Control/PanPanel.js", "OpenLayers/Control/Pan.js", diff --git a/lib/OpenLayers/Ajax.js b/lib/OpenLayers/Ajax.js deleted file mode 100644 index 92235025ae..0000000000 --- a/lib/OpenLayers/Ajax.js +++ /dev/null @@ -1,679 +0,0 @@ -/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for - * full list of contributors). Published under the Clear BSD license. - * See http://svn.openlayers.org/trunk/openlayers/license.txt for the - * full text of the license. */ - -/** - * @requires OpenLayers/Request/XMLHttpRequest.js - * @requires OpenLayers/Console.js - * @requires OpenLayers/Lang.js - */ - -OpenLayers.ProxyHost = ""; -//OpenLayers.ProxyHost = "examples/proxy.cgi?url="; - -/** - * Ajax reader for OpenLayers - * - * @uri url to do remote XML http get - * @param {String} 'get' format params (x=y&a=b...) - * @who object to handle callbacks for this request - * @complete the function to be called on success - * @failure the function to be called on failure - * - * example usage from a caller: - * - * caps: function(request) { - * -blah- - * }, - * - * OpenLayers.loadURL(url,params,this,caps); - * - * Notice the above example does not provide an error handler; a default empty - * handler is provided which merely logs the error if a failure handler is not - * supplied - * - */ - - -/** - * Function: OpenLayers.nullHandler - * @param {} request - */ -OpenLayers.nullHandler = function(request) { - OpenLayers.Console.userError(OpenLayers.i18n("unhandledRequest", {'statusText':request.statusText})); -}; - -/** - * APIFunction: OpenLayers.loadURL - * Background load a document. - * *Deprecated*. Use method instead. - * - * Parameters: - * uri - {String} URI of source doc - * params - {String} or {Object} GET params. Either a string in the form - * "?hello=world&foo=bar" (do not forget the leading question mark) - * or an object in the form {'hello': 'world', 'foo': 'bar} - * caller - {Object} object which gets callbacks - * onComplete - {Function} Optional callback for success. The callback - * will be called with this set to caller and will receive the request - * object as an argument. Note that if you do not specify an onComplete - * function, will be called (which pops up a - * user friendly error message dialog). - * onFailure - {Function} Optional callback for failure. In the event of - * a failure, the callback will be called with this set to caller and will - * receive the request object as an argument. Note that if you do not - * specify an onComplete function, will be called - * (which pops up a user friendly error message dialog). - * - * Returns: - * {} The request object. To abort loading, - * call request.abort(). - */ -OpenLayers.loadURL = function(uri, params, caller, - onComplete, onFailure) { - - if(typeof params == 'string') { - params = OpenLayers.Util.getParameters(params); - } - var success = (onComplete) ? onComplete : OpenLayers.nullHandler; - var failure = (onFailure) ? onFailure : OpenLayers.nullHandler; - - return OpenLayers.Request.GET({ - url: uri, params: params, - success: success, failure: failure, scope: caller - }); -}; - -/** - * Function: OpenLayers.parseXMLString - * Parse XML into a doc structure - * - * Parameters: - * text - {String} - * - * Returns: - * {?} Parsed AJAX Responsev - */ -OpenLayers.parseXMLString = function(text) { - - //MS sucks, if the server is bad it dies - var index = text.indexOf('<'); - if (index > 0) { - text = text.substring(index); - } - - var ajaxResponse = OpenLayers.Util.Try( - function() { - var xmldom = new ActiveXObject('Microsoft.XMLDOM'); - xmldom.loadXML(text); - return xmldom; - }, - function() { - return new DOMParser().parseFromString(text, 'text/xml'); - }, - function() { - var req = new XMLHttpRequest(); - req.open("GET", "data:" + "text/xml" + - ";charset=utf-8," + encodeURIComponent(text), false); - if (req.overrideMimeType) { - req.overrideMimeType("text/xml"); - } - req.send(null); - return req.responseXML; - } - ); - - return ajaxResponse; -}; - - -/** - * Namespace: OpenLayers.Ajax - */ -OpenLayers.Ajax = { - - /** - * Method: emptyFunction - */ - emptyFunction: function () {}, - - /** - * Method: getTransport - * - * Returns: - * {Object} Transport mechanism for whichever browser we're in, or false if - * none available. - */ - getTransport: function() { - return OpenLayers.Util.Try( - function() {return new XMLHttpRequest();}, - function() {return new ActiveXObject('Msxml2.XMLHTTP');}, - function() {return new ActiveXObject('Microsoft.XMLHTTP');} - ) || false; - }, - - /** - * Property: activeRequestCount - * {Integer} - */ - activeRequestCount: 0 -}; - -/** - * Namespace: OpenLayers.Ajax.Responders - * {Object} - */ -OpenLayers.Ajax.Responders = { - - /** - * Property: responders - * {Array} - */ - responders: [], - - /** - * Method: register - * - * Parameters: - * responderToAdd - {?} - */ - register: function(responderToAdd) { - for (var i = 0; i < this.responders.length; i++){ - if (responderToAdd == this.responders[i]){ - return; - } - } - this.responders.push(responderToAdd); - }, - - /** - * Method: unregister - * - * Parameters: - * responderToRemove - {?} - */ - unregister: function(responderToRemove) { - OpenLayers.Util.removeItem(this.reponders, responderToRemove); - }, - - /** - * Method: dispatch - * - * Parameters: - * callback - {?} - * request - {?} - * transport - {?} - */ - dispatch: function(callback, request, transport) { - var responder; - for (var i = 0; i < this.responders.length; i++) { - responder = this.responders[i]; - - if (responder[callback] && - typeof responder[callback] == 'function') { - try { - responder[callback].apply(responder, - [request, transport]); - } catch (e) {} - } - } - } -}; - -OpenLayers.Ajax.Responders.register({ - /** - * Function: onCreate - */ - onCreate: function() { - OpenLayers.Ajax.activeRequestCount++; - }, - - /** - * Function: onComplete - */ - onComplete: function() { - OpenLayers.Ajax.activeRequestCount--; - } -}); - -/** - * Class: OpenLayers.Ajax.Base - */ -OpenLayers.Ajax.Base = OpenLayers.Class({ - - /** - * Constructor: OpenLayers.Ajax.Base - * - * Parameters: - * options - {Object} - */ - initialize: function(options) { - this.options = { - method: 'post', - asynchronous: true, - contentType: 'application/xml', - parameters: '' - }; - OpenLayers.Util.extend(this.options, options || {}); - - this.options.method = this.options.method.toLowerCase(); - - if (typeof this.options.parameters == 'string') { - this.options.parameters = - OpenLayers.Util.getParameters(this.options.parameters); - } - } -}); - -/** - * Class: OpenLayers.Ajax.Request - * *Deprecated*. Use method instead. - * - * Inherit: - * - - */ -OpenLayers.Ajax.Request = OpenLayers.Class(OpenLayers.Ajax.Base, { - - /** - * Property: _complete - * - * {Boolean} - */ - _complete: false, - - /** - * Constructor: OpenLayers.Ajax.Request - * - * Parameters: - * url - {String} - * options - {Object} - */ - initialize: function(url, options) { - OpenLayers.Ajax.Base.prototype.initialize.apply(this, [options]); - - if (OpenLayers.ProxyHost && OpenLayers.String.startsWith(url, "http")) { - url = OpenLayers.ProxyHost + encodeURIComponent(url); - } - - this.transport = OpenLayers.Ajax.getTransport(); - this.request(url); - }, - - /** - * Method: request - * - * Parameters: - * url - {String} - */ - request: function(url) { - this.url = url; - this.method = this.options.method; - var params = OpenLayers.Util.extend({}, this.options.parameters); - - if (this.method != 'get' && this.method != 'post') { - // simulate other verbs over post - params['_method'] = this.method; - this.method = 'post'; - } - - this.parameters = params; - - if (params = OpenLayers.Util.getParameterString(params)) { - // when GET, append parameters to URL - if (this.method == 'get') { - this.url += ((this.url.indexOf('?') > -1) ? '&' : '?') + params; - } else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) { - params += '&_='; - } - } - try { - var response = new OpenLayers.Ajax.Response(this); - if (this.options.onCreate) { - this.options.onCreate(response); - } - - OpenLayers.Ajax.Responders.dispatch('onCreate', - this, - response); - - this.transport.open(this.method.toUpperCase(), - this.url, - this.options.asynchronous); - - if (this.options.asynchronous) { - window.setTimeout( - OpenLayers.Function.bind(this.respondToReadyState, this, 1), - 10); - } - - this.transport.onreadystatechange = - OpenLayers.Function.bind(this.onStateChange, this); - this.setRequestHeaders(); - - this.body = this.method == 'post' ? - (this.options.postBody || params) : null; - this.transport.send(this.body); - - // Force Firefox to handle ready state 4 for synchronous requests - if (!this.options.asynchronous && - this.transport.overrideMimeType) { - this.onStateChange(); - } - } catch (e) { - this.dispatchException(e); - } - }, - - /** - * Method: onStateChange - */ - onStateChange: function() { - var readyState = this.transport.readyState; - if (readyState > 1 && !((readyState == 4) && this._complete)) { - this.respondToReadyState(this.transport.readyState); - } - }, - - /** - * Method: setRequestHeaders - */ - setRequestHeaders: function() { - var headers = { - 'X-Requested-With': 'XMLHttpRequest', - 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*', - 'OpenLayers': true - }; - - if (this.method == 'post') { - headers['Content-type'] = this.options.contentType + - (this.options.encoding ? '; charset=' + this.options.encoding : ''); - - /* Force "Connection: close" for older Mozilla browsers to work - * around a bug where XMLHttpRequest sends an incorrect - * Content-length header. See Mozilla Bugzilla #246651. - */ - if (this.transport.overrideMimeType && - (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005) { - headers['Connection'] = 'close'; - } - } - // user-defined headers - if (typeof this.options.requestHeaders == 'object') { - var extras = this.options.requestHeaders; - - if (typeof extras.push == 'function') { - for (var i = 0, length = extras.length; i < length; i += 2) { - headers[extras[i]] = extras[i+1]; - } - } else { - for (var i in extras) { - headers[i] = extras[i]; - } - } - } - - for (var name in headers) { - this.transport.setRequestHeader(name, headers[name]); - } - }, - - /** - * Method: success - * - * Returns: - * {Boolean} - - */ - success: function() { - var status = this.getStatus(); - return !status || (status >=200 && status < 300); - }, - - /** - * Method: getStatus - * - * Returns: - * {Integer} - Status - */ - getStatus: function() { - try { - return this.transport.status || 0; - } catch (e) { - return 0; - } - }, - - /** - * Method: respondToReadyState - * - * Parameters: - * readyState - {?} - */ - respondToReadyState: function(readyState) { - var state = OpenLayers.Ajax.Request.Events[readyState]; - var response = new OpenLayers.Ajax.Response(this); - - if (state == 'Complete') { - try { - this._complete = true; - (this.options['on' + response.status] || - this.options['on' + (this.success() ? 'Success' : 'Failure')] || - OpenLayers.Ajax.emptyFunction)(response); - } catch (e) { - this.dispatchException(e); - } - - var contentType = response.getHeader('Content-type'); - } - - try { - (this.options['on' + state] || - OpenLayers.Ajax.emptyFunction)(response); - OpenLayers.Ajax.Responders.dispatch('on' + state, - this, - response); - } catch (e) { - this.dispatchException(e); - } - - if (state == 'Complete') { - // avoid memory leak in MSIE: clean up - this.transport.onreadystatechange = OpenLayers.Ajax.emptyFunction; - } - }, - - /** - * Method: getHeader - * - * Parameters: - * name - {String} Header name - * - * Returns: - * {?} - response header for the given name - */ - getHeader: function(name) { - try { - return this.transport.getResponseHeader(name); - } catch (e) { - return null; - } - }, - - /** - * Method: dispatchException - * If the optional onException function is set, execute it - * and then dispatch the call to any other listener registered - * for onException. - * - * If no optional onException function is set, we suspect that - * the user may have also not used - * OpenLayers.Ajax.Responders.register to register a listener - * for the onException call. To make sure that something - * gets done with this exception, only dispatch the call if there - * are listeners. - * - * If you explicitly want to swallow exceptions, set - * request.options.onException to an empty function (function(){}) - * or register an empty function with - * for onException. - * - * Parameters: - * exception - {?} - */ - dispatchException: function(exception) { - var handler = this.options.onException; - if(handler) { - // call options.onException and alert any other listeners - handler(this, exception); - OpenLayers.Ajax.Responders.dispatch('onException', this, exception); - } else { - // check if there are any other listeners - var listener = false; - var responders = OpenLayers.Ajax.Responders.responders; - for (var i = 0; i < responders.length; i++) { - if(responders[i].onException) { - listener = true; - break; - } - } - if(listener) { - // call all listeners - OpenLayers.Ajax.Responders.dispatch('onException', this, exception); - } else { - // let the exception through - throw exception; - } - } - } -}); - -/** - * Property: Events - * {Array(String)} - */ -OpenLayers.Ajax.Request.Events = - ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; - -/** - * Class: OpenLayers.Ajax.Response - */ -OpenLayers.Ajax.Response = OpenLayers.Class({ - - /** - * Property: status - * - * {Integer} - */ - status: 0, - - - /** - * Property: statusText - * - * {String} - */ - statusText: '', - - /** - * Constructor: OpenLayers.Ajax.Response - * - * Parameters: - * request - {Object} - */ - initialize: function(request) { - this.request = request; - var transport = this.transport = request.transport, - readyState = this.readyState = transport.readyState; - - if ((readyState > 2 && - !(!!(window.attachEvent && !window.opera))) || - readyState == 4) { - this.status = this.getStatus(); - this.statusText = this.getStatusText(); - this.responseText = transport.responseText == null ? - '' : String(transport.responseText); - } - - if(readyState == 4) { - var xml = transport.responseXML; - this.responseXML = xml === undefined ? null : xml; - } - }, - - /** - * Method: getStatus - */ - getStatus: OpenLayers.Ajax.Request.prototype.getStatus, - - /** - * Method: getStatustext - * - * Returns: - * {String} - statusText - */ - getStatusText: function() { - try { - return this.transport.statusText || ''; - } catch (e) { - return ''; - } - }, - - /** - * Method: getHeader - */ - getHeader: OpenLayers.Ajax.Request.prototype.getHeader, - - /** - * Method: getResponseHeader - * - * Returns: - * {?} - response header for given name - */ - getResponseHeader: function(name) { - return this.transport.getResponseHeader(name); - } -}); - - -/** - * Function: getElementsByTagNameNS - * - * Parameters: - * parentnode - {?} - * nsuri - {?} - * nsprefix - {?} - * tagname - {?} - * - * Returns: - * {?} - */ -OpenLayers.Ajax.getElementsByTagNameNS = function(parentnode, nsuri, - nsprefix, tagname) { - var elem = null; - if (parentnode.getElementsByTagNameNS) { - elem = parentnode.getElementsByTagNameNS(nsuri, tagname); - } else { - elem = parentnode.getElementsByTagName(nsprefix + ':' + tagname); - } - return elem; -}; - - -/** - * Function: serializeXMLToString - * Wrapper function around XMLSerializer, which doesn't exist/work in - * IE/Safari. We need to come up with a way to serialize in those browser: - * for now, these browsers will just fail. #535, #536 - * - * Parameters: - * xmldom {XMLNode} xml dom to serialize - * - * Returns: - * {?} - */ -OpenLayers.Ajax.serializeXMLToString = function(xmldom) { - var serializer = new XMLSerializer(); - var data = serializer.serializeToString(xmldom); - return data; -}; diff --git a/lib/OpenLayers/BaseTypes.js b/lib/OpenLayers/BaseTypes.js index f1fdd2e630..88d645a4e9 100644 --- a/lib/OpenLayers/BaseTypes.js +++ b/lib/OpenLayers/BaseTypes.js @@ -198,75 +198,6 @@ OpenLayers.String = { }; -if (!String.prototype.startsWith) { - /** - * APIMethod: String.startsWith - * *Deprecated*. Whether or not a string starts with another string. - * - * Parameters: - * sStart - {String} The string we're testing for. - * - * Returns: - * {Boolean} Whether or not this string starts with the string passed in. - */ - String.prototype.startsWith = function(sStart) { - OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated", - {'newMethod':'OpenLayers.String.startsWith'})); - return OpenLayers.String.startsWith(this, sStart); - }; -} - -if (!String.prototype.contains) { - /** - * APIMethod: String.contains - * *Deprecated*. Whether or not a string contains another string. - * - * Parameters: - * str - {String} The string that we're testing for. - * - * Returns: - * {Boolean} Whether or not this string contains with the string passed in. - */ - String.prototype.contains = function(str) { - OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated", - {'newMethod':'OpenLayers.String.contains'})); - return OpenLayers.String.contains(this, str); - }; -} - -if (!String.prototype.trim) { - /** - * APIMethod: String.trim - * *Deprecated*. Removes leading and trailing whitespace characters from a string. - * - * Returns: - * {String} A trimmed version of the string - all leading and - * trailing spaces removed - */ - String.prototype.trim = function() { - OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated", - {'newMethod':'OpenLayers.String.trim'})); - return OpenLayers.String.trim(this); - }; -} - -if (!String.prototype.camelize) { - /** - * APIMethod: String.camelize - * *Deprecated*. Camel-case a hyphenated string. - * Ex. "chicken-head" becomes "chickenHead", and - * "-chicken-head" becomes "ChickenHead". - * - * Returns: - * {String} The string, camelized - */ - String.prototype.camelize = function() { - OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated", - {'newMethod':'OpenLayers.String.camelize'})); - return OpenLayers.String.camelize(this); - }; -} - /** * Namespace: OpenLayers.Number * Contains convenience functions for manipulating numbers. @@ -360,26 +291,6 @@ OpenLayers.Number = { } }; -if (!Number.prototype.limitSigDigs) { - /** - * APIMethod: Number.limitSigDigs - * *Deprecated*. Limit the number of significant digits on an integer. Does *not* - * work with floats! - * - * Parameters: - * sig - {Integer} - * - * Returns: - * {Integer} The number, rounded to the specified number of significant digits. - * If null, 0, or negative value passed in, returns 0 - */ - Number.prototype.limitSigDigs = function(sig) { - OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated", - {'newMethod':'OpenLayers.Number.limitSigDigs'})); - return OpenLayers.Number.limitSigDigs(this, sig); - }; -} - /** * Namespace: OpenLayers.Function * Contains convenience functions for function manipulation. @@ -471,47 +382,6 @@ OpenLayers.Function = { }; -if (!Function.prototype.bind) { - /** - * APIMethod: Function.bind - * *Deprecated*. Bind a function to an object. - * Method to easily create closures with 'this' altered. - * - * Parameters: - * object - {Object} the this parameter - * - * Returns: - * {Function} A closure with 'this' altered to the first - * argument. - */ - Function.prototype.bind = function() { - OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated", - {'newMethod':'OpenLayers.Function.bind'})); - // new function takes the same arguments with this function up front - Array.prototype.unshift.apply(arguments, [this]); - return OpenLayers.Function.bind.apply(null, arguments); - }; -} - -if (!Function.prototype.bindAsEventListener) { - /** - * APIMethod: Function.bindAsEventListener - * *Deprecated*. Bind a function to an object, and configure it to receive the - * event object as first parameter when called. - * - * Parameters: - * object - {Object} A reference to this. - * - * Returns: - * {Function} - */ - Function.prototype.bindAsEventListener = function(object) { - OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated", - {'newMethod':'OpenLayers.Function.bindAsEventListener'})); - return OpenLayers.Function.bindAsEventListener(this, object); - }; -} - /** * Namespace: OpenLayers.Array * Contains convenience functions for array manipulation. diff --git a/lib/OpenLayers/BaseTypes/Class.js b/lib/OpenLayers/BaseTypes/Class.js index a1f3495b54..d28637dbfb 100644 --- a/lib/OpenLayers/BaseTypes/Class.js +++ b/lib/OpenLayers/BaseTypes/Class.js @@ -49,48 +49,6 @@ OpenLayers.Class = function() { return C; }; -/** - * Property: isPrototype - * *Deprecated*. This is no longer needed and will be removed at 3.0. - */ -OpenLayers.Class.isPrototype = function () {}; - -/** - * APIFunction: OpenLayers.create - * *Deprecated*. Old method to create an OpenLayers style class. Use the - * constructor instead. - * - * Returns: - * An OpenLayers class - */ -OpenLayers.Class.create = function() { - return function() { - if (arguments && arguments[0] != OpenLayers.Class.isPrototype) { - this.initialize.apply(this, arguments); - } - }; -}; - -/** - * APIFunction: inherit - * *Deprecated*. Old method to inherit from one or more OpenLayers style - * classes. Use the constructor instead. - * - * Parameters: - * class - One or more classes can be provided as arguments - * - * Returns: - * An object prototype - */ -OpenLayers.Class.inherit = function (P) { - var C = function() { - P.call(this); - }; - var newArgs = [C].concat(Array.prototype.slice.call(arguments)); - OpenLayers.inherit.apply(null, newArgs); - return C.prototype; -}; - /** * Function: OpenLayers.inherit * diff --git a/lib/OpenLayers/BaseTypes/Element.js b/lib/OpenLayers/BaseTypes/Element.js index 329a19bc87..bc1d84ed8a 100644 --- a/lib/OpenLayers/BaseTypes/Element.js +++ b/lib/OpenLayers/BaseTypes/Element.js @@ -36,50 +36,9 @@ OpenLayers.Element = { toggle: function() { for (var i=0, len=arguments.length; i var map = new OpenLayers.Map('map', { controls: [] }); * > * > map.addControl(new OpenLayers.Control.PanZoomBar()); - * > map.addControl(new OpenLayers.Control.MouseToolbar()); * > map.addControl(new OpenLayers.Control.LayerSwitcher({'ascending':false})); * > map.addControl(new OpenLayers.Control.Permalink()); * > map.addControl(new OpenLayers.Control.Permalink('permalink')); diff --git a/lib/OpenLayers/Control/MouseDefaults.js b/lib/OpenLayers/Control/MouseDefaults.js deleted file mode 100644 index cc71164b4a..0000000000 --- a/lib/OpenLayers/Control/MouseDefaults.js +++ /dev/null @@ -1,368 +0,0 @@ -/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for - * full list of contributors). Published under the Clear BSD license. - * See http://svn.openlayers.org/trunk/openlayers/license.txt for the - * full text of the license. */ - -/** - * @requires OpenLayers/Control.js - */ - -/** - * Class: OpenLayers.Control.MouseDefaults - * This class is DEPRECATED in 2.4 and will be removed by 3.0. - * If you need this functionality, use - * instead!!! - * - * This class is DEPRECATED in 2.4 and will be removed by 3.0. - * If you need this functionality, use Control.Navigation instead!!! - * - * Inherits from: - * - - */ -OpenLayers.Control.MouseDefaults = OpenLayers.Class(OpenLayers.Control, { - - /** WARNING WARNING WARNING!!! - This class is DEPRECATED in 2.4 and will be removed by 3.0. - If you need this functionality, use Control.Navigation instead!!! */ - - /** - * Property: performedDrag - * {Boolean} - */ - performedDrag: false, - - /** - * Property: wheelObserver - * {Function} - */ - wheelObserver: null, - - /** - * Constructor: OpenLayers.Control.MouseDefaults - */ - initialize: function() { - OpenLayers.Control.prototype.initialize.apply(this, arguments); - }, - - /** - * APIMethod: destroy - */ - destroy: function() { - - if (this.handler) { - this.handler.destroy(); - } - this.handler = null; - - this.map.events.un({ - "click": this.defaultClick, - "dblclick": this.defaultDblClick, - "mousedown": this.defaultMouseDown, - "mouseup": this.defaultMouseUp, - "mousemove": this.defaultMouseMove, - "mouseout": this.defaultMouseOut, - scope: this - }); - - //unregister mousewheel events specifically on the window and document - OpenLayers.Event.stopObserving(window, "DOMMouseScroll", - this.wheelObserver); - OpenLayers.Event.stopObserving(window, "mousewheel", - this.wheelObserver); - OpenLayers.Event.stopObserving(document, "mousewheel", - this.wheelObserver); - this.wheelObserver = null; - - OpenLayers.Control.prototype.destroy.apply(this, arguments); - }, - - /** - * Method: draw - */ - draw: function() { - this.map.events.on({ - "click": this.defaultClick, - "dblclick": this.defaultDblClick, - "mousedown": this.defaultMouseDown, - "mouseup": this.defaultMouseUp, - "mousemove": this.defaultMouseMove, - "mouseout": this.defaultMouseOut, - scope: this - }); - - this.registerWheelEvents(); - - }, - - /** - * Method: registerWheelEvents - */ - registerWheelEvents: function() { - - this.wheelObserver = OpenLayers.Function.bindAsEventListener( - this.onWheelEvent, this - ); - - //register mousewheel events specifically on the window and document - OpenLayers.Event.observe(window, "DOMMouseScroll", this.wheelObserver); - OpenLayers.Event.observe(window, "mousewheel", this.wheelObserver); - OpenLayers.Event.observe(document, "mousewheel", this.wheelObserver); - }, - - /** - * Method: defaultClick - * - * Parameters: - * evt - {Event} - * - * Returns: - * {Boolean} - */ - defaultClick: function (evt) { - if (!OpenLayers.Event.isLeftClick(evt)) { - return; - } - var notAfterDrag = !this.performedDrag; - this.performedDrag = false; - return notAfterDrag; - }, - - /** - * Method: defaultDblClick - * - * Parameters: - * evt - {Event} - */ - defaultDblClick: function (evt) { - var newCenter = this.map.getLonLatFromViewPortPx( evt.xy ); - this.map.setCenter(newCenter, this.map.zoom + 1); - OpenLayers.Event.stop(evt); - return false; - }, - - /** - * Method: defaultMouseDown - * - * Parameters: - * evt - {Event} - */ - defaultMouseDown: function (evt) { - if (!OpenLayers.Event.isLeftClick(evt)) { - return; - } - this.mouseDragStart = evt.xy.clone(); - this.performedDrag = false; - if (evt.shiftKey) { - this.map.div.style.cursor = "crosshair"; - this.zoomBox = OpenLayers.Util.createDiv('zoomBox', - this.mouseDragStart, - null, - null, - "absolute", - "2px solid red"); - this.zoomBox.style.backgroundColor = "white"; - this.zoomBox.style.filter = "alpha(opacity=50)"; // IE - this.zoomBox.style.opacity = "0.50"; - this.zoomBox.style.fontSize = "1px"; - this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1; - this.map.eventsDiv.appendChild(this.zoomBox); - } - document.onselectstart = OpenLayers.Function.False; - OpenLayers.Event.stop(evt); - }, - - /** - * Method: defaultMouseMove - * - * Parameters: - * evt - {Event} - */ - defaultMouseMove: function (evt) { - // record the mouse position, used in onWheelEvent - this.mousePosition = evt.xy.clone(); - - if (this.mouseDragStart != null) { - if (this.zoomBox) { - var deltaX = Math.abs(this.mouseDragStart.x - evt.xy.x); - var deltaY = Math.abs(this.mouseDragStart.y - evt.xy.y); - this.zoomBox.style.width = Math.max(1, deltaX) + "px"; - this.zoomBox.style.height = Math.max(1, deltaY) + "px"; - if (evt.xy.x < this.mouseDragStart.x) { - this.zoomBox.style.left = evt.xy.x+"px"; - } - if (evt.xy.y < this.mouseDragStart.y) { - this.zoomBox.style.top = evt.xy.y+"px"; - } - } else { - var deltaX = this.mouseDragStart.x - evt.xy.x; - var deltaY = this.mouseDragStart.y - evt.xy.y; - var size = this.map.getSize(); - var newXY = new OpenLayers.Pixel(size.w / 2 + deltaX, - size.h / 2 + deltaY); - var newCenter = this.map.getLonLatFromViewPortPx( newXY ); - this.map.setCenter(newCenter, null, true); - this.mouseDragStart = evt.xy.clone(); - this.map.div.style.cursor = "move"; - } - this.performedDrag = true; - } - }, - - /** - * Method: defaultMouseUp - * - * Parameters: - * evt - {} - */ - defaultMouseUp: function (evt) { - if (!OpenLayers.Event.isLeftClick(evt)) { - return; - } - if (this.zoomBox) { - this.zoomBoxEnd(evt); - } else { - if (this.performedDrag) { - this.map.setCenter(this.map.center); - } - } - document.onselectstart=null; - this.mouseDragStart = null; - this.map.div.style.cursor = ""; - }, - - /** - * Method: defaultMouseOut - * - * Parameters: - * evt - {Event} - */ - defaultMouseOut: function (evt) { - if (this.mouseDragStart != null && - OpenLayers.Util.mouseLeft(evt, this.map.eventsDiv)) { - if (this.zoomBox) { - this.removeZoomBox(); - } - this.mouseDragStart = null; - } - }, - - - /** - * Method: defaultWheelUp - * User spun scroll wheel up - * - */ - defaultWheelUp: function(evt) { - if (this.map.getZoom() <= this.map.getNumZoomLevels()) { - this.map.setCenter(this.map.getLonLatFromPixel(evt.xy), - this.map.getZoom() + 1); - } - }, - - /** - * Method: defaultWheelDown - * User spun scroll wheel down - */ - defaultWheelDown: function(evt) { - if (this.map.getZoom() > 0) { - this.map.setCenter(this.map.getLonLatFromPixel(evt.xy), - this.map.getZoom() - 1); - } - }, - - /** - * Method: zoomBoxEnd - * Zoombox function. - */ - zoomBoxEnd: function(evt) { - if (this.mouseDragStart != null) { - if (Math.abs(this.mouseDragStart.x - evt.xy.x) > 5 || - Math.abs(this.mouseDragStart.y - evt.xy.y) > 5) { - var start = this.map.getLonLatFromViewPortPx( this.mouseDragStart ); - var end = this.map.getLonLatFromViewPortPx( evt.xy ); - var top = Math.max(start.lat, end.lat); - var bottom = Math.min(start.lat, end.lat); - var left = Math.min(start.lon, end.lon); - var right = Math.max(start.lon, end.lon); - var bounds = new OpenLayers.Bounds(left, bottom, right, top); - this.map.zoomToExtent(bounds); - } else { - var end = this.map.getLonLatFromViewPortPx( evt.xy ); - this.map.setCenter(new OpenLayers.LonLat( - (end.lon), - (end.lat) - ), this.map.getZoom() + 1); - } - this.removeZoomBox(); - } - }, - - /** - * Method: removeZoomBox - * Remove the zoombox from the screen and nullify our reference to it. - */ - removeZoomBox: function() { - this.map.eventsDiv.removeChild(this.zoomBox); - this.zoomBox = null; - }, - - -/** - * Mouse ScrollWheel code thanks to http://adomas.org/javascript-mouse-wheel/ - */ - - - /** - * Method: onWheelEvent - * Catch the wheel event and handle it xbrowserly - * - * Parameters: - * e - {Event} - */ - onWheelEvent: function(e){ - - // first determine whether or not the wheeling was inside the map - var inMap = false; - var elem = OpenLayers.Event.element(e); - while(elem != null) { - if (this.map && elem == this.map.div) { - inMap = true; - break; - } - elem = elem.parentNode; - } - - if (inMap) { - - var delta = 0; - if (!e) { - e = window.event; - } - if (e.wheelDelta) { - delta = e.wheelDelta/120; - if (window.opera && window.opera.version() < 9.2) { - delta = -delta; - } - } else if (e.detail) { - delta = -e.detail / 3; - } - if (delta) { - // add the mouse position to the event because mozilla has a bug - // with clientX and clientY (see https://bugzilla.mozilla.org/show_bug.cgi?id=352179) - // getLonLatFromViewPortPx(e) returns wrong values - e.xy = this.mousePosition; - - if (delta < 0) { - this.defaultWheelDown(e); - } else { - this.defaultWheelUp(e); - } - } - - //only wheel the map, not the window - OpenLayers.Event.stop(e); - } - }, - - CLASS_NAME: "OpenLayers.Control.MouseDefaults" -}); diff --git a/lib/OpenLayers/Control/MouseToolbar.js b/lib/OpenLayers/Control/MouseToolbar.js deleted file mode 100644 index 9400c1791a..0000000000 --- a/lib/OpenLayers/Control/MouseToolbar.js +++ /dev/null @@ -1,406 +0,0 @@ -/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for - * full list of contributors). Published under the Clear BSD license. - * See http://svn.openlayers.org/trunk/openlayers/license.txt for the - * full text of the license. */ - - -/** - * @requires OpenLayers/Control.js - * @requires OpenLayers/Control/MouseDefaults.js - */ - -/** - * Class: OpenLayers.Control.MouseToolbar - * This class is DEPRECATED in 2.4 and will be removed by 3.0. - * If you need this functionality, use - * instead!!! - */ -OpenLayers.Control.MouseToolbar = OpenLayers.Class( - OpenLayers.Control.MouseDefaults, { - - /** - * Property: mode - */ - mode: null, - /** - * Property: buttons - */ - buttons: null, - - /** - * APIProperty: direction - * {String} 'vertical' or 'horizontal' - */ - direction: "vertical", - - /** - * Property: buttonClicked - * {String} - */ - buttonClicked: null, - - /** - * Constructor: OpenLayers.Control.MouseToolbar - * - * Parameters: - * position - {} - * direction - {String} - */ - initialize: function(position, direction) { - OpenLayers.Control.prototype.initialize.apply(this, arguments); - this.position = new OpenLayers.Pixel(OpenLayers.Control.MouseToolbar.X, - OpenLayers.Control.MouseToolbar.Y); - if (position) { - this.position = position; - } - if (direction) { - this.direction = direction; - } - this.measureDivs = []; - }, - - /** - * APIMethod: destroy - */ - destroy: function() { - for( var btnId in this.buttons) { - var btn = this.buttons[btnId]; - btn.map = null; - btn.events.destroy(); - } - OpenLayers.Control.MouseDefaults.prototype.destroy.apply(this, - arguments); - }, - - /** - * Method: draw - */ - draw: function() { - OpenLayers.Control.prototype.draw.apply(this, arguments); - OpenLayers.Control.MouseDefaults.prototype.draw.apply(this, arguments); - this.buttons = {}; - var sz = new OpenLayers.Size(28,28); - var centered = new OpenLayers.Pixel(OpenLayers.Control.MouseToolbar.X,0); - this._addButton("zoombox", "drag-rectangle-off.png", "drag-rectangle-on.png", centered, sz, "Shift->Drag to zoom to area"); - centered = centered.add((this.direction == "vertical" ? 0 : sz.w), (this.direction == "vertical" ? sz.h : 0)); - this._addButton("pan", "panning-hand-off.png", "panning-hand-on.png", centered, sz, "Drag the map to pan."); - centered = centered.add((this.direction == "vertical" ? 0 : sz.w), (this.direction == "vertical" ? sz.h : 0)); - this.switchModeTo("pan"); - - return this.div; - }, - - /** - * Method: _addButton - */ - _addButton:function(id, img, activeImg, xy, sz, title) { - var imgLocation = OpenLayers.Util.getImagesLocation() + img; - var activeImgLocation = OpenLayers.Util.getImagesLocation() + activeImg; - // var btn = new ol.AlphaImage("_"+id, imgLocation, xy, sz); - var btn = OpenLayers.Util.createAlphaImageDiv( - "OpenLayers_Control_MouseToolbar_" + id, - xy, sz, imgLocation, "absolute"); - - //we want to add the outer div - this.div.appendChild(btn); - btn.imgLocation = imgLocation; - btn.activeImgLocation = activeImgLocation; - - btn.events = new OpenLayers.Events(this, btn, null, true); - btn.events.on({ - "mousedown": this.buttonDown, - "mouseup": this.buttonUp, - "dblclick": OpenLayers.Event.stop, - scope: this - }); - btn.action = id; - btn.title = title; - btn.alt = title; - btn.map = this.map; - - //we want to remember/reference the outer div - this.buttons[id] = btn; - return btn; - }, - - /** - * Method: buttonDown - * - * Parameters: - * evt - {Event} - */ - buttonDown: function(evt) { - if (!OpenLayers.Event.isLeftClick(evt)) { - return; - } - this.buttonClicked = evt.element.action; - OpenLayers.Event.stop(evt); - }, - - /** - * Method: buttonUp - * - * Parameters: - * evt - {Event} - */ - buttonUp: function(evt) { - if (!OpenLayers.Event.isLeftClick(evt)) { - return; - } - if (this.buttonClicked != null) { - if (this.buttonClicked == evt.element.action) { - this.switchModeTo(evt.element.action); - } - OpenLayers.Event.stop(evt); - this.buttonClicked = null; - } - }, - - /** - * Method: defaultDblClick - * - * Parameters: - * evt - {Event} - */ - defaultDblClick: function (evt) { - this.switchModeTo("pan"); - this.performedDrag = false; - var newCenter = this.map.getLonLatFromViewPortPx( evt.xy ); - this.map.setCenter(newCenter, this.map.zoom + 1); - OpenLayers.Event.stop(evt); - return false; - }, - - /** - * Method: defaultMouseDown - * - * Parameters: - * evt - {Event} - */ - defaultMouseDown: function (evt) { - if (!OpenLayers.Event.isLeftClick(evt)) { - return; - } - this.mouseDragStart = evt.xy.clone(); - this.performedDrag = false; - this.startViaKeyboard = false; - if (evt.shiftKey && this.mode !="zoombox") { - this.switchModeTo("zoombox"); - this.startViaKeyboard = true; - } else if (evt.altKey && this.mode !="measure") { - this.switchModeTo("measure"); - } else if (!this.mode) { - this.switchModeTo("pan"); - } - - switch (this.mode) { - case "zoombox": - this.map.div.style.cursor = "crosshair"; - this.zoomBox = OpenLayers.Util.createDiv('zoomBox', - this.mouseDragStart, - null, - null, - "absolute", - "2px solid red"); - this.zoomBox.style.backgroundColor = "white"; - this.zoomBox.style.filter = "alpha(opacity=50)"; // IE - this.zoomBox.style.opacity = "0.50"; - this.zoomBox.style.fontSize = "1px"; - this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1; - this.map.eventsDiv.appendChild(this.zoomBox); - this.performedDrag = true; - break; - case "measure": - var distance = ""; - if (this.measureStart) { - var measureEnd = this.map.getLonLatFromViewPortPx(this.mouseDragStart); - distance = OpenLayers.Util.distVincenty(this.measureStart, measureEnd); - distance = Math.round(distance * 100) / 100; - distance = distance + "km"; - this.measureStartBox = this.measureBox; - } - this.measureStart = this.map.getLonLatFromViewPortPx(this.mouseDragStart);; - this.measureBox = OpenLayers.Util.createDiv(null, - this.mouseDragStart.add( - -2-parseInt(this.map.layerContainerDiv.style.left), - -2-parseInt(this.map.layerContainerDiv.style.top)), - null, - null, - "absolute"); - this.measureBox.style.width="4px"; - this.measureBox.style.height="4px"; - this.measureBox.style.fontSize = "1px"; - this.measureBox.style.backgroundColor="red"; - this.measureBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1; - this.map.layerContainerDiv.appendChild(this.measureBox); - if (distance) { - this.measureBoxDistance = OpenLayers.Util.createDiv(null, - this.mouseDragStart.add( - -2-parseInt(this.map.layerContainerDiv.style.left), - 2-parseInt(this.map.layerContainerDiv.style.top)), - null, - null, - "absolute"); - - this.measureBoxDistance.innerHTML = distance; - this.measureBoxDistance.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1; - this.map.layerContainerDiv.appendChild(this.measureBoxDistance); - this.measureDivs.push(this.measureBoxDistance); - } - this.measureBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1; - this.map.layerContainerDiv.appendChild(this.measureBox); - this.measureDivs.push(this.measureBox); - break; - default: - this.map.div.style.cursor = "move"; - break; - } - document.onselectstart = OpenLayers.Function.False; - OpenLayers.Event.stop(evt); - }, - - /** - * Method: switchModeTo - * - * Parameters: - * mode - {String} - */ - switchModeTo: function(mode) { - if (mode != this.mode) { - - - if (this.mode && this.buttons[this.mode]) { - OpenLayers.Util.modifyAlphaImageDiv(this.buttons[this.mode], null, null, null, this.buttons[this.mode].imgLocation); - } - if (this.mode == "measure" && mode != "measure") { - for(var i=0, len=this.measureDivs.length; i 0) { - var coords = OpenLayers.String.trim(this.concatChildValues(line[0])).split(/\s+/); + var coords = OpenLayers.String.trim(this.getChildValue(line[0])).split(/\s+/); var components = []; var point; for (var i=0, len=coords.length; i 0) { - var coords = OpenLayers.String.trim(this.concatChildValues(polygon[0])).split(/\s+/); + var coords = OpenLayers.String.trim(this.getChildValue(polygon[0])).split(/\s+/); var components = []; var point; for (var i=0, len=coords.length; i instead. - * - * Concatenate the value of all child nodes if any exist, or return an - * optional default string. Returns an empty string if no children - * exist and no default value is supplied. Not optimized for large - * numbers of child nodes. - * - * Parameters: - * node - {DOMElement} The element used to look for child values. - * def - {String} Optional string to return in the event that no - * child exist. - * - * Returns: - * {String} The concatenated value of all child nodes of the given node. - */ - concatChildValues: function(node, def) { - var value = ""; - var child = node.firstChild; - var childValue; - while(child) { - childValue = child.nodeValue; - if(childValue) { - value += childValue; - } - child = child.nextSibling; - } - if(value == "" && def != undefined) { - value = def; - } - return value; - }, - /** * APIMethod: isSimpleContent * Test if the given node has only simple content (i.e. no child element diff --git a/lib/OpenLayers/Layer/MapServer/Untiled.js b/lib/OpenLayers/Layer/MapServer/Untiled.js deleted file mode 100644 index 3935919283..0000000000 --- a/lib/OpenLayers/Layer/MapServer/Untiled.js +++ /dev/null @@ -1,72 +0,0 @@ -/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for - * full list of contributors). Published under the Clear BSD license. - * See http://svn.openlayers.org/trunk/openlayers/license.txt for the - * full text of the license. */ - - -/** - * @requires OpenLayers/Layer/MapServer.js - * @requires OpenLayers/Console.js - */ - -/** - * Class: OpenLayers.Layer.MapServer.Untiled - * *Deprecated*. To be removed in 3.0. Instead use OpenLayers.Layer.MapServer - * and pass the option 'singleTile' as true. - * - * Inherits from: - * - - */ -OpenLayers.Layer.MapServer.Untiled = OpenLayers.Class(OpenLayers.Layer.MapServer, { - - /** - * APIProperty: singleTile - * {singleTile} Always true for untiled. - */ - singleTile: true, - - /** - * Constructor: OpenLayers.Layer.MapServer.Untiled - * - * Parameters: - * name - {String} - * url - {String} - * params - {Object} - * options - {Object} - */ - initialize: function(name, url, params, options) { - OpenLayers.Layer.MapServer.prototype.initialize.apply(this, arguments); - - var msg = "The OpenLayers.Layer.MapServer.Untiled class is deprecated and " + - "will be removed in 3.0. Instead, you should use the " + - "normal OpenLayers.Layer.MapServer class, passing it the option " + - "'singleTile' as true."; - OpenLayers.Console.warn(msg); - }, - - /** - * Method: clone - * Create a clone of this layer - * - * Returns: - * {} An exact clone of this layer - */ - clone: function (obj) { - - if (obj == null) { - obj = new OpenLayers.Layer.MapServer.Untiled(this.name, - this.url, - this.params, - this.getOptions()); - } - - //get all additions from superclasses - obj = OpenLayers.Layer.MapServer.prototype.clone.apply(this, [obj]); - - // copy/set any non-init, non-simple values here - - return obj; - }, - - CLASS_NAME: "OpenLayers.Layer.MapServer.Untiled" -}); diff --git a/lib/OpenLayers/Layer/WMS/Post.js b/lib/OpenLayers/Layer/WMS/Post.js deleted file mode 100644 index 0042fbb170..0000000000 --- a/lib/OpenLayers/Layer/WMS/Post.js +++ /dev/null @@ -1,103 +0,0 @@ -/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for - * full list of contributors). Published under the Clear BSD license. - * See http://svn.openlayers.org/trunk/openlayers/license.txt for the - * full text of the license. */ - - -/** - * @requires OpenLayers/Layer/WMS.js - * @requires OpenLayers/Tile/Image/IFrame.js - */ - -/** - * Class: OpenLayers.Layer.WMS.Post - * Instances of OpenLayers.Layer.WMS.Post are used to retrieve data from OGC - * Web Mapping Services via HTTP-POST (application/x-www-form-urlencoded). - * Create a new WMS layer with the constructor. - * - * *Deprecated*. Instead of this layer, use with - * configured in the layer's - * . - * - * Inherits from: - * - - */ -OpenLayers.Layer.WMS.Post = OpenLayers.Class(OpenLayers.Layer.WMS, { - - /** - * APIProperty: unsupportedBrowsers - * {Array} Array with browsers, which should use the HTTP-GET protocol - * instead of HTTP-POST for fetching tiles from a WMS . - * Defaults to ["mozilla", "firefox", "opera"], because Opera is not able - * to show transparent images in IFrames and Firefox/Mozilla has some ugly - * effects of viewport-shaking when panning the map. Both browsers, Opera - * and Firefox/Mozilla, have no problem with long urls, which is the reason - * for using POST instead of GET. The strings to pass to this array are - * the ones returned by . - */ - unsupportedBrowsers: ["mozilla", "firefox", "opera"], - - /** - * Property: SUPPORTED_TRANSITIONS - * {Array} - * no supported transitions for this type of layer, because it is not - * possible to modify the initialized tiles (iframes) - */ - SUPPORTED_TRANSITIONS: [], - - /** - * Property: usePost - * {Boolean} - */ - usePost: null, - - /** - * Constructor: OpenLayers.Layer.WMS.Post - * Creates a new WMS layer object. - * - * Example: - * (code) - * var wms = new OpenLayers.Layer.WMS.Post( - * "NASA Global Mosaic", - * "http://wms.jpl.nasa.gov/wms.cgi", - * {layers: "modis, global_mosaic"}); - * (end) - * - * Parameters: - * name - {String} A name for the layer - * url - {String} Base url for the WMS - * (e.g. http://wms.jpl.nasa.gov/wms.cgi) - * params - {Object} An object with key/value pairs representing the - * GetMap query string parameters and parameter values. - * options - {Object} Hashtable of extra options to tag onto the layer. - */ - initialize: function(name, url, params, options) { - var newArguments = []; - newArguments.push(name, url, params, options); - OpenLayers.Layer.WMS.prototype.initialize.apply(this, newArguments); - - this.usePost = OpenLayers.Util.indexOf( - this.unsupportedBrowsers, OpenLayers.BROWSER_NAME) == -1; - }, - - /** - * Method: addTile - * addTile creates a tile, initializes it and adds it as iframe to the - * layer div. - * - * Parameters: - * bounds - {} - * position - {} - * - * Returns: - * {} The added OpenLayers.Tile.Image.IFrame - */ - addTile: function(bounds,position) { - return new OpenLayers.Tile.Image( - this, position, bounds, null, this.tileSize, { - maxGetUrlLength: this.usePost ? 0 : null - }); - }, - - CLASS_NAME: 'OpenLayers.Layer.WMS.Post' -}); diff --git a/lib/OpenLayers/Layer/WMS/Untiled.js b/lib/OpenLayers/Layer/WMS/Untiled.js deleted file mode 100644 index 7589e77bd8..0000000000 --- a/lib/OpenLayers/Layer/WMS/Untiled.js +++ /dev/null @@ -1,72 +0,0 @@ -/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for - * full list of contributors). Published under the Clear BSD license. - * See http://svn.openlayers.org/trunk/openlayers/license.txt for the - * full text of the license. */ - - -/** - * @requires OpenLayers/Layer/WMS.js - * @requires OpenLayers/Console.js - */ - -/** - * Class: OpenLayers.Layer.WMS.Untiled - * *Deprecated*. To be removed in 3.0. Instead use OpenLayers.Layer.WMS and - * pass the option 'singleTile' as true. - * - * Inherits from: - * - - */ -OpenLayers.Layer.WMS.Untiled = OpenLayers.Class(OpenLayers.Layer.WMS, { - - /** - * APIProperty: singleTile - * {singleTile} Always true for untiled. - */ - singleTile: true, - - /** - * Constructor: OpenLayers.Layer.WMS.Untiled - * - * Parameters: - * name - {String} - * url - {String} - * params - {Object} - * options - {Object} - */ - initialize: function(name, url, params, options) { - OpenLayers.Layer.WMS.prototype.initialize.apply(this, arguments); - - var msg = "The OpenLayers.Layer.WMS.Untiled class is deprecated and " + - "will be removed in 3.0. Instead, you should use the " + - "normal OpenLayers.Layer.WMS class, passing it the option " + - "'singleTile' as true."; - OpenLayers.Console.warn(msg); - }, - - /** - * Method: clone - * Create a clone of this layer - * - * Returns: - * {} An exact clone of this layer - */ - clone: function (obj) { - - if (obj == null) { - obj = new OpenLayers.Layer.WMS.Untiled(this.name, - this.url, - this.params, - this.getOptions()); - } - - //get all additions from superclasses - obj = OpenLayers.Layer.WMS.prototype.clone.apply(this, [obj]); - - // copy/set any non-init, non-simple values here - - return obj; - }, - - CLASS_NAME: "OpenLayers.Layer.WMS.Untiled" -}); diff --git a/lib/OpenLayers/Request.js b/lib/OpenLayers/Request.js index 3a5865bc0a..c1598143ad 100644 --- a/lib/OpenLayers/Request.js +++ b/lib/OpenLayers/Request.js @@ -7,6 +7,12 @@ * @requires OpenLayers/Events.js */ +/** + * TODO: deprecate me + * Use OpenLayers.Request.proxy instead. + */ +OpenLayers.ProxyHost = ""; + /** * Namespace: OpenLayers.Request * The OpenLayers.Request namespace contains convenience methods for working diff --git a/lib/deprecated.js b/lib/deprecated.js new file mode 100644 index 0000000000..11a80ed00c --- /dev/null +++ b/lib/deprecated.js @@ -0,0 +1,1971 @@ +/** + * @requires OpenLayers/BaseTypes/Class.js + * @requires OpenLayers/Util.js + * @requires OpenLayers/Control.js + * @requires OpenLayers/Format.js + * @requires OpenLayers/Request.js + * @requires OpenLayers/Layer/WMS.js + * @requires OpenLayers/Layer/MapServer.js + */ + +/** + * Namespace: OpenLayers.Class + */ + +/** + * Property: isPrototype + * *Deprecated*. This is no longer needed and will be removed at 3.0. + */ +OpenLayers.Class.isPrototype = function () {}; + +/** + * APIFunction: OpenLayers.create + * *Deprecated*. Old method to create an OpenLayers style class. Use the + * constructor instead. + * + * Returns: + * An OpenLayers class + */ +OpenLayers.Class.create = function() { + return function() { + if (arguments && arguments[0] != OpenLayers.Class.isPrototype) { + this.initialize.apply(this, arguments); + } + }; +}; + +/** + * APIFunction: inherit + * *Deprecated*. Old method to inherit from one or more OpenLayers style + * classes. Use the constructor instead. + * + * Parameters: + * class - One or more classes can be provided as arguments + * + * Returns: + * An object prototype + */ +OpenLayers.Class.inherit = function (P) { + var C = function() { + P.call(this); + }; + var newArgs = [C].concat(Array.prototype.slice.call(arguments)); + OpenLayers.inherit.apply(null, newArgs); + return C.prototype; +}; + +/** + * Function: OpenLayers.nullHandler + * @param {} request + */ +OpenLayers.nullHandler = function(request) { + OpenLayers.Console.userError(OpenLayers.i18n("unhandledRequest", {'statusText':request.statusText})); +}; + +/** + * APIFunction: OpenLayers.loadURL + * Background load a document. + * *Deprecated*. Use method instead. + * + * Parameters: + * uri - {String} URI of source doc + * params - {String} or {Object} GET params. Either a string in the form + * "?hello=world&foo=bar" (do not forget the leading question mark) + * or an object in the form {'hello': 'world', 'foo': 'bar} + * caller - {Object} object which gets callbacks + * onComplete - {Function} Optional callback for success. The callback + * will be called with this set to caller and will receive the request + * object as an argument. Note that if you do not specify an onComplete + * function, will be called (which pops up a + * user friendly error message dialog). + * onFailure - {Function} Optional callback for failure. In the event of + * a failure, the callback will be called with this set to caller and will + * receive the request object as an argument. Note that if you do not + * specify an onComplete function, will be called + * (which pops up a user friendly error message dialog). + * + * Returns: + * {} The request object. To abort loading, + * call request.abort(). + */ +OpenLayers.loadURL = function(uri, params, caller, + onComplete, onFailure) { + + if(typeof params == 'string') { + params = OpenLayers.Util.getParameters(params); + } + var success = (onComplete) ? onComplete : OpenLayers.nullHandler; + var failure = (onFailure) ? onFailure : OpenLayers.nullHandler; + + return OpenLayers.Request.GET({ + url: uri, params: params, + success: success, failure: failure, scope: caller + }); +}; + +/** + * Function: OpenLayers.parseXMLString + * Parse XML into a doc structure + * + * Parameters: + * text - {String} + * + * Returns: + * {?} Parsed AJAX Responsev + */ +OpenLayers.parseXMLString = function(text) { + + //MS sucks, if the server is bad it dies + var index = text.indexOf('<'); + if (index > 0) { + text = text.substring(index); + } + + var ajaxResponse = OpenLayers.Util.Try( + function() { + var xmldom = new ActiveXObject('Microsoft.XMLDOM'); + xmldom.loadXML(text); + return xmldom; + }, + function() { + return new DOMParser().parseFromString(text, 'text/xml'); + }, + function() { + var req = new XMLHttpRequest(); + req.open("GET", "data:" + "text/xml" + + ";charset=utf-8," + encodeURIComponent(text), false); + if (req.overrideMimeType) { + req.overrideMimeType("text/xml"); + } + req.send(null); + return req.responseXML; + } + ); + + return ajaxResponse; +}; + + +/** + * Namespace: OpenLayers.Ajax + */ +OpenLayers.Ajax = { + + /** + * Method: emptyFunction + */ + emptyFunction: function () {}, + + /** + * Method: getTransport + * + * Returns: + * {Object} Transport mechanism for whichever browser we're in, or false if + * none available. + */ + getTransport: function() { + return OpenLayers.Util.Try( + function() {return new XMLHttpRequest();}, + function() {return new ActiveXObject('Msxml2.XMLHTTP');}, + function() {return new ActiveXObject('Microsoft.XMLHTTP');} + ) || false; + }, + + /** + * Property: activeRequestCount + * {Integer} + */ + activeRequestCount: 0 +}; + +/** + * Namespace: OpenLayers.Ajax.Responders + * {Object} + */ +OpenLayers.Ajax.Responders = { + + /** + * Property: responders + * {Array} + */ + responders: [], + + /** + * Method: register + * + * Parameters: + * responderToAdd - {?} + */ + register: function(responderToAdd) { + for (var i = 0; i < this.responders.length; i++){ + if (responderToAdd == this.responders[i]){ + return; + } + } + this.responders.push(responderToAdd); + }, + + /** + * Method: unregister + * + * Parameters: + * responderToRemove - {?} + */ + unregister: function(responderToRemove) { + OpenLayers.Util.removeItem(this.reponders, responderToRemove); + }, + + /** + * Method: dispatch + * + * Parameters: + * callback - {?} + * request - {?} + * transport - {?} + */ + dispatch: function(callback, request, transport) { + var responder; + for (var i = 0; i < this.responders.length; i++) { + responder = this.responders[i]; + + if (responder[callback] && + typeof responder[callback] == 'function') { + try { + responder[callback].apply(responder, + [request, transport]); + } catch (e) {} + } + } + } +}; + +OpenLayers.Ajax.Responders.register({ + /** + * Function: onCreate + */ + onCreate: function() { + OpenLayers.Ajax.activeRequestCount++; + }, + + /** + * Function: onComplete + */ + onComplete: function() { + OpenLayers.Ajax.activeRequestCount--; + } +}); + +/** + * Class: OpenLayers.Ajax.Base + */ +OpenLayers.Ajax.Base = OpenLayers.Class({ + + /** + * Constructor: OpenLayers.Ajax.Base + * + * Parameters: + * options - {Object} + */ + initialize: function(options) { + this.options = { + method: 'post', + asynchronous: true, + contentType: 'application/xml', + parameters: '' + }; + OpenLayers.Util.extend(this.options, options || {}); + + this.options.method = this.options.method.toLowerCase(); + + if (typeof this.options.parameters == 'string') { + this.options.parameters = + OpenLayers.Util.getParameters(this.options.parameters); + } + } +}); + +/** + * Class: OpenLayers.Ajax.Request + * *Deprecated*. Use method instead. + * + * Inherit: + * - + */ +OpenLayers.Ajax.Request = OpenLayers.Class(OpenLayers.Ajax.Base, { + + /** + * Property: _complete + * + * {Boolean} + */ + _complete: false, + + /** + * Constructor: OpenLayers.Ajax.Request + * + * Parameters: + * url - {String} + * options - {Object} + */ + initialize: function(url, options) { + OpenLayers.Ajax.Base.prototype.initialize.apply(this, [options]); + + if (OpenLayers.ProxyHost && OpenLayers.String.startsWith(url, "http")) { + url = OpenLayers.ProxyHost + encodeURIComponent(url); + } + + this.transport = OpenLayers.Ajax.getTransport(); + this.request(url); + }, + + /** + * Method: request + * + * Parameters: + * url - {String} + */ + request: function(url) { + this.url = url; + this.method = this.options.method; + var params = OpenLayers.Util.extend({}, this.options.parameters); + + if (this.method != 'get' && this.method != 'post') { + // simulate other verbs over post + params['_method'] = this.method; + this.method = 'post'; + } + + this.parameters = params; + + if (params = OpenLayers.Util.getParameterString(params)) { + // when GET, append parameters to URL + if (this.method == 'get') { + this.url += ((this.url.indexOf('?') > -1) ? '&' : '?') + params; + } else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) { + params += '&_='; + } + } + try { + var response = new OpenLayers.Ajax.Response(this); + if (this.options.onCreate) { + this.options.onCreate(response); + } + + OpenLayers.Ajax.Responders.dispatch('onCreate', + this, + response); + + this.transport.open(this.method.toUpperCase(), + this.url, + this.options.asynchronous); + + if (this.options.asynchronous) { + window.setTimeout( + OpenLayers.Function.bind(this.respondToReadyState, this, 1), + 10); + } + + this.transport.onreadystatechange = + OpenLayers.Function.bind(this.onStateChange, this); + this.setRequestHeaders(); + + this.body = this.method == 'post' ? + (this.options.postBody || params) : null; + this.transport.send(this.body); + + // Force Firefox to handle ready state 4 for synchronous requests + if (!this.options.asynchronous && + this.transport.overrideMimeType) { + this.onStateChange(); + } + } catch (e) { + this.dispatchException(e); + } + }, + + /** + * Method: onStateChange + */ + onStateChange: function() { + var readyState = this.transport.readyState; + if (readyState > 1 && !((readyState == 4) && this._complete)) { + this.respondToReadyState(this.transport.readyState); + } + }, + + /** + * Method: setRequestHeaders + */ + setRequestHeaders: function() { + var headers = { + 'X-Requested-With': 'XMLHttpRequest', + 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*', + 'OpenLayers': true + }; + + if (this.method == 'post') { + headers['Content-type'] = this.options.contentType + + (this.options.encoding ? '; charset=' + this.options.encoding : ''); + + /* Force "Connection: close" for older Mozilla browsers to work + * around a bug where XMLHttpRequest sends an incorrect + * Content-length header. See Mozilla Bugzilla #246651. + */ + if (this.transport.overrideMimeType && + (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005) { + headers['Connection'] = 'close'; + } + } + // user-defined headers + if (typeof this.options.requestHeaders == 'object') { + var extras = this.options.requestHeaders; + + if (typeof extras.push == 'function') { + for (var i = 0, length = extras.length; i < length; i += 2) { + headers[extras[i]] = extras[i+1]; + } + } else { + for (var i in extras) { + headers[i] = extras[i]; + } + } + } + + for (var name in headers) { + this.transport.setRequestHeader(name, headers[name]); + } + }, + + /** + * Method: success + * + * Returns: + * {Boolean} - + */ + success: function() { + var status = this.getStatus(); + return !status || (status >=200 && status < 300); + }, + + /** + * Method: getStatus + * + * Returns: + * {Integer} - Status + */ + getStatus: function() { + try { + return this.transport.status || 0; + } catch (e) { + return 0; + } + }, + + /** + * Method: respondToReadyState + * + * Parameters: + * readyState - {?} + */ + respondToReadyState: function(readyState) { + var state = OpenLayers.Ajax.Request.Events[readyState]; + var response = new OpenLayers.Ajax.Response(this); + + if (state == 'Complete') { + try { + this._complete = true; + (this.options['on' + response.status] || + this.options['on' + (this.success() ? 'Success' : 'Failure')] || + OpenLayers.Ajax.emptyFunction)(response); + } catch (e) { + this.dispatchException(e); + } + + var contentType = response.getHeader('Content-type'); + } + + try { + (this.options['on' + state] || + OpenLayers.Ajax.emptyFunction)(response); + OpenLayers.Ajax.Responders.dispatch('on' + state, + this, + response); + } catch (e) { + this.dispatchException(e); + } + + if (state == 'Complete') { + // avoid memory leak in MSIE: clean up + this.transport.onreadystatechange = OpenLayers.Ajax.emptyFunction; + } + }, + + /** + * Method: getHeader + * + * Parameters: + * name - {String} Header name + * + * Returns: + * {?} - response header for the given name + */ + getHeader: function(name) { + try { + return this.transport.getResponseHeader(name); + } catch (e) { + return null; + } + }, + + /** + * Method: dispatchException + * If the optional onException function is set, execute it + * and then dispatch the call to any other listener registered + * for onException. + * + * If no optional onException function is set, we suspect that + * the user may have also not used + * OpenLayers.Ajax.Responders.register to register a listener + * for the onException call. To make sure that something + * gets done with this exception, only dispatch the call if there + * are listeners. + * + * If you explicitly want to swallow exceptions, set + * request.options.onException to an empty function (function(){}) + * or register an empty function with + * for onException. + * + * Parameters: + * exception - {?} + */ + dispatchException: function(exception) { + var handler = this.options.onException; + if(handler) { + // call options.onException and alert any other listeners + handler(this, exception); + OpenLayers.Ajax.Responders.dispatch('onException', this, exception); + } else { + // check if there are any other listeners + var listener = false; + var responders = OpenLayers.Ajax.Responders.responders; + for (var i = 0; i < responders.length; i++) { + if(responders[i].onException) { + listener = true; + break; + } + } + if(listener) { + // call all listeners + OpenLayers.Ajax.Responders.dispatch('onException', this, exception); + } else { + // let the exception through + throw exception; + } + } + } +}); + +/** + * Property: Events + * {Array(String)} + */ +OpenLayers.Ajax.Request.Events = + ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; + +/** + * Class: OpenLayers.Ajax.Response + */ +OpenLayers.Ajax.Response = OpenLayers.Class({ + + /** + * Property: status + * + * {Integer} + */ + status: 0, + + + /** + * Property: statusText + * + * {String} + */ + statusText: '', + + /** + * Constructor: OpenLayers.Ajax.Response + * + * Parameters: + * request - {Object} + */ + initialize: function(request) { + this.request = request; + var transport = this.transport = request.transport, + readyState = this.readyState = transport.readyState; + + if ((readyState > 2 && + !(!!(window.attachEvent && !window.opera))) || + readyState == 4) { + this.status = this.getStatus(); + this.statusText = this.getStatusText(); + this.responseText = transport.responseText == null ? + '' : String(transport.responseText); + } + + if(readyState == 4) { + var xml = transport.responseXML; + this.responseXML = xml === undefined ? null : xml; + } + }, + + /** + * Method: getStatus + */ + getStatus: OpenLayers.Ajax.Request.prototype.getStatus, + + /** + * Method: getStatustext + * + * Returns: + * {String} - statusText + */ + getStatusText: function() { + try { + return this.transport.statusText || ''; + } catch (e) { + return ''; + } + }, + + /** + * Method: getHeader + */ + getHeader: OpenLayers.Ajax.Request.prototype.getHeader, + + /** + * Method: getResponseHeader + * + * Returns: + * {?} - response header for given name + */ + getResponseHeader: function(name) { + return this.transport.getResponseHeader(name); + } +}); + + +/** + * Function: getElementsByTagNameNS + * + * Parameters: + * parentnode - {?} + * nsuri - {?} + * nsprefix - {?} + * tagname - {?} + * + * Returns: + * {?} + */ +OpenLayers.Ajax.getElementsByTagNameNS = function(parentnode, nsuri, + nsprefix, tagname) { + var elem = null; + if (parentnode.getElementsByTagNameNS) { + elem = parentnode.getElementsByTagNameNS(nsuri, tagname); + } else { + elem = parentnode.getElementsByTagName(nsprefix + ':' + tagname); + } + return elem; +}; + + +/** + * Function: serializeXMLToString + * Wrapper function around XMLSerializer, which doesn't exist/work in + * IE/Safari. We need to come up with a way to serialize in those browser: + * for now, these browsers will just fail. #535, #536 + * + * Parameters: + * xmldom {XMLNode} xml dom to serialize + * + * Returns: + * {?} + */ +OpenLayers.Ajax.serializeXMLToString = function(xmldom) { + var serializer = new XMLSerializer(); + var data = serializer.serializeToString(xmldom); + return data; +}; + +/** + * Namespace: OpenLayers.Element + */ +OpenLayers.Util.extend(OpenLayers.Element, { + + /** + * APIFunction: hide + * *Deprecated*. Hide element(s) passed in + * + * Parameters: + * element - {DOMElement} Actually user can pass any number of elements + */ + hide: function() { + OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated", { + newMethod: "element.style.display = 'none';" + })); + + for (var i=0, len=arguments.length; i + * instead!!! + * + * This class is DEPRECATED in 2.4 and will be removed by 3.0. + * If you need this functionality, use Control.Navigation instead!!! + * + * Inherits from: + * - + */ +OpenLayers.Control.MouseDefaults = OpenLayers.Class(OpenLayers.Control, { + + /** WARNING WARNING WARNING!!! + This class is DEPRECATED in 2.4 and will be removed by 3.0. + If you need this functionality, use Control.Navigation instead!!! */ + + /** + * Property: performedDrag + * {Boolean} + */ + performedDrag: false, + + /** + * Property: wheelObserver + * {Function} + */ + wheelObserver: null, + + /** + * Constructor: OpenLayers.Control.MouseDefaults + */ + initialize: function() { + OpenLayers.Control.prototype.initialize.apply(this, arguments); + }, + + /** + * APIMethod: destroy + */ + destroy: function() { + + if (this.handler) { + this.handler.destroy(); + } + this.handler = null; + + this.map.events.un({ + "click": this.defaultClick, + "dblclick": this.defaultDblClick, + "mousedown": this.defaultMouseDown, + "mouseup": this.defaultMouseUp, + "mousemove": this.defaultMouseMove, + "mouseout": this.defaultMouseOut, + scope: this + }); + + //unregister mousewheel events specifically on the window and document + OpenLayers.Event.stopObserving(window, "DOMMouseScroll", + this.wheelObserver); + OpenLayers.Event.stopObserving(window, "mousewheel", + this.wheelObserver); + OpenLayers.Event.stopObserving(document, "mousewheel", + this.wheelObserver); + this.wheelObserver = null; + + OpenLayers.Control.prototype.destroy.apply(this, arguments); + }, + + /** + * Method: draw + */ + draw: function() { + this.map.events.on({ + "click": this.defaultClick, + "dblclick": this.defaultDblClick, + "mousedown": this.defaultMouseDown, + "mouseup": this.defaultMouseUp, + "mousemove": this.defaultMouseMove, + "mouseout": this.defaultMouseOut, + scope: this + }); + + this.registerWheelEvents(); + + }, + + /** + * Method: registerWheelEvents + */ + registerWheelEvents: function() { + + this.wheelObserver = OpenLayers.Function.bindAsEventListener( + this.onWheelEvent, this + ); + + //register mousewheel events specifically on the window and document + OpenLayers.Event.observe(window, "DOMMouseScroll", this.wheelObserver); + OpenLayers.Event.observe(window, "mousewheel", this.wheelObserver); + OpenLayers.Event.observe(document, "mousewheel", this.wheelObserver); + }, + + /** + * Method: defaultClick + * + * Parameters: + * evt - {Event} + * + * Returns: + * {Boolean} + */ + defaultClick: function (evt) { + if (!OpenLayers.Event.isLeftClick(evt)) { + return; + } + var notAfterDrag = !this.performedDrag; + this.performedDrag = false; + return notAfterDrag; + }, + + /** + * Method: defaultDblClick + * + * Parameters: + * evt - {Event} + */ + defaultDblClick: function (evt) { + var newCenter = this.map.getLonLatFromViewPortPx( evt.xy ); + this.map.setCenter(newCenter, this.map.zoom + 1); + OpenLayers.Event.stop(evt); + return false; + }, + + /** + * Method: defaultMouseDown + * + * Parameters: + * evt - {Event} + */ + defaultMouseDown: function (evt) { + if (!OpenLayers.Event.isLeftClick(evt)) { + return; + } + this.mouseDragStart = evt.xy.clone(); + this.performedDrag = false; + if (evt.shiftKey) { + this.map.div.style.cursor = "crosshair"; + this.zoomBox = OpenLayers.Util.createDiv('zoomBox', + this.mouseDragStart, + null, + null, + "absolute", + "2px solid red"); + this.zoomBox.style.backgroundColor = "white"; + this.zoomBox.style.filter = "alpha(opacity=50)"; // IE + this.zoomBox.style.opacity = "0.50"; + this.zoomBox.style.fontSize = "1px"; + this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1; + this.map.eventsDiv.appendChild(this.zoomBox); + } + document.onselectstart = OpenLayers.Function.False; + OpenLayers.Event.stop(evt); + }, + + /** + * Method: defaultMouseMove + * + * Parameters: + * evt - {Event} + */ + defaultMouseMove: function (evt) { + // record the mouse position, used in onWheelEvent + this.mousePosition = evt.xy.clone(); + + if (this.mouseDragStart != null) { + if (this.zoomBox) { + var deltaX = Math.abs(this.mouseDragStart.x - evt.xy.x); + var deltaY = Math.abs(this.mouseDragStart.y - evt.xy.y); + this.zoomBox.style.width = Math.max(1, deltaX) + "px"; + this.zoomBox.style.height = Math.max(1, deltaY) + "px"; + if (evt.xy.x < this.mouseDragStart.x) { + this.zoomBox.style.left = evt.xy.x+"px"; + } + if (evt.xy.y < this.mouseDragStart.y) { + this.zoomBox.style.top = evt.xy.y+"px"; + } + } else { + var deltaX = this.mouseDragStart.x - evt.xy.x; + var deltaY = this.mouseDragStart.y - evt.xy.y; + var size = this.map.getSize(); + var newXY = new OpenLayers.Pixel(size.w / 2 + deltaX, + size.h / 2 + deltaY); + var newCenter = this.map.getLonLatFromViewPortPx( newXY ); + this.map.setCenter(newCenter, null, true); + this.mouseDragStart = evt.xy.clone(); + this.map.div.style.cursor = "move"; + } + this.performedDrag = true; + } + }, + + /** + * Method: defaultMouseUp + * + * Parameters: + * evt - {} + */ + defaultMouseUp: function (evt) { + if (!OpenLayers.Event.isLeftClick(evt)) { + return; + } + if (this.zoomBox) { + this.zoomBoxEnd(evt); + } else { + if (this.performedDrag) { + this.map.setCenter(this.map.center); + } + } + document.onselectstart=null; + this.mouseDragStart = null; + this.map.div.style.cursor = ""; + }, + + /** + * Method: defaultMouseOut + * + * Parameters: + * evt - {Event} + */ + defaultMouseOut: function (evt) { + if (this.mouseDragStart != null && + OpenLayers.Util.mouseLeft(evt, this.map.eventsDiv)) { + if (this.zoomBox) { + this.removeZoomBox(); + } + this.mouseDragStart = null; + } + }, + + + /** + * Method: defaultWheelUp + * User spun scroll wheel up + * + */ + defaultWheelUp: function(evt) { + if (this.map.getZoom() <= this.map.getNumZoomLevels()) { + this.map.setCenter(this.map.getLonLatFromPixel(evt.xy), + this.map.getZoom() + 1); + } + }, + + /** + * Method: defaultWheelDown + * User spun scroll wheel down + */ + defaultWheelDown: function(evt) { + if (this.map.getZoom() > 0) { + this.map.setCenter(this.map.getLonLatFromPixel(evt.xy), + this.map.getZoom() - 1); + } + }, + + /** + * Method: zoomBoxEnd + * Zoombox function. + */ + zoomBoxEnd: function(evt) { + if (this.mouseDragStart != null) { + if (Math.abs(this.mouseDragStart.x - evt.xy.x) > 5 || + Math.abs(this.mouseDragStart.y - evt.xy.y) > 5) { + var start = this.map.getLonLatFromViewPortPx( this.mouseDragStart ); + var end = this.map.getLonLatFromViewPortPx( evt.xy ); + var top = Math.max(start.lat, end.lat); + var bottom = Math.min(start.lat, end.lat); + var left = Math.min(start.lon, end.lon); + var right = Math.max(start.lon, end.lon); + var bounds = new OpenLayers.Bounds(left, bottom, right, top); + this.map.zoomToExtent(bounds); + } else { + var end = this.map.getLonLatFromViewPortPx( evt.xy ); + this.map.setCenter(new OpenLayers.LonLat( + (end.lon), + (end.lat) + ), this.map.getZoom() + 1); + } + this.removeZoomBox(); + } + }, + + /** + * Method: removeZoomBox + * Remove the zoombox from the screen and nullify our reference to it. + */ + removeZoomBox: function() { + this.map.eventsDiv.removeChild(this.zoomBox); + this.zoomBox = null; + }, + + +/** + * Mouse ScrollWheel code thanks to http://adomas.org/javascript-mouse-wheel/ + */ + + + /** + * Method: onWheelEvent + * Catch the wheel event and handle it xbrowserly + * + * Parameters: + * e - {Event} + */ + onWheelEvent: function(e){ + + // first determine whether or not the wheeling was inside the map + var inMap = false; + var elem = OpenLayers.Event.element(e); + while(elem != null) { + if (this.map && elem == this.map.div) { + inMap = true; + break; + } + elem = elem.parentNode; + } + + if (inMap) { + + var delta = 0; + if (!e) { + e = window.event; + } + if (e.wheelDelta) { + delta = e.wheelDelta/120; + if (window.opera && window.opera.version() < 9.2) { + delta = -delta; + } + } else if (e.detail) { + delta = -e.detail / 3; + } + if (delta) { + // add the mouse position to the event because mozilla has a bug + // with clientX and clientY (see https://bugzilla.mozilla.org/show_bug.cgi?id=352179) + // getLonLatFromViewPortPx(e) returns wrong values + e.xy = this.mousePosition; + + if (delta < 0) { + this.defaultWheelDown(e); + } else { + this.defaultWheelUp(e); + } + } + + //only wheel the map, not the window + OpenLayers.Event.stop(e); + } + }, + + CLASS_NAME: "OpenLayers.Control.MouseDefaults" +}); + +/** + * Class: OpenLayers.Control.MouseToolbar + * This class is DEPRECATED in 2.4 and will be removed by 3.0. + * If you need this functionality, use + * instead!!! + */ +OpenLayers.Control.MouseToolbar = OpenLayers.Class( + OpenLayers.Control.MouseDefaults, { + + /** + * Property: mode + */ + mode: null, + /** + * Property: buttons + */ + buttons: null, + + /** + * APIProperty: direction + * {String} 'vertical' or 'horizontal' + */ + direction: "vertical", + + /** + * Property: buttonClicked + * {String} + */ + buttonClicked: null, + + /** + * Constructor: OpenLayers.Control.MouseToolbar + * + * Parameters: + * position - {} + * direction - {String} + */ + initialize: function(position, direction) { + OpenLayers.Control.prototype.initialize.apply(this, arguments); + this.position = new OpenLayers.Pixel(OpenLayers.Control.MouseToolbar.X, + OpenLayers.Control.MouseToolbar.Y); + if (position) { + this.position = position; + } + if (direction) { + this.direction = direction; + } + this.measureDivs = []; + }, + + /** + * APIMethod: destroy + */ + destroy: function() { + for( var btnId in this.buttons) { + var btn = this.buttons[btnId]; + btn.map = null; + btn.events.destroy(); + } + OpenLayers.Control.MouseDefaults.prototype.destroy.apply(this, + arguments); + }, + + /** + * Method: draw + */ + draw: function() { + OpenLayers.Control.prototype.draw.apply(this, arguments); + OpenLayers.Control.MouseDefaults.prototype.draw.apply(this, arguments); + this.buttons = {}; + var sz = new OpenLayers.Size(28,28); + var centered = new OpenLayers.Pixel(OpenLayers.Control.MouseToolbar.X,0); + this._addButton("zoombox", "drag-rectangle-off.png", "drag-rectangle-on.png", centered, sz, "Shift->Drag to zoom to area"); + centered = centered.add((this.direction == "vertical" ? 0 : sz.w), (this.direction == "vertical" ? sz.h : 0)); + this._addButton("pan", "panning-hand-off.png", "panning-hand-on.png", centered, sz, "Drag the map to pan."); + centered = centered.add((this.direction == "vertical" ? 0 : sz.w), (this.direction == "vertical" ? sz.h : 0)); + this.switchModeTo("pan"); + + return this.div; + }, + + /** + * Method: _addButton + */ + _addButton:function(id, img, activeImg, xy, sz, title) { + var imgLocation = OpenLayers.Util.getImagesLocation() + img; + var activeImgLocation = OpenLayers.Util.getImagesLocation() + activeImg; + // var btn = new ol.AlphaImage("_"+id, imgLocation, xy, sz); + var btn = OpenLayers.Util.createAlphaImageDiv( + "OpenLayers_Control_MouseToolbar_" + id, + xy, sz, imgLocation, "absolute"); + + //we want to add the outer div + this.div.appendChild(btn); + btn.imgLocation = imgLocation; + btn.activeImgLocation = activeImgLocation; + + btn.events = new OpenLayers.Events(this, btn, null, true); + btn.events.on({ + "mousedown": this.buttonDown, + "mouseup": this.buttonUp, + "dblclick": OpenLayers.Event.stop, + scope: this + }); + btn.action = id; + btn.title = title; + btn.alt = title; + btn.map = this.map; + + //we want to remember/reference the outer div + this.buttons[id] = btn; + return btn; + }, + + /** + * Method: buttonDown + * + * Parameters: + * evt - {Event} + */ + buttonDown: function(evt) { + if (!OpenLayers.Event.isLeftClick(evt)) { + return; + } + this.buttonClicked = evt.element.action; + OpenLayers.Event.stop(evt); + }, + + /** + * Method: buttonUp + * + * Parameters: + * evt - {Event} + */ + buttonUp: function(evt) { + if (!OpenLayers.Event.isLeftClick(evt)) { + return; + } + if (this.buttonClicked != null) { + if (this.buttonClicked == evt.element.action) { + this.switchModeTo(evt.element.action); + } + OpenLayers.Event.stop(evt); + this.buttonClicked = null; + } + }, + + /** + * Method: defaultDblClick + * + * Parameters: + * evt - {Event} + */ + defaultDblClick: function (evt) { + this.switchModeTo("pan"); + this.performedDrag = false; + var newCenter = this.map.getLonLatFromViewPortPx( evt.xy ); + this.map.setCenter(newCenter, this.map.zoom + 1); + OpenLayers.Event.stop(evt); + return false; + }, + + /** + * Method: defaultMouseDown + * + * Parameters: + * evt - {Event} + */ + defaultMouseDown: function (evt) { + if (!OpenLayers.Event.isLeftClick(evt)) { + return; + } + this.mouseDragStart = evt.xy.clone(); + this.performedDrag = false; + this.startViaKeyboard = false; + if (evt.shiftKey && this.mode !="zoombox") { + this.switchModeTo("zoombox"); + this.startViaKeyboard = true; + } else if (evt.altKey && this.mode !="measure") { + this.switchModeTo("measure"); + } else if (!this.mode) { + this.switchModeTo("pan"); + } + + switch (this.mode) { + case "zoombox": + this.map.div.style.cursor = "crosshair"; + this.zoomBox = OpenLayers.Util.createDiv('zoomBox', + this.mouseDragStart, + null, + null, + "absolute", + "2px solid red"); + this.zoomBox.style.backgroundColor = "white"; + this.zoomBox.style.filter = "alpha(opacity=50)"; // IE + this.zoomBox.style.opacity = "0.50"; + this.zoomBox.style.fontSize = "1px"; + this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1; + this.map.eventsDiv.appendChild(this.zoomBox); + this.performedDrag = true; + break; + case "measure": + var distance = ""; + if (this.measureStart) { + var measureEnd = this.map.getLonLatFromViewPortPx(this.mouseDragStart); + distance = OpenLayers.Util.distVincenty(this.measureStart, measureEnd); + distance = Math.round(distance * 100) / 100; + distance = distance + "km"; + this.measureStartBox = this.measureBox; + } + this.measureStart = this.map.getLonLatFromViewPortPx(this.mouseDragStart);; + this.measureBox = OpenLayers.Util.createDiv(null, + this.mouseDragStart.add( + -2-parseInt(this.map.layerContainerDiv.style.left), + -2-parseInt(this.map.layerContainerDiv.style.top)), + null, + null, + "absolute"); + this.measureBox.style.width="4px"; + this.measureBox.style.height="4px"; + this.measureBox.style.fontSize = "1px"; + this.measureBox.style.backgroundColor="red"; + this.measureBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1; + this.map.layerContainerDiv.appendChild(this.measureBox); + if (distance) { + this.measureBoxDistance = OpenLayers.Util.createDiv(null, + this.mouseDragStart.add( + -2-parseInt(this.map.layerContainerDiv.style.left), + 2-parseInt(this.map.layerContainerDiv.style.top)), + null, + null, + "absolute"); + + this.measureBoxDistance.innerHTML = distance; + this.measureBoxDistance.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1; + this.map.layerContainerDiv.appendChild(this.measureBoxDistance); + this.measureDivs.push(this.measureBoxDistance); + } + this.measureBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1; + this.map.layerContainerDiv.appendChild(this.measureBox); + this.measureDivs.push(this.measureBox); + break; + default: + this.map.div.style.cursor = "move"; + break; + } + document.onselectstart = OpenLayers.Function.False; + OpenLayers.Event.stop(evt); + }, + + /** + * Method: switchModeTo + * + * Parameters: + * mode - {String} + */ + switchModeTo: function(mode) { + if (mode != this.mode) { + + + if (this.mode && this.buttons[this.mode]) { + OpenLayers.Util.modifyAlphaImageDiv(this.buttons[this.mode], null, null, null, this.buttons[this.mode].imgLocation); + } + if (this.mode == "measure" && mode != "measure") { + for(var i=0, len=this.measureDivs.length; i instead. + * + * Concatenate the value of all child nodes if any exist, or return an + * optional default string. Returns an empty string if no children + * exist and no default value is supplied. Not optimized for large + * numbers of child nodes. + * + * Parameters: + * node - {DOMElement} The element used to look for child values. + * def - {String} Optional string to return in the event that no + * child exist. + * + * Returns: + * {String} The concatenated value of all child nodes of the given node. + */ + concatChildValues: function(node, def) { + var value = ""; + var child = node.firstChild; + var childValue; + while(child) { + childValue = child.nodeValue; + if(childValue) { + value += childValue; + } + child = child.nextSibling; + } + if(value == "" && def != undefined) { + value = def; + } + return value; + } + +}); + +/** + * Class: OpenLayers.Layer.WMS.Post + * Instances of OpenLayers.Layer.WMS.Post are used to retrieve data from OGC + * Web Mapping Services via HTTP-POST (application/x-www-form-urlencoded). + * Create a new WMS layer with the constructor. + * + * *Deprecated*. Instead of this layer, use with + * configured in the layer's + * . + * + * Inherits from: + * - + */ +OpenLayers.Layer.WMS.Post = OpenLayers.Class(OpenLayers.Layer.WMS, { + + /** + * APIProperty: unsupportedBrowsers + * {Array} Array with browsers, which should use the HTTP-GET protocol + * instead of HTTP-POST for fetching tiles from a WMS . + * Defaults to ["mozilla", "firefox", "opera"], because Opera is not able + * to show transparent images in IFrames and Firefox/Mozilla has some ugly + * effects of viewport-shaking when panning the map. Both browsers, Opera + * and Firefox/Mozilla, have no problem with long urls, which is the reason + * for using POST instead of GET. The strings to pass to this array are + * the ones returned by . + */ + unsupportedBrowsers: ["mozilla", "firefox", "opera"], + + /** + * Property: SUPPORTED_TRANSITIONS + * {Array} + * no supported transitions for this type of layer, because it is not + * possible to modify the initialized tiles (iframes) + */ + SUPPORTED_TRANSITIONS: [], + + /** + * Property: usePost + * {Boolean} + */ + usePost: null, + + /** + * Constructor: OpenLayers.Layer.WMS.Post + * Creates a new WMS layer object. + * + * Example: + * (code) + * var wms = new OpenLayers.Layer.WMS.Post( + * "NASA Global Mosaic", + * "http://wms.jpl.nasa.gov/wms.cgi", + * {layers: "modis, global_mosaic"}); + * (end) + * + * Parameters: + * name - {String} A name for the layer + * url - {String} Base url for the WMS + * (e.g. http://wms.jpl.nasa.gov/wms.cgi) + * params - {Object} An object with key/value pairs representing the + * GetMap query string parameters and parameter values. + * options - {Object} Hashtable of extra options to tag onto the layer. + */ + initialize: function(name, url, params, options) { + var newArguments = []; + newArguments.push(name, url, params, options); + OpenLayers.Layer.WMS.prototype.initialize.apply(this, newArguments); + + this.usePost = OpenLayers.Util.indexOf( + this.unsupportedBrowsers, OpenLayers.BROWSER_NAME) == -1; + }, + + /** + * Method: addTile + * addTile creates a tile, initializes it and adds it as iframe to the + * layer div. + * + * Parameters: + * bounds - {} + * position - {} + * + * Returns: + * {} The added OpenLayers.Tile.Image.IFrame + */ + addTile: function(bounds,position) { + return new OpenLayers.Tile.Image( + this, position, bounds, null, this.tileSize, { + maxGetUrlLength: this.usePost ? 0 : null + }); + }, + + CLASS_NAME: 'OpenLayers.Layer.WMS.Post' +}); + +/** + * Class: OpenLayers.Layer.WMS.Untiled + * *Deprecated*. To be removed in 3.0. Instead use OpenLayers.Layer.WMS and + * pass the option 'singleTile' as true. + * + * Inherits from: + * - + */ +OpenLayers.Layer.WMS.Untiled = OpenLayers.Class(OpenLayers.Layer.WMS, { + + /** + * APIProperty: singleTile + * {singleTile} Always true for untiled. + */ + singleTile: true, + + /** + * Constructor: OpenLayers.Layer.WMS.Untiled + * + * Parameters: + * name - {String} + * url - {String} + * params - {Object} + * options - {Object} + */ + initialize: function(name, url, params, options) { + OpenLayers.Layer.WMS.prototype.initialize.apply(this, arguments); + + var msg = "The OpenLayers.Layer.WMS.Untiled class is deprecated and " + + "will be removed in 3.0. Instead, you should use the " + + "normal OpenLayers.Layer.WMS class, passing it the option " + + "'singleTile' as true."; + OpenLayers.Console.warn(msg); + }, + + /** + * Method: clone + * Create a clone of this layer + * + * Returns: + * {} An exact clone of this layer + */ + clone: function (obj) { + + if (obj == null) { + obj = new OpenLayers.Layer.WMS.Untiled(this.name, + this.url, + this.params, + this.getOptions()); + } + + //get all additions from superclasses + obj = OpenLayers.Layer.WMS.prototype.clone.apply(this, [obj]); + + // copy/set any non-init, non-simple values here + + return obj; + }, + + CLASS_NAME: "OpenLayers.Layer.WMS.Untiled" +}); + +/** + * Class: OpenLayers.Layer.MapServer.Untiled + * *Deprecated*. To be removed in 3.0. Instead use OpenLayers.Layer.MapServer + * and pass the option 'singleTile' as true. + * + * Inherits from: + * - + */ +OpenLayers.Layer.MapServer.Untiled = OpenLayers.Class(OpenLayers.Layer.MapServer, { + + /** + * APIProperty: singleTile + * {singleTile} Always true for untiled. + */ + singleTile: true, + + /** + * Constructor: OpenLayers.Layer.MapServer.Untiled + * + * Parameters: + * name - {String} + * url - {String} + * params - {Object} + * options - {Object} + */ + initialize: function(name, url, params, options) { + OpenLayers.Layer.MapServer.prototype.initialize.apply(this, arguments); + + var msg = "The OpenLayers.Layer.MapServer.Untiled class is deprecated and " + + "will be removed in 3.0. Instead, you should use the " + + "normal OpenLayers.Layer.MapServer class, passing it the option " + + "'singleTile' as true."; + OpenLayers.Console.warn(msg); + }, + + /** + * Method: clone + * Create a clone of this layer + * + * Returns: + * {} An exact clone of this layer + */ + clone: function (obj) { + + if (obj == null) { + obj = new OpenLayers.Layer.MapServer.Untiled(this.name, + this.url, + this.params, + this.getOptions()); + } + + //get all additions from superclasses + obj = OpenLayers.Layer.MapServer.prototype.clone.apply(this, [obj]); + + // copy/set any non-init, non-simple values here + + return obj; + }, + + CLASS_NAME: "OpenLayers.Layer.MapServer.Untiled" +}); diff --git a/tests/BaseTypes/Class.html b/tests/BaseTypes/Class.html index 2079ce6d5f..0aa2d93a01 100644 --- a/tests/BaseTypes/Class.html +++ b/tests/BaseTypes/Class.html @@ -2,8 +2,6 @@ diff --git a/tests/Layer/WMS.html b/tests/Layer/WMS.html index 27d69a57bc..377925926a 100644 --- a/tests/Layer/WMS.html +++ b/tests/Layer/WMS.html @@ -445,19 +445,6 @@ } - - - // DEPRECATED -- REMOVE IN 3.0 - function test_Layer_Untiled_WMS(t) { - t.plan(1); - - var layer = new OpenLayers.Layer.WMS.Untiled(); - - var clone = layer.clone(); - - t.ok(clone.singleTile, "regression test: clone works. this is for #1013"); - } - function test_Layer_WMS_destroy (t) { t.plan( 1 ); diff --git a/tests/Ajax.html b/tests/deprecated/Ajax.html similarity index 90% rename from tests/Ajax.html rename to tests/deprecated/Ajax.html index 53142a2dcb..e73e80c625 100644 --- a/tests/Ajax.html +++ b/tests/deprecated/Ajax.html @@ -1,6 +1,7 @@ - + + + + + + + + diff --git a/tests/deprecated/BaseTypes/Element.html b/tests/deprecated/BaseTypes/Element.html new file mode 100644 index 0000000000..bd7e074a6a --- /dev/null +++ b/tests/deprecated/BaseTypes/Element.html @@ -0,0 +1,56 @@ + + + + + + + + +
test
+ + + \ No newline at end of file diff --git a/tests/Control/MouseToolbar.html b/tests/deprecated/Control/MouseToolbar.html similarity index 96% rename from tests/Control/MouseToolbar.html rename to tests/deprecated/Control/MouseToolbar.html index 97baa4ad7f..f66a18b672 100644 --- a/tests/Control/MouseToolbar.html +++ b/tests/deprecated/Control/MouseToolbar.html @@ -1,6 +1,7 @@ - + + + + + + +
+ + diff --git a/tests/Layer/WMS/Post.html b/tests/deprecated/Layer/WMS/Post.html similarity index 96% rename from tests/Layer/WMS/Post.html rename to tests/deprecated/Layer/WMS/Post.html index bf5148034f..d79aec5ab5 100644 --- a/tests/Layer/WMS/Post.html +++ b/tests/deprecated/Layer/WMS/Post.html @@ -1,6 +1,7 @@ - + +