[OpenLayers-Users] RC 2.5-RC3 Problem with Boxes

Linda Rawson linda.rawson at gmail.com
Thu Sep 27 13:26:27 EDT 2007


I have the following code:


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <style type="text/css">
        #map {
            width: 600px;
            height: 600px;
            border: 1px solid black;
        }
    </style>
    <script src="../lib/OpenLayers.js"></script>
    <script type="text/javascript">
<!--
function init()
{
   var map = new OpenLayers.Map( 'map');

   var ol_wms = new OpenLayers.Layer.WMS.Untiled( "OpenLayers WMS",
   "http://labs.metacarta.com/wms/vmap0?",
   {
      layers : 'basic'
   }
   );
   ol_wms.addOptions(
   {
      isBaseLayer : true,
   ratio: 1
   }
   );
   map.addLayers([ol_wms]);

   map.addControl(new OpenLayers.Control.MousePosition());

   var boxes = new OpenLayers.Layer.Boxes("Images");
   var bounds = new OpenLayers.Bounds(-96.0051889, 28.9917903,  -95.9925747,
28.9812486);
   var box = new OpenLayers.Marker.Box(bounds);
   box.setBorder("yellow",4);
   boxes.addMarker(box);
   map.addLayer(boxes);

   map.zoomToExtent(bounds);

}
// -->
    </script>
  </head>
  <body onload="init()">
    <h1>OpenLayers Example</h1>
    <div id="map"></div>
  </body>
</html>

I get a map with the proper coordinates but the box is simply one line.  I
think there is a bug in the boxes that is not using the correct lat/lon
combinations.  Has anybody else ran into this?

Thanks,

Linda Rawson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20070927/13aa448a/attachment.html


More information about the Users mailing list