<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Stephen Irons</b> <<a href="mailto:stephen.irons@gmail.com">stephen.irons@gmail.com</a>><br>Date: 2008/7/3<br>
Subject: Cannot set ID of a control<br>To: <a href="mailto:dev@openlayers.org">dev@openlayers.org</a><br><br><br>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.<br>
<br>This did not work: the mouse position control ignored the 'id' attribute.<br><br>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.<br>
<br>I think that the line of code<br><br><a href="http://this.id" target="_blank">this.id</a> = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_");<br><br>should be moved to before<br><br>OpenLayers.Util.extend(this, options);<br>
<br><br>This applies to the 2.6 stable release as well as svn7462<br><font color="#888888"><br>Stephen Irons<br>
</font></div><br>