[OpenLayers-Trac] [OpenLayers] #3597: OpenLayers.Layer.WMS options
- id field
OpenLayers
trac-20090302 at openlayers.org
Mon Dec 12 11:27:26 EST 2011
#3597: OpenLayers.Layer.WMS options - id field
-----------------------+----------------------------------------------------
Reporter: fvigetti | Owner: euzuro
Type: bug | Status: new
Priority: blocker | Milestone: 2.11 Release
Component: Layer.WMS | Version: 2.11
Keywords: options | State: Commit
-----------------------+----------------------------------------------------
I need to use the id field of the options object when I add a layer, to
easily retrive the layer object through the API getLayer, but I verified
with Firebug that this id is not effectively stored anywhere. The test of
this is that when I call getLayer using this id, I receive a null object.
Similarly to this, when I use OpenLayers.Layer.WMS.Post to add a layer,
setting the id field in the options object gives me in runtime the
following error:
Uncaught TypeError: Cannot call method 'addEventType' of null
OpenLayers.Layer.Grid.OpenLayers.Class.initializeOpenLayers.js:1059
OpenLayers.Layer.WMS.OpenLayers.Class.initializeOpenLayers.js:1583
OpenLayers.Layer.WMS.Post.OpenLayers.Class.initializeOpenLayers.js:2689
addLayerfao-widgets-map-js-0.1.js:185
initMapindex.html:32
dispatchEventfao-commons-0.1.js:46
loadfao-widgets-map-js-0.1.js:76
initindex.html:21
(anonymous function)index.html:71
onload
Could you please give me some clarifications for this behaviour? And if I
do something wrong?
Thanks in advance
Francesca
--
Ticket URL: <http://trac.openlayers.org/ticket/3597>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list