0

I am attempting to add NOAA's Doppler Radar to my web map. For whatever reason the later will not display on the map. No errors are being reported and I have used console.log() to confirm the data is being pulled correctly form noaa's arcGIS server. Any thoughts as to how to configure this so the data gets displayed?

    maps.addWeather = function addWeatehr () {
    console.log("addWeather Called...");
    var weatherServiceURL = "http://gis.srh.noaa.gov/arcgis/rest/services/RIDGERadar/MapServer"
    var weatherLayer = new FeatureLayer(weatherServiceURL,{
        outFields:["*"],
        visible:true
    });

    console.log(weatherLayer);

    maps.map.addLayer(weatherLayer);
};
LCaraway
  • 1,257
  • 3
  • 20
  • 48

1 Answers1

2

You're trying to add a FeatureLayer using a map service that doesn't support returning features - which makes sense if you think about it, what features would a weather radar return? If you look at the root folder of the NOAA server:

http://gis.srh.noaa.gov/arcgis/rest/services

You should see "RIDGERadar (MapServer)". If it supported Feature access it would either say "FeatureServer", or have a second entry if it supported both.

Try adding it as a dynamic map service instead:

var layer = new esri.layers.ArcGISDynamicMapServiceLayer("http://gis.srh.noaa.gov/arcgis/rest/services/RIDGERadar/MapServer");
maps.map.addLayer(layer);

The ArcGIS services directory is a very useful thing to play with - I got the above line from the internal Javascript viewer linked from the MapServer page.

Juffy
  • 1,220
  • 13
  • 22
  • I have tried this, among other variations with no luck. Someone on another forum suggested the culprit may be that the coordinate system is wkid:4269 as opposed to a standard web Mercator. This may be why the JavaScript viewer works from the server but the layer will not show up on the ArcGIS.com viewer. I am working to verify this but am having trouble converting coordinate systems inside the application. – LCaraway Mar 10 '16 at 15:42
  • No, I don't think that's your problem - I've just loaded into one of my existing web mapping apps using the code above and it works fine. Chrome dev tools reports a request such as [this](http://gis.srh.noaa.gov/arcgis/rest/services/RIDGERadar/MapServer/export?dpi=96&transparent=true&format=png8&bbox=-15679648.97469613%2C2544810.9896702743%2C-6287066.939016168%2C7999357.328099002&bboxSR=102100&imageSR=102100&size=1920%2C1115&f=image) from within my app - asking for a bbox with coordinates in SR 102100 (aka. Web Mercator) and getting a valid response. What does your network traffic look like? – Juffy Mar 11 '16 at 03:45