Hello Arnd,

I tried out your suggestion but I am still at a lost here.  I happened not
to get any error messages, but my layer didn't appear at all when I changed
these params.  I tried with SRS 4326 and 900913 since my map has base layers
of 900913 and overlays of 4326.  I also changed the bbox to -20037508.34,
-20037508.34, 20037508.34, 20037508.34 (the bbox of my current map).  I also
notice that for this EPSG:4008 layer I see
-2369470.14441, 2720321.16942
Scale = 1 : 2854176M

as opposed to another layer of mine (EPSG:4326) on my map which shows
98.29099, 28.50735
Scale = 1 : 2M

In it's GeoServer preview.  So at this point I'm assuming it has something
to do with the scale of my layer..

In the OpenLayers code of the GeoServer preview, they have:

       var bounds = new OpenLayers.Bounds(
                    -2880104.25, 2070327.125,
                    -1038944.658, 3262434.769
                );
                var options = {
                    controls: [],
                    maxExtent: bounds,
                    maxResolution: 7192.02965625,
                    projection: "EPSG:4008",
                    units: 'degrees'
                };
                map = new OpenLayers.Map('map', options);

                // setup tiled layer
                tiled = new OpenLayers.Layer.WMS(
                    "sedac - Tiled", "http://localhost:8080/geoserver/wms";,
                    {
                        height: '331',
                        width: '512',
                        layers: 'cite:sedac',
                        styles: '',
                        srs: 'EPSG:4008',
                        format: format,
                        tiled: 'true',
                        tilesOrigin : map.maxExtent.left + ',' +
map.maxExtent.bottom
                    },
                    {
                        buffer: 0,
                        displayOutsideMaxExtent: true
                    }
                );

                // setup single tiled layer
                untiled = new OpenLayers.Layer.WMS(
                    "sedac - Untiled", "http://localhost:8080/geoserver/wms";,
                    {
                        height: '331',
                        width: '512',
                        layers: 'cite:sedac',
                        styles: '',
                        srs: 'EPSG:4008',
                        format: format
                    },
                    {singleTile: true, ratio: 1}
                );

                map.addLayers([untiled, tiled]);

I instead, set the params they have for their map in my layer because
if I set my map specific to this layer, other layers won't work as
expected...

For the map I have:

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);

and for my EPSG:4008 layer I have:

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

Any further help would be greatly appreciated :)

Thank you,

elshae
                        



On Tue, Dec 21, 2010 at 6:09 PM, Arnd Wippermann <[email protected]>wrote:

>  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&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.360751,165.451558,97.517659&WIDTH=942&HEIGHT=599
>
> Arnd
>
>  ------------------------------
> *Von:* IT Intern [mailto:[email protected]]
> *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 
> <[email protected]>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: [email protected]
>> [mailto:[email protected]] Im Auftrag von elshae
>> Gesendet: Dienstag, 21. Dezember 2010 15:50
>> An: [email protected]
>> 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
>> [email protected]
>> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>>
>>
>
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to