Weather visualization

This sample exemplifies how to apply the weather visualization to a SceneView. The clouds and weather effects like rain can also help to tell a story in a more realistic and immersive way. Click the "flooding" button to see the effects of an extreme rainfall event in the city of Utrecht, NL.

You can either specify the weather type in the environment property of the SceneView or add the Weather widget to your application and let the viewers explore different weather types. The five different weather types are sunny, cloudy, rainy, snowy, and foggy, and one can set them directly in the SceneView constructor:

1
2
3
4
5
6
7
8
9
10
11
12
13
let view = new SceneView({
  container: "viewDiv",
  map: new Map({
    basemap: "satellite",
    ground: "world-elevation"
    }),
  environment: {
    weather: {
      type: "cloudy",     // autocasts as new CloudyWeather({ cloudCover: 0.3 })
      cloudCover: 0.3
    }
  }
});

The weather can also be set after the initialization of the view. Make sure to check the documentation of the different weather types for weather specific properties, like for example precipitation for rainy weather:

1
2
3
4
5
view.environment.weather = {
  type: "rainy",     // autocasts as new RainyWeather({ cloudCover: 0.7, precipitation: 0.3 })
  cloudCover: 0.7,
  precipitation: 0.3
};

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

The developer dashboard has moved

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close