Skip to content

How to use RainViewer API: simple HTML + JS code which render an animated weather radar overlay on the map

Notifications You must be signed in to change notification settings

dewit/rainviewer-api-example

 
 

Repository files navigation

RainViewer API Example

Easy to understand HTML + JS code which display weather radar data on the map using the Leaflet.js library.

View rainviewer-api-example.html in your browser.

What covered here

  • How to download the latest available JSON with the map frame's timestamps.
  • How to add tiled layers into Leaflet.
  • How to animate, move forward or backward in the animation.
  • How to display frame time.

What doesn't covered here

  • How to update the JSON and add new frames.
  • Memory and performance optimizations.

Mapbox and Google Maps examples

For MapBox and Google Maps you need to use a pretty similar code, but you need to put your API key in that examples to display the base map. Search for YOUR_API_KEY_HERE in the source code and replace it with your own key. These files will not display the map until you put your API KEY in it.

About

How to use RainViewer API: simple HTML + JS code which render an animated weather radar overlay on the map

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 100.0%