Announcement: All noncommercial projects registered to use Earth Engine before
April 15, 2025 must
verify noncommercial eligibility to maintain Earth Engine access.
ui.Map.GeometryLayer.setShown
Stay organized with collections
Save and categorize content based on your preferences.
Sets the visibility of shapes in the layer.
Returns this map layer.
Usage | Returns | GeometryLayer.setShown(shown) | ui.Map.GeometryLayer |
Argument | Type | Details | this: ui.map.geometrylayer | ui.Map.GeometryLayer | The ui.Map.GeometryLayer instance. |
shown | Boolean | Whether the layer is shown. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[[["\u003cp\u003eThe \u003ccode\u003esetShown()\u003c/code\u003e method controls the visibility of shapes within a GeometryLayer on the map.\u003c/p\u003e\n"],["\u003cp\u003eIt takes a boolean argument, \u003ccode\u003eshown\u003c/code\u003e, to determine if the layer should be visible or hidden.\u003c/p\u003e\n"],["\u003cp\u003eCalling this method returns the \u003ccode\u003eui.Map.GeometryLayer\u003c/code\u003e instance, allowing for method chaining.\u003c/p\u003e\n"]]],["The `GeometryLayer.setShown(shown)` method controls the visibility of shapes within a map layer. It takes a boolean argument, `shown`, which determines if the layer is visible (true) or hidden (false). This method, when called on a `ui.Map.GeometryLayer` instance, returns the same `ui.Map.GeometryLayer` instance, allowing for method chaining.\n"],null,["# ui.Map.GeometryLayer.setShown\n\n\u003cbr /\u003e\n\nSets the visibility of shapes in the layer.\n\n\u003cbr /\u003e\n\nReturns this map layer.\n\n| Usage | Returns |\n|---------------------------------|----------------------|\n| GeometryLayer.setShown`(shown)` | ui.Map.GeometryLayer |\n\n| Argument | Type | Details |\n|------------------------------|----------------------|------------------------------------|\n| this: `ui.map.geometrylayer` | ui.Map.GeometryLayer | The ui.Map.GeometryLayer instance. |\n| `shown` | Boolean | Whether the layer is shown. |"]]