[OpenLayers-Dev] bbox=Nan,null,null,null

pericoltoxic grigoregeorge631980 at yahoo.co.uk
Fri Oct 16 09:17:19 EDT 2009




Christopher Schmidt-2 wrote:
> 
> 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 at openlayers.org
>> http://openlayers.org/mailman/listinfo/dev
> 
> -- 
> Christopher Schmidt
> MetaCarta
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
> 
> 
The URL returned from :wms.getURL(map.getExtent()) it's ok now, but the
Pinktiles followe me :(( The result it's the same.
http://n2.nabble.com/file/n3835501/error.jpg 
-- 
View this message in context: http://n2.nabble.com/bbox-Nan-null-null-null-tp3829292p3835501.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.



More information about the Dev mailing list