[OpenLayers-Dev] bbox=Nan,null,null,null
pericoltoxic
grigoregeorge631980 at yahoo.co.uk
Fri Oct 16 07:58:25 EDT 2009
Christopher Schmidt-2 wrote:
>
> On Fri, Oct 16, 2009 at 12:34:23AM -0700, pericoltoxic wrote:
>> If i change in the url EPSG:4326 with EPSG:2000 , the map is render
>> corectly, but how i do that in OpenLayers script??
>
>
> http://faq.openlayers.org/map/how-do-i-set-a-different-projection-on-my-map/
>
> Regards,
> --
> Christopher Schmidt
> MetaCarta
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
>
>
I set a different projection on my map but I have the same problem.
<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 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>
</body>
</html>
I copied the URL return from this function( wms.getURL) in the browser to
see the result.......the result is a xml file. The content form the xml file
is:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE ServiceExceptionReport SYSTEM
"http://localhost:8080/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd">
<ServiceExceptionReport version="1.1.1" >
<ServiceException>
java.lang.IllegalArgumentException: Bounding box coordinate 1 is not
parsable:null
Bounding box coordinate 1 is not parsable:null
</ServiceException>
</ServiceExceptionReport>
--
View this message in context: http://n2.nabble.com/bbox-Nan-null-null-null-tp3829292p3835139.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.
More information about the Dev
mailing list