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

Christopher Schmidt crschmidt at metacarta.com
Fri Oct 16 10:39:01 EDT 2009


On Fri, Oct 16, 2009 at 07:25: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>
> > 
> > 
> > 
> 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'.

This is actually the problem, I'm assuming. application/openlayers
will return an HTML page from GeoServer, not an image.

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

Note that he's not using MapServer, so he doesn't have a "path to your map",
or a "&mode=map", but you probably hit the nail on the head with the wrong
format.

-- Chris

> 
> 
> 
> -- 
> 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.
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev

-- 
Christopher Schmidt
MetaCarta



More information about the Dev mailing list