I am atempting to add NOAA's Dopler Radar to my web. 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);
};
2 Answers 2
It looks like the problem is that the spatial reference of this map is not the standard Web Mercator, but is 4269. You'll notice if you go to the REST service, it will show up when you click on the ArcGIS JavaScript link, but not the ArcGIS.com link (using a Web Mercator basemap)
-
I think you may be on to something here. Good catch! Do you have any creative ways of manipulating the spatial reference. I've tried both changing the map and the layers spatial reference with no luck. Got an error for the map stating that 4269 could not be converted...LCaraway– LCaraway2016年03月10日 01:53:04 +00:00Commented Mar 10, 2016 at 1:53
in general you shouldn't need to do anything to get a dynamic map service layer to reproject and draw correctly on top of a basemap in a different projection.
something is wrong with this map service that is keeping it from generating dynamic images in wkid:102100
. the request below is proof that the service can interpret a Web Mercator bounding box and display an image in WGS84, but if you change the Image Spatial Reference (imageSR
) parameter to '102100' (Web Mercator), no image is produced.
im not quite sure how you'd troubleshoot/resolve the problem with the service, but i'll see if i can track down someone else that can help.
Explore related questions
See similar questions with these tags.
ArcGISDynamicMapServiceLayer
. Otherwise, you'll need to specify a sublayer id by appending/0
to the end of the URL.addWeatehr
and just usefunction()