Method: addControlToMap

Parameters:

control - {<OpenLayers.Control>}
px - {<OpenLayers.Pixel>}
170032
function (control, px) {
        // If a control doesn't have a div at this point, it belongs in the
        // viewport.
        control.outsideViewport = (control.div != null);
        
        // If the map has a displayProjection, and the control doesn't, set 
        // the display projection.
        if (this.displayProjection && !control.displayProjection) {
            control.displayProjection = this.displayProjection;
        }    
        
        control.setMap(this);
        var div = control.draw(px);
        if (div) {
            if(!control.outsideViewport) {
                div.style.zIndex = this.Z_INDEX_BASE['Control'] +
                                    this.controls.length;
                this.viewPortDiv.appendChild( div );
            }
        }
        if(control.autoActivate) {
            control.activate();
        }
    }
172743
function(map) {
        this.dragControl.setMap(map);
        OpenLayers.Control.prototype.setMap.apply(this, arguments);
    }
1084772
public function render(CustomControl $customControl, Map $map)
    {
        $formatter = $this->getFormatter();

        return $formatter->renderObjectCall(
            $map,
            $formatter->renderProperty(
                'controls['.$this->controlPositionRenderer->render($customControl->getPosition()).']',
                'push'
            ),
            [$formatter->renderCall('('.$formatter->renderClosure($customControl->getControl()).')')]
        );
    }
877443
public int add( float srcX , float srcY , float dstX , float dstY )
	{
		int which = addControl(srcX,srcY);
		setUndistorted(which,dstX,dstY);
		return which;
	}
1346477
function() {
        OpenLayers.Control.prototype.draw.apply(this, arguments);
        if (this.layers.length === 0) {
            if (this.map.baseLayer) {
                var layer = this.map.baseLayer.clone();
                this.layers = [layer];
            } else {
                this.map.events.register("changebaselayer", this, this.baseLayerDraw);
                return this.div;
            }
        }

        // create overview map DOM elements
        this.element = document.createElement('div');
        this.element.className = this.displayClass + 'Element';
        this.element.style.display = 'none';

        this.mapDiv = document.createElement('div');
        this.mapDiv.style.width = this.size.w + 'px';
        this.mapDiv.style.height = this.size.h + 'px';
        this.mapDiv.style.position = 'relative';
        this.mapDiv.style.overflow = 'hidden';
        this.mapDiv.id = OpenLayers.Util.createUniqueID('overviewMap');
        
        this.extentRectangle = document.createElement('div');
        this.extentRectangle.style.position = 'absolute';
        this.extentRectangle.style.zIndex = 1000;  //HACK
        this.extentRectangle.className = this.displayClass+'ExtentRectangle';

        this.element.appendChild(this.mapDiv);  

        this.div.appendChild(this.element);

        // Optionally add min/max buttons if the control will go in the
        // map viewport.
        if(!this.outsideViewport) {
            this.div.className += " " + this.displayClass + 'Container';
            // maximize button div
            var img = OpenLayers.Util.getImageLocation('layer-switcher-maximize.png');
            this.maximizeDiv = OpenLayers.Util.createAlphaImageDiv(
                                        this.displayClass + 'MaximizeButton', 
                                        null, 
                                        null, 
                                        img, 
                                        'absolute');
            this.maximizeDiv.style.display = 'none';
            this.maximizeDiv.className = this.displayClass + 'MaximizeButton olButton';
            if (this.maximizeTitle) {
                this.maximizeDiv.title = this.maximizeTitle;
            }
            this.div.appendChild(this.maximizeDiv);
    
            // minimize button div
            var img = OpenLayers.Util.getImageLocation('layer-switcher-minimize.png');
            this.minimizeDiv = OpenLayers.Util.createAlphaImageDiv(
                                        'OpenLayers_Control_minimizeDiv', 
                                        null, 
                                        null, 
                                        img, 
                                        'absolute');
            this.minimizeDiv.style.display = 'none';
            this.minimizeDiv.className = this.displayClass + 'MinimizeButton olButton';
            if (this.minimizeTitle) {
                this.minimizeDiv.title = this.minimizeTitle;
            }
            this.div.appendChild(this.minimizeDiv);            
            this.minimizeControl();
        } else {
            // show the overview map
            this.element.style.display = '';
        }
        if(this.map.getExtent()) {
            this.update();
        }
        
        this.map.events.on({
            buttonclick: this.onButtonClick,
            moveend: this.update,
            scope: this
        });
        
        if (this.maximized) {
            this.maximizeControl();
        }
        return this.div;
    }
