renaming getLayersByType and getControlsByType to getLayersByClass and getControlsByClass - since controls have a type property, we want to leave room for a real getControlsByType - thanks for the review elem (closes #1153).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5387 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -527,11 +527,11 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
},
|
||||
|
||||
/**
|
||||
* APIMethod: getLayersByType
|
||||
* Get a list of layers of a given type (CLASS_NAME).
|
||||
* APIMethod: getLayersByClass
|
||||
* Get a list of layers of a given class (CLASS_NAME).
|
||||
*
|
||||
* Parameter:
|
||||
* match - {String | Object} A layer class name. The type can also be a
|
||||
* match - {String | Object} A layer class name. The match can also be a
|
||||
* regular expression literal or object. In addition, it can be any
|
||||
* object with a method named test. For reqular expressions or other,
|
||||
* if type.test(layer.CLASS_NAME) evaluates to true, the layer will
|
||||
@@ -539,10 +539,10 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
* found, an empty array is returned.
|
||||
*
|
||||
* Returns:
|
||||
* {Array(<OpenLayers.Layer>)} A list of layers matching the given type.
|
||||
* {Array(<OpenLayers.Layer>)} A list of layers matching the given class.
|
||||
* An empty array is returned if no matches are found.
|
||||
*/
|
||||
getLayersByType: function(match) {
|
||||
getLayersByClass: function(match) {
|
||||
return this.getLayersBy("CLASS_NAME", match);
|
||||
},
|
||||
|
||||
@@ -568,11 +568,11 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
},
|
||||
|
||||
/**
|
||||
* APIMethod: getControlsByType
|
||||
* Get a list of controls of a given type (CLASS_NAME).
|
||||
* APIMethod: getControlsByClass
|
||||
* Get a list of controls of a given class (CLASS_NAME).
|
||||
*
|
||||
* Parameter:
|
||||
* match - {String | Object} A control class name. The type can also be a
|
||||
* match - {String | Object} A control class name. The match can also be a
|
||||
* regular expression literal or object. In addition, it can be any
|
||||
* object with a method named test. For reqular expressions or other,
|
||||
* if type.test(control.CLASS_NAME) evaluates to true, the control will
|
||||
@@ -580,10 +580,10 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
* found, an empty array is returned.
|
||||
*
|
||||
* Returns:
|
||||
* {Array(<OpenLayers.Control>)} A list of controls matching the given type.
|
||||
* {Array(<OpenLayers.Control>)} A list of controls matching the given class.
|
||||
* An empty array is returned if no matches are found.
|
||||
*/
|
||||
getControlsByType: function(match) {
|
||||
getControlsByClass: function(match) {
|
||||
return this.getControlsBy("CLASS_NAME", match);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user