I am working on a land use land cover analysis using GEE. I have written my code to visualize the area of interest imagery in my map. The image shows on my map layers but it is not loading one my UI. Here is the code.
var boundary = ee.FeatureCollection('users/Angwenyi/Laikipia_Samburu_Ecosystem_Boundary');
var geometry = boundary.geometry();
// Zoom to selected district
Map.centerObject(geometry, 5);
Map.addLayer(geometry);
var startDate = '2022-01-01';
var endDate = '2022-02-27';
// identify the Landsat 8 Surface Reflectance Tier 1 product
var l8 = ee.ImageCollection('LANDSAT/LC08/C01/T1_SR');
// set up the cloud masking function
function maskL8srClouds(image) {
// Bits 3 and 5 are cloud shadow and cloud, respectively.
var cloudShadowBitMask = (1 << 3);
var cloudsBitMask = (1 << 5);
// Get the pixel QA band.
var qa = image.select('pixel_qa');
// Both flags should be set to zero, indicating clear conditions.
var mask = qa.bitwiseAnd(cloudShadowBitMask).eq(0)
.and(qa.bitwiseAnd(cloudsBitMask).eq(0));
return image.updateMask(mask);
}
// build the basic composite
var l8compositeMasked = l8.filterDate(startDate,endDate)
.filterMetadata('CLOUD_COVER','less_than',50)
.map(maskL8srClouds)
.median();
// Add visualization dictionary. Note that one can change
// the min and max values for the stretch for each of the three bands.
var L8_754_viz = {bands:['B7', 'B5', 'B4'], min:[500,500,500], max:[2000,4500,1500]}
// now add the image to the map
Map.addLayer(l8compositeMasked,L8_754_viz,'Landsat 8 composite masked');
What can I do to display my raster?