i wanted to display weather information of the current map location. i have got current map location by using following code
var x = map.extent.getCenter().getLatitude();
var y = map.extent.getCenter().getLongitude();
document.getElementById("txtx").value = x;
document.getElementById("txty").value = y;
but now i am stuck to how to get weather information.
If u have the weather info as a layer (as rest service) u can use it on the map with map.addLayer() function.
no i meant like weather widget it display info like current temperature etc. i donot have weather info as layer
Faryal, there is no prebuilt widget that I know of to do this. You will need to create or locate a weather service to bring into your application. Just doing a quick google search brings up a couple of things that may help you.
This is an ArcGIS Online map that contains a radar service, NOAA weather alerts, and it looks like an accuweather service.
https://www.arcgis.com/home/item.html?id=d16d53126f1243a3a7a7f1d0dff39662
This is the webmap that powers the above application. The layers in the map may be of particular use to you.
Hi Faryal,
Do you got any solution or rest service to get current weather details based on lat,long. I am also in the same boat.
Thanks,
Arun E