I am trying to add a WMS radar overlay to my map but it won't seem to gather it.

  noaaRdr = new OpenLayers.Layer.WMS("Latest Radar", "http://nowcoast.noaa.gov/wms/com.esri.wms.Esrimap/obs?", {
    layers: 'RAS_RIDGE_NEXRAD',
    transparent: true,
    format: 'image/png'
  }, {
    visibility: true, isBaseLayer: false, singleTile: true,
    ratio: 1,opacity: 0.7

  radarArray = [noaaRdr];     //adding more layers later..

I have seen this URL used elsewhere but i can't figure out whats wrong. The layer shows up in the layer switcher but the image never shows on the map and the file "obs" never gets requested from the NOAA server ??

Can anyone help me with this.

  • Can you use something like Fiddler to see what requests are being sent out by OpenLayers? I can't see anything wrong with your code so it might help to see what request is being sent by OpenLayers and what response you are getting from the server. – CHenderson Jul 26 '12 at 22:41
  • I am developing from a Mac so that is not really an option for me. Is their a mac equivalent ?? – MB. Jul 26 '12 at 23:37
  • The closest equivalent that I am aware of is Wireshark - http:// www.wireshark.org – CHenderson Jul 27 '12 at 0:46
  • For debuggin in Mac you can use development tools: developer.apple.com/technologies/safari/developer-tools.html – drnextgis Jul 27 '12 at 3:15
  • @MB. have you solved your problem? – drnextgis Jul 27 '12 at 4:30

Here is working code:

options = {
    div: "map",
    zoom: 5,
    center: [-10796366.372312, 4426748.6429884],
    layers: [
        new OpenLayers.Layer.OSM()
    projection: "EPSG:3857"
map = new OpenLayers.Map(options);

var noaaRdr = new OpenLayers.Layer.WMS(
    "Latest Radar",
        layers: 'RAS_RIDGE_NEXRAD',
        transparent: true
        isBaseLayer: false,
        singleTile: true,
        opacity: 0.7

map.addControl(new OpenLayers.Control.LayerSwitcher());

Live example HERE.

  • 1
  • that example doesn't show radar for me.... – MB. Jul 28 '12 at 0:04
  • doesn't work using firefox either ?? – MB. Jul 28 '12 at 0:07
  • Ok So downloaded the latest version of openLayers 2-12 and deleted all the previous files from my website and added the new just in case it was related to that no fix. one difference is that the projection you are using is projection: "EPSG:3857" could it be that ??? – MB. Jul 31 '12 at 16:15
  • From GetCapabilities response: nowcoast.noaa.gov/wms/com.esri.wms.Esrimap/… you can see that WMS server supports only 3857 and 4326 projections, not 900913, so using EPSG:3857 is mandatory. – drnextgis Aug 1 '12 at 0:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.