Profile
Back to NewsBack
GitHub Trending 3 min
Reader Mode
nasa-gibs/gibs-web-examples: Examples of using GIBS with various web mapping libraries

nasa-gibs/gibs-web-examples: Examples of using GIBS with various web mapping libraries

11 hours ago

gibs-web-examples

This project shows how to use GIBS as a tile source for OpenLayers, Leaflet, Cesium, Mapbox GL, and Google Maps

Live Examples

  • OpenLayers
* Geographic (EPSG:4326) * Arctic (EPSG:3413) * Antarctic (EPSG:3031) * Web Mercator (EPSG:3857) * Rolling Seven Day Slider * Vector Tile Basic Use * Vector Tile feature interactions * Vector Tile Using Mapbox Style JSON
  • Leaflet
* Geographic (EPSG:4326) * Arctic (EPSG:3413) * Antarctic (EPSG:3031) * Web Mercator (EPSG:3857) * Rolling Seven Day Slider
  • Cesium
* Web Mercator (EPSG:3857) * Geographic (EPSG:4326) * Time Slider * Demonstration of GIBS Layers
  • Mapbox GL
* Web Mercator (EPSG:3857)
  • Maplibre GL
* Web Mercator (EPSG:3857)
  • Google Maps
* Web Mercator (EPSG:3857)

Overview

Clone the repository, then:

npm install
npm start

or for hot-reload

npm install
npm run dev

Navigate your browser to http://localhost:3001.

Most examples show a single layer. Visit the GIBS Visualization Product Catalog for parameters needed to display other layers.

The WMTS standard does not provide a way to select a specific time or date for a layer. GIBS has implemented this feature in the following way:

  • WMTS KVP: Use the TIME parameter to select a day in YYYY-MM-DD format.
  • WMTS REST: Add the day in YYYY-MM-DD format between style name and the tile
matrix set name

See the "Rolling Seven Day Slider" examples for more information.

The Web Mercator endpoints return a blank map at zoom level zero due to a bug in the tiling software. This issue will be fixed sometime in the future.

Some of the mapping libraries will attempt to fetch tiles outside the boundaries of the tile matrix. GIBS returns error codes when these tile requests are made.

Worldview is a web application that uses GIBS as its primary image source.

OpenLayers

These examples use OpenLayers version 10.7.0.

If geometry transformations are required using coordinates in the polar systems, proj4js, version 2, must be included. This example uses proj4js version 2.20.2. This is not required to simply display the map.

Mapbox Vector Tile (MVT) Examples

Mapbox Vector Tiles are available for some of the GIBS vector datasets. These Openlayers examples show how to style vector tiles using Openlayers styling classes, how to style vector tiles with the Mapbox Styles that are provided by GIBS in the getCapabilities, and how to visualize feature data through map interactions. The Mapbox Style example uses ol-mapbox-style version 13.1.1.

Leaflet

This example uses Leaflet version 1.9.4.

To properly support the polar projections, the Proj4Leaflet plugin must be used. This example uses Proj4Leaflet version 1.0.1.

Gaps can sometimes be seen between the map tiles. Use the workaround found here: https://github.com/Leaflet/Leaflet/issues/3575

Cesium

This example uses Cesium version 1.136.

Use this GeographicTilingScheme when accessing the EPSG:4326 GIBS endpoint.

Mapbox GL

This example uses Mapbox GL version 1.13.3.

MapLibre GL

This example uses MapLibre GL version 5.14.0.

Google Maps

This example uses the Google Maps API, version 3.

Google Maps requires an API key. The key should be inserted here

Questions

Send questions or comments to [email protected]

Chat with me