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

ralthaus raphael.althaus at agridea.ch
Fri Oct 16 10:25:26 EDT 2009




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>
> 
> 
> 
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 

Well, they're still strange things in your script

Projection declaration:
projection:new OpenLayers.Projection("EPSG:2000")

layer format:
I may be wront, but i've never seen an "application/openlayers" format.
Should rather be an "image" format, like 'image/gif'.

layer:
The property map is missing
map:'name_of_the_map'

etc.


But the first thing to test (if you didn't) is your WMS.

When you type
http://localhost:8080/geoserver/wms?map=<path to your map>&layer=<name of
your layer>&mode=map
For example, do you get something ? 




-- 
View this message in context: http://n2.nabble.com/bbox-Nan-null-null-null-tp3829292p3835827.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.



More information about the Dev mailing list