#823 New class style. Instead of OldStyle = Class.create(); OldStyle.prototype = Class.inherit(Parent, prototype), we now use NewStyle = OpenLayers.Class(Parent, prototype). New style classes allow for backwards compatibility [you can use OldStyle = Class.create(); Class.inherit(NewStyle, prototype)]. The Class.create and Class.inherit functions are deprecated. Backwards compatibility will be removed at 3.0. Thanks Erik for the careful review.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@3767 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -15,18 +15,7 @@
|
||||
* it's necessary to add controls (<OpenLayers.Control>) and
|
||||
* layers (<OpenLayers.Layer>) to the map.
|
||||
*/
|
||||
OpenLayers.Map = OpenLayers.Class.create();
|
||||
/**
|
||||
* Constant: TILE_WIDTH
|
||||
* {Integer} 256 Default tile width (unless otherwise specified)
|
||||
*/
|
||||
OpenLayers.Map.TILE_WIDTH = 256;
|
||||
/**
|
||||
* Constant: TILE_HEIGHT
|
||||
* {Integer} 256 Default tile height (unless otherwise specified)
|
||||
*/
|
||||
OpenLayers.Map.TILE_HEIGHT = 256;
|
||||
OpenLayers.Map.prototype = {
|
||||
OpenLayers.Map = OpenLayers.Class({
|
||||
|
||||
/**
|
||||
* Constant: Z_INDEX_BASE
|
||||
@@ -1625,4 +1614,15 @@ OpenLayers.Map.prototype = {
|
||||
|
||||
/** @final @type String */
|
||||
CLASS_NAME: "OpenLayers.Map"
|
||||
};
|
||||
});
|
||||
|
||||
/**
|
||||
* Constant: TILE_WIDTH
|
||||
* {Integer} 256 Default tile width (unless otherwise specified)
|
||||
*/
|
||||
OpenLayers.Map.TILE_WIDTH = 256;
|
||||
/**
|
||||
* Constant: TILE_HEIGHT
|
||||
* {Integer} 256 Default tile height (unless otherwise specified)
|
||||
*/
|
||||
OpenLayers.Map.TILE_HEIGHT = 256;
|
||||
|
||||
Reference in New Issue
Block a user