<div dir="ltr">A Control.Panel is a control that wraps other controls. So for each control that you add to a panel, you will get a div in the panel in addition to the control's own div. Not saying that this makes sense, just saying that's the way it is.<div>
<br></div><div>Andreas.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jul 15, 2013 at 2:15 PM, maven apache <span dir="ltr"><<a href="mailto:apachemaven0@gmail.com" target="_blank">apachemaven0@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">But why the PanZoomBarControl does not generate the codes?</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra">
<br><br><div class="gmail_quote">2013/7/15 Andreas Hocevar <span dir="ltr"><<a href="mailto:ahocevar@opengeo.org" target="_blank">ahocevar@opengeo.org</a>></span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">This is a known oddity of OpenLayers 2. The reason is that controls are designed to have a UI, and what you're seeing is the UI container. It is created even if it is not used.<div>


<br></div><div>Andreas.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Mon, Jul 15, 2013 at 2:38 AM, maven apache <span dir="ltr"><<a href="mailto:apachemaven0@gmail.com" target="_blank">apachemaven0@gmail.com</a>></span> wrote:<br>



</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hi:<div><br></div><div>I am using OpenLayers 2.13, and I create a simple map with just one PanControl, however I found that the generated html tags contains some unused codes.</div>



<div><br></div><div>This is the codes:</div>

<div><br></div><div><div><span style="white-space:pre-wrap">              </span>this.map = new OpenLayers.Map(container, {</div><div><span style="white-space:pre-wrap">                       </span>"projection" : "EPSG:4490",</div>





<div><span style="white-space:pre-wrap">                  </span>"controls" : []</div><div><span style="white-space:pre-wrap">                </span>});</div><div><br></div><div><span style="white-space:pre-wrap">             </span>this.controls = {};</div>





<div><span style="white-space:pre-wrap">          </span>this.controls.drag = new OpenLayers.Control.Navigation({</div><div><span style="white-space:pre-wrap">                 </span>"dragPanOptions" : {</div><div><span style="white-space:pre-wrap">                           </span>"enableKinetic" : true</div>





<div><span style="white-space:pre-wrap">                  </span>}</div><div><span style="white-space:pre-wrap">                </span>});</div><div><span style="white-space:pre-wrap">              </span>this.controls.p = new OpenLayers.Control.PanPanel({});</div>





<div><span style="white-space:pre-wrap">          </span>var cons = [ this.controls.drag, this.controls.p ];</div><div><span style="white-space:pre-wrap">              </span>this.map.addControls(cons);</div></div><div><br></div><div>

And this is <a href="http://snag.gy/FkGE2.jpg" target="_blank">generated tags</a>.</div><div><br></div><div>Note the tags inside the red rectangle, it seems that these tags are unused.</div><div><br></div><div>Do I miss anything?</div>



<div>

<br></div><div><br></div></div>
<br></div></div>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org" target="_blank">Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
<br></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br>Andreas Hocevar<br>OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org/</a><br>Expert service straight from the developers.<br>



</font></span></div>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Andreas Hocevar<br>OpenGeo - <a href="http://opengeo.org/">http://opengeo.org/</a><br>Expert service straight from the developers.<br>
</div>