steven at minst.net
Wed Jun 22 06:25:59 EDT 2011
To complicate things further when the addLayer event is fired, the layer is not yet in mapquery.layers() and as such cannot be found.
On Jun 22, 2011, at 11:58 AM, Steven Ottens wrote:
> Hi all,
> We decided that we don't need getLayerById since to know the layer.id you need the layer object to start with. A wise choice, however now I have a new issue. The 'AddLayer' event from OpenLayers returns a OpenLayers Layer object. There is currently no easy way to get the corresponding MapQuery layer. For the LayerManager, which should add a layer to the manager after a layer has been added, I need to get the layer object.
> I could write a function to get layer by OpenLayers ID. Would it make sense to add this function to core? Or should the addlayer event somehow return the mapquery layer.
> MapQuery mailing list
> MapQuery at lists.osgeo.org
More information about the MapQuery