[OpenLayers-Dev] Cannot set ID of a control

Erik Uzureau euzuro at gmail.com
Thu Aug 21 18:37:14 EDT 2008


Hi Stephen. I have made a ticket and patch for this issue.
It is here:

http://trac.openlayers.org/ticket/1687

If approved, it will be in the OpenLayers 2.7 release.

Thanks for the heads up on this.
Erik

2008/7/2 Stephen Irons <stephen.irons at clear.net.nz>:
>
>
> ---------- Forwarded message ----------
> From: Stephen Irons <stephen.irons at gmail.com>
> Date: 2008/7/3
> Subject: Cannot set ID of a control
> To: dev at openlayers.org
>
>
> I want to have two mouse position controls on a map (for two different
> coordinate systems), but by default they appear on top of each other. I
> thought I would specify an ID for each control then, in the stylesheet, I
> could position them independantly.
>
> This did not work: the mouse position control ignored the 'id' attribute.
>
> In OpenLayers/Control.js, around lines 170--180, the id is set as the last
> thing in init() function -- after applying the options passed in by the
> caller.
>
> I think that the line of code
>
> this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_");
>
> should be moved to before
>
> OpenLayers.Util.extend(this, options);
>
>
> This applies to the 2.6 stable release as well as svn7462
>
> Stephen Irons
>
>
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
>
>



More information about the Dev mailing list