Annuncio : tutti i progetti non commerciali registrati per l'utilizzo di Earth Engine prima del
15 aprile 2025 devono
verificare l'idoneità non commerciale per mantenere l'accesso. Se non hai eseguito la verifica entro il 26 settembre 2025, il tuo accesso potrebbe essere sospeso.
Invia feedback
ui.Thumbnail
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Un'immagine miniatura di dimensioni fisse generata in modo asincrono da un ee.Image.
Utilizzo Resi ui.Thumbnail(image , params , onClick , style )
ui.Thumbnail
Argomento Tipo Dettagli image
Immagine (facoltativa) L'ee.Image da cui generare la miniatura. Il valore predefinito è un ee.Image vuoto. params
Oggetto, facoltativo Per una spiegazione dei possibili parametri, vedi ui.Thumbnail.setParams(). Il valore predefinito è un oggetto vuoto. onClick
Funzione, facoltativa Un callback attivato quando viene fatto clic sulla miniatura. style
Oggetto, facoltativo Un oggetto di stili CSS consentiti con i relativi valori da impostare per questa etichetta. Il valore predefinito è un oggetto vuoto.
Esempi
Editor di codice (JavaScript)
// The goal is to create a series of thumbnail images for an elevation dataset
// with different backgrounds. The background layers and image visualization
// are previewed in the Code Editor map before creating the thumbnails.
// Define a black background.
var blackBg = ee . Image . rgb ( 0 , 0 , 0 )
. visualize ({ min : 0 , max : 255 });
Map . addLayer ( blackBg , {}, 'Black background' );
// Define a water / land background.
var waterLandBg = ee . Image ( 'NOAA/NGDC/ETOPO1' ). select ( 'bedrock' ). gt ( 0.0 )
. visualize ({ palette : [ 'cadetblue' , 'lightgray' ]});
Map . addLayer ( waterLandBg , {}, 'Water / land background' );
// A map display of a digital elevation model (DEM).
var image = ee . Image ( 'AU/GA/DEM_1SEC/v10/DEM-S' ). select ( 'elevation' )
. visualize ({
min : - 10.0 ,
max : 1300.0 ,
palette : [
'3ae237' , 'b5e22e' , 'd6e21f' , 'fff705' , 'ffd611' , 'ffb613' , 'ff8b13' ,
'ff6e08' , 'ff500d' , 'ff0000' , 'de0101' , 'c21301' , '0602ff' , '235cb1' ,
'307ef3' , '269db1' , '30c8e2' , '32d3ef' , '3be285' , '3ff38f' , '86e26f'
],
});
Map . addLayer ( image , {}, 'Elevation' );
// Set the center of the map.
var lon = 133.95 ;
var lat = - 24.69 ;
Map . setCenter ( lon , lat , 4 );
// Set the basic parameters for the thumbnail.
// Half-width of the thumbnail in degrees in EPSG:3857.
var delta = 22 ;
// Width and Height of the Thumbail image.
var pixels = 256 ;
var areaOfInterest = ee . Geometry . Rectangle (
[ lon - delta , lat - delta , lon + delta , lat + delta ], null , false );
var parameters = {
dimensions : [ pixels , pixels ],
region : areaOfInterest ,
crs : 'EPSG:3857' ,
format : 'png' };
// Create a thumbnail with no background fill.
// Masked pixels will be transparent.
print ( ui . Thumbnail ({ image : image , params : parameters }));
// Use a black background to replace masked image pixels.
var imageWithBlackBg = blackBg . blend ( image );
print ( ui . Thumbnail ({
image : imageWithBlackBg , params : parameters }));
// Use the water / land background to replace masked image pixels.
var imageWithWaterLandBg = waterLandBg . blend ( image );
print ( ui . Thumbnail ({
image : imageWithWaterLandBg , params : parameters }));
Invia feedback
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0 , mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0 . Per ulteriori dettagli, consulta le norme del sito di Google Developers . Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-26 UTC.
Vuoi dirci altro?
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-07-26 UTC."],[],[]]