<div>
<p>I switch the example.</p>
<p>var boxes = new OpenLayers.Layer.Boxes("Images");<br> var bounds = new OpenLayers.Bounds(-96.0051889, 28.9812486, -95.9925747, 28.9917903 );<br> var box = new OpenLayers.Marker.Box(bounds);<br> box.setBorder
("yellow",4);<br> boxes.addMarker(box);<br> map.addLayer(boxes);</p>
<p> map.zoomToExtent(bounds);</p>
<p>But then I get a yellow box in the middle of the map. I want a box the SAME size as the viewport I am looking at. How do I do that?</p></div>
<div>Linda Rawson<br><br> </div>
<div><span class="gmail_quote">On 9/27/07, <b class="gmail_sendername">Brent Pedersen</b> <<a href="mailto:bpederse@gmail.com">bpederse@gmail.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">> var bounds = new OpenLayers.Bounds(-96.0051889, 28.9917903, -95.9925747, 28.9812486);<br><br>hi, it looks like your ymin and ymax are switched.
<br>-brent<br><br><br>On 9/27/07, Linda Rawson <<a href="mailto:linda.rawson@gmail.com">linda.rawson@gmail.com</a>> wrote:<br>> I have the following code:<br>><br>><br>><br>> <html xmlns="<a href="http://www.w3.org/1999/xhtml">
http://www.w3.org/1999/xhtml</a>"><br>> <head><br>> <style type="text/css"><br>> #map {<br>> width: 600px;<br>> height: 600px;<br>> border: 1px solid black;
<br>> }<br>> </style><br>> <script src="../lib/OpenLayers.js"></script><br>> <script type="text/javascript"><br>> <!--<br>> function init()
<br>> {<br>> var map = new OpenLayers.Map( 'map');<br>><br>> var ol_wms = new OpenLayers.Layer.WMS.Untiled( "OpenLayers WMS",<br>> "<a href="http://labs.metacarta.com/wms/vmap0?">
http://labs.metacarta.com/wms/vmap0?</a>",<br>> {<br>> layers : 'basic'<br>> }<br>> );<br>> ol_wms.addOptions(<br>> {<br>> isBaseLayer : true,<br>> ratio: 1
<br>> }<br>> );<br>> map.addLayers([ol_wms]);<br>><br>> map.addControl(new OpenLayers.Control.MousePosition());<br>><br>> var boxes = new OpenLayers.Layer.Boxes("Images");<br>
> var bounds = new OpenLayers.Bounds(-96.0051889, 28.9917903, -95.9925747,<br>> 28.9812486);<br>> var box = new OpenLayers.Marker.Box(bounds);<br>> box.setBorder ("yellow",4);<br>> boxes.addMarker
(box);<br>> map.addLayer(boxes);<br>><br>> map.zoomToExtent(bounds);<br>><br>> }<br>> // --><br>> </script><br>> </head><br>> <body onload="init()"><br>
> <h1>OpenLayers Example</h1><br>> <div id="map"></div><br>> </body><br>> </html><br>><br>><br>> I get a map with the proper coordinates but the box is simply one line. I
<br>> think there is a bug in the boxes that is not using the correct lat/lon<br>> combinations. Has anybody else ran into this?<br>><br>> Thanks,<br>><br>> Linda Rawson<br>> _______________________________________________
<br>> Users mailing list<br>> <a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>> <a href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a><br>><br>
><br></blockquote></div><br>