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

pericoltoxic grigoregeorge631980 at yahoo.co.uk
Fri Oct 16 03:34:23 EDT 2009





Christopher Schmidt-2 wrote:
> 
> On Thu, Oct 15, 2009 at 06:26:49AM -0700, pericoltoxic wrote:
>> 
>> Hello!!! Sorry for my English, I'm new in OpenLayer and I have a problem
>> to
>> render(view) a map.
>> This is my html page:
>> 
>> <html>
>> <head>
>> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
>> <title>Untitled Document</title>
>> <script src="http://openlayers.org/api/OpenLayers.js"></script>
>> </head>
>> <body>
>> 	
>>     <div style="width:100%; height:100%" id="map"></div>
>>     <script defer="defer" type="text/javascript">
>> 	
>> 		var map = new OpenLayers.Map('map');
>> 		
>> 		var wms = new OpenLayers.Layer.WMS("gtest2", 
>> 			"http://localhost:8080/geoserver/wms",{
>> 			srs:'EPSG:2000',
>> 			styles:'',
>> 			format:"application/openlayers",
>> 			layers: 'cite:gtest2',
>> 			});
>> 		map.addLayer(wms);
>> 		map.zoomToMaxExtent();
>> 		alert(wms.getURL(new OpenLayers.Bounds(map)));
>> 	</script>
>> </body>
>> </html>
>> 
>> When i run this code, i have:
>> 
>> http://n2.nabble.com/file/n3829292/error.jpg 
> 
> Why are you calling wms.getURL? You shouldn't need to do that.
> 
> 
> 
> http://trac.openlayers.org/wiki/TroubleshootingTips#Pinktiles
> 
>> 
>> 
>> -- 
>> View this message in context:
>> http://n2.nabble.com/bbox-Nan-null-null-null-tp3829292p3829292.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
> 
> 

If i change in the url EPSG:4326 with EPSG:2000 , the map is render
corectly, but how i do that in OpenLayers script??
-- 
View this message in context: http://n2.nabble.com/bbox-Nan-null-null-null-tp3829292p3834104.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.



More information about the Dev mailing list