Google Earth Engine APP (GEE) - some minor bugs that will appear during the release of the GEE app

When we are in the process of writing applications, this means that we publish the code in GEE in the form of APP, because APP is an interactive interface, so when you want to add widgets on it , you need to get enlightenment, here we may have the correct result in the code editor, but in the process of publishing the APP, there will be different results, some widgets may not be displayed, here I want to show you A little reminder is that we do not load other codes in the process of adding widgets, such as determining the position of the center point of the map, or loading images, etc. Preface – Bed Length Artificial Intelligence Tutorial

Just like in the code below, the Map.centerObject(center,zoom) function will image the loading of the widgets below, which will cause problems when you add the corresponding controls later. That is, we need to reorganize the code, and finally add one control on the panel at a time to prevent errors. In addition, all our interactive operations should be placed in an encapsulated function as much as possible, and then called through the button, so that Errors can be prevented.

code:

var text3 = ui.Textbox({
	placeholder:"输入样样地生物量本点Assets路径:",
	value:"projects/ee-dalunwen/assets/total_samplepoints_image_APP_test2ALL",
	onChange:function (){
   return text3.getValue();
   },
//	disabled:,
	style:{width: '450px'},
})
pathpanel.add(text3)

//根据输入的样本点位置确定地图中心点
var center = ee.FeatureCol

Guess you like

Origin blog.csdn.net/qq_31988139/article/details/130072032