当前位置:网站首页>Google Earth engine (GEE) - how to add a legend in the map panel

Google Earth engine (GEE) - how to add a legend in the map panel

2022-06-24 11:19:00 The star light blog in 2021 cloud computing top3

Here we will use a familiar knowledge to add the legend to the panel , In this way, we can better identify what kind of ground objects are in the process of online map reading :

The functions required here :

ui.Panel(widgetslayoutstyle)
A widget that can hold other widgets . Use panels to build complex assemblies of nested assemblies .

Panels can be added to ui.root in , But it can't be used. print() Print to console .

Parameters .
widgets (List<ui.Widget>|ui.Widget, optional):
List of components to be added to the panel or individual components . The default is an empty array .

layout (String|ui.Panel.Layout, optional):
The layout to be used for this panel . If you pass in a string , It will be used as a shortcut to the layout constructor of that name . The default is 'flow'.

style (Object, optional):
One allowed CSS Style objects , Its value should be set for this widget . See style() file .

return : ui.Panel

ui.Panel.Layout.flow(directionwrap)
Return to a layout , The layout places its components in a flow , Whether horizontal or vertical .

By default , Widgets occupy their natural space in a flow layout panel . Set... On an added part " The tensile " Style attribute , To stretch it to fill the available space in the relevant direction .

level 、 vertical 、 both
When more than one widget When stretched , The available space is divided equally between them . A panel is the widget itself , Sure

原网站

版权声明
本文为[The star light blog in 2021 cloud computing top3]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/175/202206240958064424.html