[OpenLayers-Users] Problems adding a WMS layer

James Lamanna james at touchtable.com
Tue Aug 21 11:29:06 PDT 2012


Hi,
I'm trying to add a WMS layer from national atlas:

var wms = new OpenLayers.Layer.WMS(
     'states',
     'http://webservices.nationalatlas.gov/wms/boundaries',
     {
         layers: 'states',
         transparent: true,
         version: '1.3.0'
     });

map.addLayer(wms);

It doesn't seem to request any tiles until I zoom WAY out on the map, 
and then I get a request like this:

http://webservices.nationalatlas.gov/wms/boundaries?LAYERS=states&TRANSPARENT=TRUE&VERSION=1.3.0&EXCEPTIONS=INIMAGE&SERVICE=WMS&REQUEST=GetMap&STYLES=&FORMAT=image%2Fpng&CRS=EPSG%3A900913&BBOX=-90,-180,19580220.616111,19580130.616111&WIDTH=256&HEIGHT=256

Why are the coordinates for the BBOX in 2 different coordinate systems?

Do I need to specify a resolutions list or what?
It should be requesting tiles when I'm at a reasonable zoom level as well.

Thanks.

-- James


More information about the Users mailing list