TransWikia.com

Link ui.Thumbnail to external URL in Earth Engine?

Geographic Information Systems Asked by Eli Simonson on April 10, 2021

I figured out how to import logos into Earth Engine by following the link below..

Adding a logo to a panel on an app in Google Earth Engine?

I would now like to code the logo such that when it is clicked, it will open a new tab from the link provided. I believe this should be possible because onClick functions can be written for the thumbnail.

I have put together the following code…

// DEFINE MAIN APP PANEL
var main = ui.Panel({style: {width: '310px', padding: '8px'}});

// IMPORT LOGO
var logo = ee.Image("users/SE_FHM/Logos/Tall_Timbers_Logo")

// DEFINE WEB LINK FOR THUMBNAIL
var link = ui.Label('Tall Timbers Research Station', {},'https://www.talltimbers.org');

// CONVERT TO THUMBNAIL, INSERT ON CLICK FUNCTION TO OPEN UP THE WEB LINK
var branding = ui.Thumbnail({image:logo,params:{bands:['b1','b2','b3'],min:0,max:255},style:{width:'270px',height:'123px'}});

// ADD TO THE MAP
main.add(branding);
main.add(link)
ui.root.insert(0, main);

Link to full code

Are there any easy solutions to achieve this?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP