On Fri, Oct 16, 2009 at 05:13:26AM -0700, ralthaus wrote:
> 
> 
> 
> pericoltoxic wrote:
> > 
> > 
> > 
> >     <script defer="defer" type="text/javascript">
> >     
> >     
> >     var bounds=new OpenLayers.Bounds(-180, -90, 180, 90); 
> >     
> >     
> >     var map = new OpenLayers.Map( 'map', {maxExtent: bounds,
> > projection:"EPSG:2000"}); 
> > 
> >             //var map = new OpenLayers.Map('map');
> >             
> >             var wms = new OpenLayers.Layer.WMS("cite:gtest2", 
> >                     "http://localhost:8080/geoserver/wms",{
> >                     styles:'',
> >                     format:"application/openlayers",
> >                     layers: 'cite:gtest2'});
> >             map.addLayer(wms);
> >             map.zoomToMaxExtent();
> >             alert(wms.getURL(new OpenLayers.Bounds(map)));
> >     </script>
> > 
> > 
> 
> Hmmm, when you make "wms.getURL(new OpenLayers.Bounds(map))", you make a
> double strange thing : you create "new" bounds (you don't want new bounds,
> you want to get your map's bounds) , and arguments for OpenLayers.Bounds
> are...bounds, not a map
> To get your map bounds, you should make something like
> wms.getURL(map.getExtents())
   getExtent(), not getExtents().


> -- 
> View this message in context: 
> http://n2.nabble.com/bbox-Nan-null-null-null-tp3829292p3835209.html
> Sent from the OpenLayers Dev mailing list archive at Nabble.com.
> _______________________________________________
> Dev mailing list
> Dev@openlayers.org
> http://openlayers.org/mailman/listinfo/dev

-- 
Christopher Schmidt
MetaCarta
_______________________________________________
Dev mailing list
Dev@openlayers.org
http://openlayers.org/mailman/listinfo/dev

Reply via email to