Hi Jachym,
If you extend the Map object, you could create your own event or do
whatever you want in the addControl method directly:
MyMap = OpenLayers.Class(OpenLayers.Map, {
addControl: function(control, px) {
OpenLayers.Map.prototype.addControl.apply(this, arguments);
// do whatever you want here
// you could trigger a custom event, for example
}
});
and use :
var map = new MyMap(/* your config*/);
HTH,
Alexandre
On 13-05-23 09:34 AM, Jachym Cepicky wrote:
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
_______________________________________________
Dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-dev
--
Alexandre Dubé
Mapgears
www.mapgears.com
_______________________________________________
Dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-dev