公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
Map.style
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
返回地图的样式 ActiveDictionary,该样式可修改以更新地图的样式。
除了 ui.Panel.style() 文档中列出的标准界面 API 样式之外,地图还支持以下自定义样式选项:
- 光标,可以是“十字线”或“手”(默认)
用法 | 返回 |
---|
Map.style() | ui.data.ActiveDictionary |
无实参。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eThe \u003ccode\u003eMap.style()\u003c/code\u003e function grants access to the Map's style dictionary, enabling style modifications.\u003c/p\u003e\n"],["\u003cp\u003eCustom style options for the Map include setting the cursor to 'crosshair' or the default 'hand'.\u003c/p\u003e\n"],["\u003cp\u003eCalling \u003ccode\u003eMap.style()\u003c/code\u003e with no arguments returns a ui.data.ActiveDictionary object containing the current styles.\u003c/p\u003e\n"]]],["The `Map.style()` method returns an `ActiveDictionary` that controls the Map's visual styles. This `ActiveDictionary` can be directly modified to change these styles. In addition to standard UI API styles, the Map also allows customization of the cursor, which can be set to either 'crosshair' or 'hand', with 'hand' being the default. The method takes no arguments.\n"],null,["# Map.style\n\n\u003cbr /\u003e\n\nReturns the Map's style ActiveDictionary, which can be modified to update the Map's styles.\n\n\u003cbr /\u003e\n\nIn addition to the standard UI API styles listed in the ui.Panel.style() documentation, the Map supports the following custom style option:\n\n- cursor, which can be 'crosshair' or 'hand' (default)\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|---------------|--------------------------|\n| `Map.style()` | ui.data.ActiveDictionary |\n\n**No arguments.**"]]