公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.data.authenticateViaPopup
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
显示一个弹出式窗口,请求用户授予权限。仅当 ee.data.authenticate() 之前调用过其 opt_onImmediateFailed 实参时,才应调用此方法。
如果在用户启动的处理程序之外调用,可能会被弹出式内容拦截器阻止。
用法 | 返回 |
---|
ee.data.authenticateViaPopup(success, error) | |
参数 | 类型 | 详细信息 |
---|
success | 函数(可选) | 如果身份验证成功,要调用的函数。 |
error | 函数(可选) | 如果身份验证失败,则要调用的函数,并传递错误消息。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eThis function triggers a popup for user authentication, but only if a previous authentication attempt failed.\u003c/p\u003e\n"],["\u003cp\u003ePopup blockers may prevent the authentication popup if not initiated by a user action.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eee.data.authenticateViaPopup()\u003c/code\u003e allows specifying success and error callback functions.\u003c/p\u003e\n"]]],[],null,["# ee.data.authenticateViaPopup\n\n\u003cbr /\u003e\n\nShows a popup asking for the user's permission. Should only be called if ee.data.authenticate() called its opt_onImmediateFailed argument in the past.\n\n\u003cbr /\u003e\n\nMay be blocked by pop-up blockers if called outside a user-initiated handler.\n\n| Usage | Returns |\n|---------------------------------------------------------|---------|\n| `ee.data.authenticateViaPopup(`*success* `, `*error*`)` | |\n\n| Argument | Type | Details |\n|-----------|--------------------|--------------------------------------------------------------------------|\n| `success` | Function, optional | The function to call if authentication succeeds. |\n| `error` | Function, optional | The function to call if authentication fails, passing the error message. |"]]