[OpenLayers-Users] Re: WMS object

Jan Henrik Øverland janhenrik.overland at gmail.com
Mon Aug 8 06:26:59 EDT 2011


How do I request a specific SRS when creating a wms layer?


On Fri, Aug 5, 2011 at 14:22, Jan Henrik Øverland <
janhenrik.overland at gmail.com> wrote:

> Hi, my map is EPSG:900913 and running Google Maps nicely. The following WMS
> feed is served both as EPSG:4326 and EPSG:900913 (have a look at the WMS
> link in the table):
>
>
> http://iridl.ldeo.columbia.edu/SOURCES/.USGS/.LandDAAC/.MODIS/.1km/.8day/.version_005/.Aqua/.EAF/.Night/.LST/X+Y+fig-+colors+coasts+-fig+//LST/255./330./plotrange//T/3118./plotvalue/Y/1.5405659E-04/39.99557/plotrange//plotborder+72+psdef//plotaxislength+432+psdef//XOVY+null+psdef/
>
> When I do this:
>
> var wms = new OpenLayers.Layer.WMS(
>     "IRI",
>     "
> http://iridl.ldeo.columbia.edu/SOURCES/.USGS/.LandDAAC/.MODIS/.1km/.8day/.version_005/.Aqua/.EAF/.Night/.LST/X+Y+fig-+colors+coasts+-fig+//LST/255./330./plotrange//T/3118./plotvalue/Y/1.5405659E-04/39.99557/plotrange//plotborder+72+psdef//plotaxislength+432+psdef//XOVY+null+psdef/wms.xml
> ",
>     {
>        layers: "USGS LandDAAC MODIS 1km 8day version_005 Aqua EAF Night
> LST",
>     }
> );
>
> ..I get a 4326 base layer. But I want it to work with my 900913 map so I
> add to the params object:
>
>     {
>        layers: "USGS LandDAAC MODIS 1km 8day version_005 Aqua EAF Night
> LST",
>        srs: "EPSG:900913",
>        bbox: "-2000000,1,6900000,4400000"
>     }
>
> but it does not work. The getFullRequestString() returns a string with the
> correct BBOX, but the SRS it still 4326.
>
> To me it looks like only the first tile has 900913 and the rest
> (twenty-something) have 4326. What am I doing wrong?
>
> Jan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110808/4a9bea9d/attachment.html


More information about the Users mailing list