Spatial Data Access Tool (SDAT)
OGC Standards-based Geospatial Data Visualization/Download
[+] Help >> Use ORNL DAAC WMS Service in Google Map Applications
Use ORNL DAAC WMS Service in Google Map Applications
Tutorial
- Include necessary Javascript libraries in your webpage
<script src='http://maps.google.com/maps?file=api&v=2&key=YOUR_GOOGLE_API_KEY'></script>
<script src='/wcsdown/js/wms_gmap.js'></script>
- Add WMS layers to your GMap2 object
function addWMSLayer(layer_name, layer_title, isdefault) {
var WMS_URL = 'http://webmap.ornl.gov/ogcbroker/wms?'; // ORNL DAAC WMS Server URL
var WMS_LAYER = createWMSTileLayer(WMS_URL, layer_name, null, "image/png", null, null, null, .5);
var WMS_LAYER_OVERLAY = createWMSOverlayMapType([G_NORMAL_MAP.getTileLayers()[0], WMS_LAYER], layer_title);
WMS_LAYER_OVERLAY.layer = layer_name;
map.addMapType(WMS_LAYER_OVERLAY);
if (isdefault) {
map.setMapType(WMS_LAYER_OVERLAY);
}
}
addWMSLayer("10004_31", "MODIS Land Cover", true);
Demo: Add ORNL DAAC MODIS land cover layer to Google Map application