Original User: betsyjsgDominik,The reason the two urls are so different is that your first url is using a wms service created by ArcGIS Server while your second url is using a wms service that was created using ArcIMS's wmsconnector. The second url is using an older version of Esri software to generate wms services. Below is code to actually add two layers (NEXRAD radar and surface air temperature locations) from your second url's wms service (NOWCoast) into a map:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--The viewport meta tag is used to improve the presentation and behavior of the samples
on iOS devices-->
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>WMS</title>
<link rel="stylesheet" href="http://js.arcgis.com/3.7/js/dojo/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="http://js.arcgis.com/3.7/js/esri/css/esri.css">
<script src="http://js.arcgis.com/3.7/"></script>
<script>
dojo.require("esri.map");
var map;
dojo.ready(function() {
dojo.declare("my.NOWCoastWMSLayer", esri.layers.DynamicMapServiceLayer, {
constructor: function() {
this.initialExtent = this.fullExtent = new esri.geometry.Extent({"xmin":-16476154.32,"ymin":2504688.54,"xmax":-6457400.14,"ymax":7514065.62,"spatialReference":{"wkid":102100}});
this.spatialReference = new esri.SpatialReference({wkid:102100});
this.loaded = true;
this.onLoad(this);
},
getImageUrl: function(extent, width, height, callback) {
var params = {
request:"GetMap",
transparent:true,
format:"image/png",
bgcolor:"ffffff",
version:"1.1.1",
layers:"OBS_MET_TEMP,RAS_RIDGE_NEXRAD",
styles: "default,default",
exceptions: "application/vnd.ogc.se_xml",
//changing values
bbox:extent.xmin + "," + extent.ymin + "," + extent.xmax + "," + extent.ymax,
srs: "EPSG:" + extent.spatialReference.wkid,
width: width,
height: height
};
callback("http://nowcoast.noaa.gov/wms/com.esri.wms.Esrimap/obs?" + dojo.objectToQuery(params));
}
});
});
function init() {
map = new esri.Map("map", {
basemap: "satellite",
center: [-103.008, 40.98],
zoom: 4
});
map.addLayer(new my.NOWCoastWMSLayer());
}
dojo.ready(init);
</script>
</head>
<body class="claro">
<div id="map" style="position:relative; width:1024px; height:512px; border:2px solid #000;"></div>
</body>
</html>
I've attached a screenshot to show the results.Hope this helps answer your question.