// CH4 มีเทน var c = ee.FeatureCollection('USDOS/LSIB_SIMPLE/2017').filter(ee.Filter.eq('country_na', 'Thailand')); //Map.addLayer(geometry); var collection = ee.ImageCollection("COPERNICUS/S5P/OFFL/L3_CH4") .select('CH4_column_volume_mixing_ratio_dry_air') .filterDate('2021-01-01', '2021-12-31'); var vis = { min: 1800, max: 2000, palette: ['black', 'blue', 'purple', 'cyan', 'green', 'yellow', 'red'] }; Map.addLayer(collection.mean().clip(c),vis); /* * Legend setup */ // Creates a color bar thumbnail image for use in legend from the given color // palette. function makeColorBarParams(palette) { return { bbox: [0, 0, 1, 0.1], dimensions: '100x10', format: 'png', min: 0, max: 1, palette: palette, }; } // Create the color bar for the legend. var colorBar = ui.Thumbnail({ image: ee.Image.pixelLonLat().select(0), params: makeColorBarParams(vis.palette), style: {stretch: 'horizontal', margin: '0px 8px', maxHeight: '24px'}, }); // Create a panel with three numbers for the legend. var legendLabels = ui.Panel({ widgets: [ ui.Label(vis.min, {margin: '4px 8px'}), ui.Label( (vis.max / 2), {margin: '4px 8px', textAlign: 'center', stretch: 'horizontal'}), ui.Label(vis.max, {margin: '4px 8px'}) ], layout: ui.Panel.Layout.flow('horizontal') }); var legendTitle = ui.Label({ value: 'Map Legend: CH4 column volume mixing ratio dry_air (ppm)', style: {fontWeight: 'bold'} }); // Add the legendPanel to the map. var legendPanel = ui.Panel([legendTitle, colorBar, legendLabels]); Map.add(legendPanel); Map.centerObject(c,5.5); Map.setOptions('SATELLITE');