<div>That would be fine if I was only drawing one box.&nbsp; My problem is I need to draw hundreds of them and they don&#39;t appear at the right location.&nbsp; Their height is off.&nbsp; The width appears to be fine but the height is not offset.&nbsp; I still think there is a bug here.&nbsp; I provided a very simple example.&nbsp; If the box is the same bounds as the viewport then why isn&#39;t the box the same size?&nbsp; It appears to have a problem with the sizing.
</div>
<div>&nbsp;</div>
<div>Linda Rawson<br><br>&nbsp;</div>
<div><span class="gmail_quote">On 9/27/07, <b class="gmail_sendername">Brent Pedersen</b> &lt;<a href="mailto:bpederse@gmail.com">bpederse@gmail.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">probably something like:<br>var box = new OpenLayers.Marker.Box(map.getExtent());<br>since your map may not be able to display the exact bounds you request
<br>given set resolutions/scales.<br><br><br>On 9/27/07, Linda Rawson &lt;<a href="mailto:linda.rawson@gmail.com">linda.rawson@gmail.com</a>&gt; wrote:<br>&gt;<br>&gt;<br>&gt; I switch the example.<br>&gt;<br>&gt; var boxes = new 
OpenLayers.Layer.Boxes(&quot;Images&quot;);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; var bounds = new OpenLayers.Bounds(-96.0051889, 28.9812486, -95.9925747,<br>&gt; 28.9917903 );<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;var box = new OpenLayers.Marker.Box(bounds);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;box.setBorder
 (&quot;yellow&quot;,4);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;boxes.addMarker(box);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;map.addLayer(boxes);<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;map.zoomToExtent(bounds);<br>&gt;<br>&gt; But then I get a yellow box in the middle of the map.&nbsp;&nbsp;I want a box the SAME
<br>&gt; size as the viewport I am looking at.&nbsp;&nbsp;How do I do that?<br>&gt; Linda Rawson<br>&gt;<br>&gt;<br>&gt;<br>&gt; On 9/27/07, Brent Pedersen &lt;<a href="mailto:bpederse@gmail.com">bpederse@gmail.com</a>&gt; wrote:<br>
&gt; &gt; &gt; var bounds = new OpenLayers.Bounds(-96.0051889, 28.9917903,<br>&gt; -95.9925747,&nbsp;&nbsp;28.9812486);<br>&gt; &gt;<br>&gt; &gt; hi, it looks like your ymin and ymax are switched.<br>&gt; &gt; -brent<br>&gt; &gt;<br>
&gt; &gt;<br>&gt; &gt; On 9/27/07, Linda Rawson &lt;<a href="mailto:linda.rawson@gmail.com">linda.rawson@gmail.com</a>&gt; wrote:<br>&gt; &gt; &gt; I have the following code:<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;
<br>&gt; &gt; &gt; &lt;html xmlns=&quot; <a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>&quot;&gt;<br>&gt; &gt; &gt;&nbsp;&nbsp; &lt;head&gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;style type=&quot;text/css&quot;&gt;<br>
&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #map {<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; width: 600px;<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height: 600px;<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; border: 1px solid black;<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/style&gt;
<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;script src=&quot;../lib/OpenLayers.js&quot;&gt;&lt;/script&gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;script type=&quot;text/javascript&quot;&gt;<br>&gt; &gt; &gt; &lt;!--<br>&gt; &gt; &gt; function init()<br>
&gt; &gt; &gt; {<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;var map = new OpenLayers.Map( &#39;map&#39;);<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;var ol_wms = new OpenLayers.Layer.WMS.Untiled( &quot;OpenLayers WMS&quot;,<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&quot; 
<a href="http://labs.metacarta.com/wms/vmap0?">http://labs.metacarta.com/wms/vmap0?</a>&quot;,<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; layers : &#39;basic&#39;<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;);<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;ol_wms.addOptions(
<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; isBaseLayer : true,<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;ratio: 1<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;);<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;map.addLayers([ol_wms]);<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;
map.addControl(new<br>&gt; OpenLayers.Control.MousePosition());<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;var boxes = new OpenLayers.Layer.Boxes(&quot;Images&quot;);<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;var bounds = new OpenLayers.Bounds(-96.0051889
, 28.9917903,<br>&gt; -95.9925747,<br>&gt; &gt; &gt;&nbsp;&nbsp;28.9812486);<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;var box = new OpenLayers.Marker.Box(bounds);<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;box.setBorder (&quot;yellow&quot;,4);<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;boxes.addMarker
 (box);<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;map.addLayer(boxes);<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;map.zoomToExtent(bounds);<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; }<br>&gt; &gt; &gt; // --&gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/script&gt;<br>
&gt; &gt; &gt;&nbsp;&nbsp; &lt;/head&gt;<br>&gt; &gt; &gt;&nbsp;&nbsp; &lt;body onload=&quot;init()&quot;&gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;h1&gt;OpenLayers Example&lt;/h1&gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div id=&quot;map&quot;&gt;&lt;/div&gt;<br>&gt; &gt; &gt;&nbsp;&nbsp; &lt;/body&gt;
<br>&gt; &gt; &gt;&nbsp;&nbsp;&lt;/html&gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; I get a map with the proper coordinates but the box is simply one line.<br>&gt; I<br>&gt; &gt; &gt; think there is a bug in the boxes that is not using the correct lat/lon
<br>&gt; &gt; &gt; combinations.&nbsp;&nbsp;Has anybody else ran into this?<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Thanks,<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Linda Rawson<br>&gt; &gt; &gt; _______________________________________________
<br>&gt; &gt; &gt; Users mailing list<br>&gt; &gt; &gt; <a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>&gt; &gt; &gt; <a href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users
</a><br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt;<br>&gt;<br>&gt;<br></blockquote></div><br>