Hi,
 
build the WMS request for your layer and test it in the browser. Change the
BBOX, SRS. Perhaps you get some error message.
 
http://localhost:8080/geoserver/wms?LAYERS=cite%3Asedac
<http://localhost:8080/geoserver/wms?LAYERS=cite%3Asedac&FORMAT=image%2Fpng&;
VERSION=1.1.1&TRANSPARENT=true&SERVICE=WMS&REQUEST=GetMap&STYLES=&EXCEPTIONS
=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=-153.599297,-105.3607
51,165.451558,97.517659&WIDTH=942&HEIGHT=599>
&FORMAT=image%2Fpng&VERSION=1.1.1&TRANSPARENT=true&SERVICE=WMS&REQUEST=GetMa
p&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=-
153.599297,-105.360751,165.451558,97.517659&WIDTH=942&HEIGHT=599
 
Arnd

  _____  

Von: IT Intern [mailto:itinter...@gmail.com] 
Gesendet: Dienstag, 21. Dezember 2010 23:19
An: Arnd Wippermann
Betreff: Re: [OpenLayers-Users] Re: EPSG:4008 Layer Not Displaying


Hi Arnd, thanks for your reply!  Unfortunately that has not solved the
problem for me :(

I set the bounds both on my map and layer individually and still that layer
does not display.

I've also tried with the bounds I obtained from GeoServer, again no luck :-/

    var borders = new OpenLayers.Layer.WMS(
                    "Borders", "http://localhost:8080/geoserver/wms";, {id:
'borders', layers: 'cite:sedac', transparent: true, maxExtent: new
OpenLayers.Bounds(-2880104.25, 2070327.125, -1038944.658, 3262434.769),
projection: new OpenLayers.Projection('EPSG:4008'), units: 'm'},
{isBaseLayer: false, displayInLayerSwitcher: true, visibility: true,
displayOutsideMaxExtent: true} 
               );

I still don't see why it is not working ...

Many Thanks,

elshae


On Tue, Dec 21, 2010 at 2:28 PM, Arnd Wippermann <arnd.wipperm...@web.de>
wrote:


Hi,

I would think, that the maxExtent is the part to change.

Your map projection is EPSG:4326 by default, and EPSG:4008 is also a
projection in longlat.

With your maxExtent the visible response of the WMS are only a pixel.

Try a maxExtent of -180,-90,180,90. Perhaps it solves your problem.

Arnd

-----Ursprüngliche Nachricht-----
Von: openlayers-users-boun...@lists.osgeo.org
[mailto:openlayers-users-boun...@lists.osgeo.org] Im Auftrag von elshae
Gesendet: Dienstag, 21. Dezember 2010 15:50
An: us...@openlayers.org
Betreff: [OpenLayers-Users] Re: EPSG:4008 Layer Not Displaying



Thank you so much for the kind support.  I see that this is definitely going
in the right direction, but I am still not able to get it working.

In my body tag I have the scripts

<script src="./OpenLayers-2.10/OpenLayers.js"></script>
<script src="./proj4js/lib/proj4js-combined.js"></script> //I did also try
proj4js.js, but the docs said use this one?

Then I have these before my map and layer declaration, also in the body tag

Ext.onReady(function() {

           Proj4js.defs["EPSG:4008"] = "+proj=longlat +ellps=clrk66
+no_defs";
           Proj4js.defs["SR-ORG:6627"] = "+proj=merc +lon_0=0 +k=1 +x_0=0
+y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs";
           Proj4js.defs["EPSG:4326"] = "+proj=longlat +ellps=WGS84
+datum=WGS84 +no_defs";

...
...



//Map properties
           var options = {
                   controls: [new OpenLayers.Control.Navigation()],
//Needed to use GeoExt controls such as the zoomslider
                   maxExtent: new OpenLayers.Bounds(-20037508.34,
-20037508.34, 20037508.34, 20037508.34),
                   units: 'm',
                   allOverlays: false //Do not display all layers on load
           }

           var map = new OpenLayers.Map(options);

var borders = new OpenLayers.Layer.WMS(
                   "Borders", "http://localhost:8080/geoserver/wms";, {id:

'borders', layers: 'cite:sedac', transparent: true, projection: new
OpenLayers.Projection("EPSG:4008")}, {isBaseLayer: false,
displayInLayerSwitcher: true, visibility: true}

              );


Still nothing shows up :(.  Am I doing something wrong?  I'm not seeing the
error...

Thank you very much for your time,


elshae
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/EPSG-4008-Layer-Not-Displaying-tp5838

081p5855542.html

Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
us...@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users




_______________________________________________
Users mailing list
us...@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to