Map.addLayer

একটি স্তর হিসাবে মানচিত্রে একটি প্রদত্ত EE অবজেক্ট যোগ করে।

নতুন মানচিত্র স্তর প্রদান করে।

ব্যবহার রিটার্নস
Map.addLayer(eeObject, visParams , name , shown , opacity ) ui.Map.Layer
যুক্তি টাইপ বিস্তারিত
eeObject সংগ্রহ|বৈশিষ্ট্য|ইমেজ|RawMapId মানচিত্রে যোগ করার জন্য বস্তু।
visParams ফিচার ভিজ্যুয়ালাইজেশন প্যারামিটার| ইমেজ ভিজ্যুয়ালাইজেশন প্যারামিটার, ঐচ্ছিক ভিজ্যুয়ালাইজেশন পরামিতি। ইমেজ এবং ইমেজ কালেকশনের জন্য, বৈধ প্যারামিটারের জন্য ee.data.getMapId দেখুন। বৈশিষ্ট্য এবং বৈশিষ্ট্য সংগ্রহের জন্য, একমাত্র সমর্থিত কী হল "রঙ", একটি CSS 3.0 রঙের স্ট্রিং বা "RRGGBB" বিন্যাসে একটি হেক্স স্ট্রিং। eeObject একটি মানচিত্র ID হলে উপেক্ষা করা হয়।
name স্ট্রিং, ঐচ্ছিক স্তরটির নাম। ডিফল্ট "লেয়ার এন"।
shown বুলিয়ান, ঐচ্ছিক একটি পতাকা নির্দেশ করে যে স্তরটি ডিফল্টরূপে চালু থাকা উচিত কিনা।
opacity নম্বর, ঐচ্ছিক স্তরটির অস্বচ্ছতা 0 এবং 1 এর মধ্যে একটি সংখ্যা হিসাবে উপস্থাপিত। ডিফল্ট 1 থেকে।

উদাহরণ

কোড এডিটর (জাভাস্ক্রিপ্ট)

// A Sentinel-2 surface reflectance image.
var image = ee.Image('COPERNICUS/S2_SR/20210109T185751_20210109T185931_T10SEG');
Map.setCenter(-121.87, 37.44, 9);

// Set multi-band RGB image visualization parameters. If the "bands" parameter
// is not defined, the first three bands are used.
var rgbVis = {
  bands: ['B11', 'B8', 'B3'],
  min: 0,
  max: 3000
};
Map.addLayer(image, rgbVis, 'Multi-band RGB image');

// Set band-specific "min" and "max" properties.
var rgbVisBandSpec = {
  bands: ['B11', 'B8', 'B3'],
  min: [0, 75, 150],
  max: [3500, 3000, 2500]
};
Map.addLayer(image, rgbVisBandSpec, 'Band-specific min/max');

// If you don't specify "min" and "max" properties, they will be determined
// from the data type range, often resulting in an ineffective color stretch.
Map.addLayer(image.select('B8'), null, 'Default visParams');

// If an image layer has already been styled, set "visParams" as null.
var imageRgb = image.visualize(rgbVis);
Map.addLayer(imageRgb, null, 'Pre-styled image');

// Use the "palette" parameter with single-band image inputs to define the
// linear color gradient to stretch between the "min" and "max" values.
var singleBandVis = {
  min: 0,
  max: 3000,
  palette: ['blue', 'yellow', 'green']
};
Map.addLayer(image.select('B8'), singleBandVis, 'Single-band palette');

// Images within ImageCollections are automatically mosaicked according to mask
// status and image order. The last image in the collection takes priority,
// invalid pixels are filled by valid pixels in preceding images.
var imageCol = ee.ImageCollection('COPERNICUS/S2_SR')
                   .filterDate('2021-03-01', '2021-04-01');
Map.addLayer(imageCol, rgbVis, 'ImageCollection mosaic');

// FeatureCollection, Feature, and Geometry objects can be styled using the
// "color" parameter.
var featureCol = ee.FeatureCollection('WCMC/WDPA/current/polygons');
Map.addLayer(featureCol, {color: 'purple'}, 'FeatureCollection');