893624
function(oControl) {
				var sTemp = HTMLViewRenderer._getHTML(rm, oControl, sHTML);
				if (sTemp) {
					sHTML = sTemp;
				} else {
					aDeferred.push(oControl);
				}
			}
256002
public void addScreenControls(Container parent)
    {
        GridBagConstraints c = this.getGBConstraints();
        c.weightx = 1.0;                        // Grow edit and scroll pane but not label
        c.anchor = GridBagConstraints.NORTHWEST;    // Edit boxes left justified
        c.gridx = 1;                            // Column 1
        c.gridy = GridBagConstraints.RELATIVE;  // Bump Row each time
        c.gridwidth = 3; // end column
        for (int iIndex = 0; ; iIndex++)
        {
            Converter converter = this.getFieldForScreen(iIndex);
            if (converter == SKIP_THIS_FIELD)
                continue;
            if (converter == null)
                break;
            this.addScreenControl(parent, converter);
        }
    }
1271787
function(map) {
        OpenLayers.Control.prototype.setMap.apply(this, arguments);
        this.map.events.register("buttonclick", this, this.onButtonClick);
    }
867398
function(element, options) {
        OpenLayers.Control.prototype.initialize.apply(this, [options]);
        this.element = OpenLayers.Util.getElement(element);        
    }
651495
function (oControl) {

			while (oControl && !(oControl instanceof sap.uxap.ObjectPageLayout)) {
				oControl = oControl.getParent();
			}

			return oControl;
		}
788066
function(map) {
        OpenLayers.Control.prototype.setMap.apply(this, arguments);

        this.map.events.on({
            addlayer: this.redraw,
            changelayer: this.redraw,
            removelayer: this.redraw,
            changebaselayer: this.redraw,
            scope: this
        });
        if (this.outsideViewport) {
            this.events.attachToElement(this.div);
            this.events.register("buttonclick", this, this.onButtonClick);
        } else {
            this.map.events.register("buttonclick", this, this.onButtonClick);
        }
    }
397420
function() {
        OpenLayers.Control.prototype.draw.apply(this, arguments);
        if (!this.gratLayer) {
            var gratStyle = new OpenLayers.Style({},{
                rules: [new OpenLayers.Rule({'symbolizer':
                    {"Point":this.labelSymbolizer,
                     "Line":this.lineSymbolizer}
                })]
            });
            this.gratLayer = new OpenLayers.Layer.Vector(this.layerName, {
                styleMap: new OpenLayers.StyleMap({'default':gratStyle}),
                visibility: this.visible,
                displayInLayerSwitcher: this.displayInLayerSwitcher
            });
        }
        return this.div;
    }
879728
def add_control_point(cp)
      raise ArgumentError, "Invalid argument 'cp'. Expected ControlPoint, got #{cp.class}." unless cp.is_a?(ControlPoint)
      @control_points << cp unless @associated_control_points[cp]
      @associated_control_points[cp] = true
    end
804603
function(pixel) {
                if(this.feature === control.feature) {
                    this.feature = control.box;
                }
                OpenLayers.Control.DragFeature.prototype.moveFeature.apply(this,
                    arguments);
            }
840125
public void setControlPoints(List<Vertex> controlPoints)
	{
		this.controlPoints = controlPoints != null ? controlPoints : new ArrayList<>();
		dirty = true;
	}
642454
function (width, height, canvas) {
            // XXX This should probably be a configurable option
            var match;
            match = this._pxregex.exec(height);
            if (match) {
                this.pixelHeight = match[1];
            } else {
                this.pixelHeight = $(canvas).height();
            }
            match = this._pxregex.exec(width);
            if (match) {
                this.pixelWidth = match[1];
            } else {
                this.pixelWidth = $(canvas).width();
            }
        }
992180
function ( Map ) {
				_Map = Map;
				
				var MainDiv = L.DomUtil.create ( 'div', 'PinControl-MainDiv' );
				MainDiv.id = 'PinControl-MainDiv';
				var PinsDiv;
				
				if ( _ButtonsOnTop ){
					_createButtonsDiv ( MainDiv, 0 === _Pins.length );
					PinsDiv = _createPinsDiv ( MainDiv );
				}
				else{
					PinsDiv = _createPinsDiv ( MainDiv );
					_createButtonsDiv ( MainDiv, 0 === _Pins.length );
				}

				if ( 0 === _Pins.length  ) {
					PinsDiv.setAttribute("style", "visibility : hidden; width: 0; min-width: 0; height: 0; margin: 0.5em;" );
					PinsDiv.dataset.minimized = 'yes';
				}
				
				return MainDiv;
			}