Update infoWindow for a raster layer map service

المشرف العام

Administrator
طاقم الإدارة
I would like to manipulate the infoWindow for a Raster Layer in my JavaScript application. However, I don't think I can use ArcGISImageServiceLayer since the URL indicates it is a map service and not image service.

http://gis.srh.noaa.gov/arcgis/rest/services/national_snow_anlys/MapServer/0

There is a "Pixel Value", but that is not an official field (Under "Fields" it states None). I would like to change "Pixel Value" in my infoWindow to "Snow Depth."

This is some sample code I used for another map service layer that works fine. I tried to use "Pixel Value" as my field name and outField for the snow layer but that does not work.

function createFeaturePrecipLayer(layer) { var popupTemplatePrecip = new esri.dijit.PopupTemplate({ title: "Precipitation Forecast - Next 72 Hours", fieldInfos: [ { fieldName: "label", visible: true, label: "Amount:" }, ] }); var featurePrecip = new esri.layers.FeatureLayer(layer.url, { infoTemplate: popupTemplatePrecip, mode: esri.layers.FeatureLayer.MODE_ONDEMAND, outFields: ["label"] }); featurePrecip.visible = (layer.visible != undefined) ? layer.visible : true; if (layer.alpha != undefined) { featurePrecip.setOpacity(layer.alpha); } return featurePrecip;}

أكثر...
 
أعلى