我创建了一个 OpenLayers.Layer.WMS,我可以查看我希望在叠加层上的图片。但它遍布整个地图。请检查我下面的代码,让我知道我在哪里做错了。
var dm_wms = new OpenLayers.Layer.WMS( "DM Solutions Demo",
"http://4.bp.blogspot.com/_lxtIPm_77I0/TJgxuFj5VqI/AAAAAAAAAW0/5QgltGCSviU/s1600/yellowrose.jpg",
{
layers: "basic",
transparent: "true",
format: "image/png"
}, {
opacity: 0.3,
singleTile: true,
maxExtent: new OpenLayers.Bounds(-74.047185, 40.679648, -50.907005, 30.882078)
}
);