additional patch for #742 - removeControl() now takes the control as argument, not the id
git-svn-id: http://svn.openlayers.org/trunk/openlayers@3329 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -621,11 +621,11 @@ OpenLayers.Map.prototype = {
|
||||
* object's internal array of controls, as well as from the map's
|
||||
* viewPort (assuming the control was not added outsideViewport)
|
||||
*
|
||||
* @param {String} id ID of the control to remove
|
||||
* @param {OpenLayers.Control} control control to remove
|
||||
*/
|
||||
removeControl: function (id) {
|
||||
var control = this.getControl(id);
|
||||
if (control) {
|
||||
removeControl: function (control) {
|
||||
//make sure control is non-null and actually part of our map
|
||||
if ( (control) && (control == this.getControl(control.id)) ) {
|
||||
if (!control.outsideViewport) {
|
||||
this.viewPortDiv.removeChild(control.div)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user