I have this map loaded using the ArcGIS API
http://ags.servirlabs.net/ArcGIS/rest/services/ReferenceNode/TRMM_30DAY/MapServer
I want to let the user click on the raster layer and display the pixel value at that specific x,y location in a pop up window. While googling I found this example
https://developers.arcgis.com/javascript/jssamples/find_popup.html
explaining how to use IdentifyTask. Can I use this feature for a raster layer plus the data is already loaded do I need to make an extra request to get the values every time the user clicks on the layer?
Solved! Go to Solution.
When I switch the reference to 3.17, the map gets all screwed up (only certain tiles show up) and the identify widget becomes a line of text way up in the left corner of the map.
Did you change the CSS references too?
I did. There is only one CSS reference in the example script. <link rel="stylesheet" href="http://js.arcgis.com/3.10/js/esri/css/esri.css">.
Lloyd,
What did you update that url to?
It was:
<link rel="stylesheet" href="http://js.arcgis.com/3.10/js/esri/css/esri.css">
you should change it to:
<link rel="stylesheet" type="text/css" href="https://js.arcgis.com/3.17/esri/css/esri.css">
I changed both to 3.17. It works perfectly with 3.10, but goes crazy with 3.17. The only other thing I changed was the center and zoom of the map.
Lloyd,
Pay very close attention to the CSS URL the URL you are trying to use is incorrect. If you copy the CSS link I provided you will not have an issue.
That works, thanks!!
Should I use these pixel values to get the depth at particular point if so then can you please guide me on that
GreetingsDerek Law This would be an excellent feature to support in ArcGIS Online webmaps for identifying raster pixels in popups. If webmaps support it natively we can use it for creating fully online Esri-cloud hosted WebApp Builder sites. Any thought if this might be implemented at some time in the future?
Hi Kevin,
I see you've already submitted your enhancement suggestion on the ArcGIS Ideas threads,
https://community.esri.com/ideas/12329
And I can't comment on if and when this enhancement would be implemented at this time, sorry. It could probably use some more votes to make it a higher priority.
Hope this helps and happy holidays,