hi,<br><br>I am trying to create a new control called parallelLine.<br><br>When I activate the control I get this error in Openlayers.js line 276<br><br>this.events has no properties<br>[Break on this error] this.active=true;this.events.triggerEvent(&quot;activate&quot;);return true;},deactivate:f...<br>
<br>What am I missing? do I need to create an events variable? Isn&#39;t it expanded from control class?<br><br><br>This is part of the code of my control (created based on ModifyFeature).<br><br>OpenLayers.Control.ParallelLine = OpenLayers.Class(OpenLayers.Control, {<br>
<br>    geometryTypes: null,<br>    clickout: true,<br>    toggle: true,<br>    layer: null,<br>    feature: null,<br>    selectControl: null,<br>    handlers: null,<br>    <br>    initialize: function(layer, options) {<br>
        this.layer = layer;<br>        var control = this;<br><br>        // configure the select control<br>        var selectOptions = {<br>            geometryTypes: this.geometryTypes,<br>            multiple: false,<br>
            hover: true,<br>            clickout: this.clickout,<br>            toggle: this.toggle<br>        };<br><br><br>        this.selectControl = new OpenLayers.Control.SelectFeature(<br>            layer, selectOptions<br>
        );<br>        this.layer.events.on({<br>            &quot;beforefeatureselected&quot;: this.beforeSelectFeature,<br>            &quot;featureselected&quot;: this.selectFeature,<br>            &quot;featureunselected&quot;: this.unselectFeature,<br>
            scope: this<br>        });<br><br>        // Regiter the events (sigte)<br>        this.layer.events.register(&quot;mousemove&quot;, this, this.mmove );<br>        this.layer.events.register(&quot;mousedown&quot;, this, this.mdown );<br>
<br><br>        // configure the keyboard handler<br>        var keyboardOptions = {<br>            keydown: this.handleKeypress<br>        };<br>        this.handlers = {<br>            keyboard: new OpenLayers.Handler.Keyboard(this, keyboardOptions)<br>
        };<br><br>    }<br><br>....<br>