<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Jachym,<br>
<br>
If you extend the Map object, you could create your own event or
do whatever you want in the addControl method directly:<br>
<br>
MyMap = OpenLayers.Class(OpenLayers.Map, {<br>
addControl: function(control, px) {<br>
OpenLayers.Map.prototype.addControl.apply(this,
arguments);<br>
<br>
// do whatever you want here<br>
// you could trigger a custom event, for example <br>
}<br>
});<br>
<br>
and use :<br>
<br>
var map = new MyMap(/* your config*/);<br>
<br>
HTH,<br>
<br>
Alexandre<br>
<br>
<br>
On 13-05-23 09:34 AM, Jachym Cepicky wrote:<br>
</div>
<blockquote cite="mid:519E1AEA.9000004@gmail.com" type="cite">
<pre wrap="">Hi,
looking at the documentation and into Map.js, it seems, there is
'addcontrol' event fired, when new OL.Control arrives to map.
I know, it's little bit late for the next release, but it might be nice
feature to have, relatively fast to implement - any idea?
Jachym
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Dev@lists.osgeo.org">Dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/openlayers-dev">http://lists.osgeo.org/mailman/listinfo/openlayers-dev</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Alexandre Dubé
Mapgears
<a class="moz-txt-link-abbreviated" href="http://www.mapgears.com">www.mapgears.com</a>
</pre>
</body>
</html>