Git Product home page Git Product logo

leaflet-gibs's Introduction

Leaflet-GIBS

Leaflet plugin for NASA EOSDIS GIBS imagery integration. 154 products are available. Date can be set dynamically for multi-temporal products. No-data pixels of MODIS Multiband Imagery can be made transparent.

Works with both Leaflet 0.7.x and 1.0.x!

Example

First, include list of GIBS products and the plugin itself:

<script src="src/GIBSMetadata.js"></script>
<script src="src/GIBSLayer.js"></script>

Then create a GIBS layer:

var layer = new L.GIBSLayer('MODIS_Aqua_SurfaceReflectance_Bands721', {
    date: new Date('2015/04/01'),
    transparent: true
}).addTo(map);

Check the Demo!

###API The main class L.GIBSLayer extends L.TileLayer.

new L.GIBSLayer(GIBSLayerID, options)

GIBSLayerID is GIBS Imagery Layer Identifier, see list of available products.

The following options can be set:

Option Type Description
date Date Date for multi-temporal products
transparent Boolean Make no-data pixels of MODIS Multiband Imagery transparent

Note about transparent option. GIBS Multiband Imagery layers use JPEG tiles without transparency (all no-data pixels are black). HTML Canvas and corresponding no-data layers are used to make no-data pixels transparent. It leads to additional requests to server and more computations in browser. So, use this option if you really need it!

The following additional methods are available.

Method Description
setDate(date: Date) Set new date for multi-temporal layers
setTransparent(isTransparent: Boolean) Switch on/off transparency for no-data pixels. Works only if transparent option was explicitly set in constructor
isTemporal(): Boolean Returns true for multi-temporal layers

###Layers Metadata The list of all available GIBS Layers is available as L.GIBS_LAYERS hash. Keys are layer's IDs, values are the following objects:

  • title - layer's title
  • template - template of layer tiles
  • zoom - max zoom of the layer
  • date (Boolean) - is the layer multi-temporal

leaflet-gibs's People

Contributors

aparshin avatar joshua-irt avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.