bbox=Nan,null,null,null

12 messages Options
Embed this post
Permalink
pericoltoxic

bbox=Nan,null,null,null

Reply Threaded More More options
Print post
Permalink
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:




Christopher Schmidt-2

Re: bbox=Nan,null,null,null

Reply Threaded More More options
Print post
Permalink
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
> [hidden email]
> http://openlayers.org/mailman/listinfo/dev

--
Christopher Schmidt
MetaCarta
_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
pericoltoxic

Re: bbox=Nan,null,null,null

Reply Threaded More More options
Print post
Permalink

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@openlayers.org
> http://openlayers.org/mailman/listinfo/dev

--
Christopher Schmidt
MetaCarta
_______________________________________________
Dev mailing list
Dev@openlayers.org
http://openlayers.org/mailman/listinfo/dev

I use this function:wms.getURL...... because i wanted to see the URL. 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>

pericoltoxic

Re: bbox=Nan,null,null,null

Reply Threaded More More options
Print post
Permalink
In reply to this post by Christopher Schmidt-2



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@openlayers.org
> http://openlayers.org/mailman/listinfo/dev

--
Christopher Schmidt
MetaCarta
_______________________________________________
Dev mailing list
Dev@openlayers.org
http://openlayers.org/mailman/listinfo/dev

My URL is:
http://localhost:8080/geoserver/wms?SRS=EPSG%3A4326&STYLES=&FORMAT=application%2Fopenlayers&LAYERS=cite%3Agtest2&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&BBOX=-180,-90,0,90&WIDTH=256&HEIGHT=256
pericoltoxic

Re: bbox=Nan,null,null,null

Reply Threaded More More options
Print post
Permalink
In reply to this post by Christopher Schmidt-2


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@openlayers.org
> http://openlayers.org/mailman/listinfo/dev

--
Christopher Schmidt
MetaCarta
_______________________________________________
Dev mailing list
Dev@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??
Christopher Schmidt-2

Re: bbox=Nan,null,null,null

Reply Threaded More More options
Print post
Permalink
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
[hidden email]
http://openlayers.org/mailman/listinfo/dev
pericoltoxic

Re: bbox=Nan,null,null,null

Reply Threaded More More options
Print post
Permalink

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

Re: bbox=Nan,null,null,null

Reply Threaded More More options
Print post
Permalink

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())
Christopher Schmidt-2

Re: bbox=Nan,null,null,null

Reply Threaded More More options
Print post
Permalink
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
> [hidden email]
> http://openlayers.org/mailman/listinfo/dev

--
Christopher Schmidt
MetaCarta
_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
pericoltoxic

Re: bbox=Nan,null,null,null

Reply Threaded More More options
Print post
Permalink

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@openlayers.org
> http://openlayers.org/mailman/listinfo/dev

--
Christopher Schmidt
MetaCarta
_______________________________________________
Dev mailing list
Dev@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.
ralthaus

Re: bbox=Nan,null,null,null

Reply Threaded More More options
Print post
Permalink
pericoltoxic wrote:
> >
> >
> > 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)));

Well, they're still strange things in your script


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 ?



Christopher Schmidt-2

Re: bbox=Nan,null,null,null

Reply Threaded More More options
Print post
Permalink
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
> [hidden email]
> http://openlayers.org/mailman/listinfo/dev

--
Christopher Schmidt
MetaCarta
_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev