Announcement: All noncommercial projects registered to use Earth Engine before
April 15, 2025 must
verify noncommercial eligibility to maintain Earth Engine access.
ui.Map.Layer.setOpacity
Stay organized with collections
Save and categorize content based on your preferences.
Sets the opacity of the layer.
Returns this map layer.
Usage | Returns | Layer.setOpacity(opacity) | ui.Map.AbstractLayer |
Argument | Type | Details | this: ui.map.abstractlayer | ui.Map.AbstractLayer | The ui.Map.AbstractLayer instance. |
opacity | Number, optional | The layer's opacity represented as a number between 0 and 1. |
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\u003eSets the opacity of the specified map layer, with a value between 0 and 1 representing transparent and opaque, respectively.\u003c/p\u003e\n"],["\u003cp\u003eReturns the \u003ccode\u003eui.Map.AbstractLayer\u003c/code\u003e instance, allowing for method chaining.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003esetOpacity()\u003c/code\u003e method is called on a \u003ccode\u003eui.Map.AbstractLayer\u003c/code\u003e object and optionally accepts a numerical opacity value.\u003c/p\u003e\n"]]],[],null,["# ui.Map.Layer.setOpacity\n\n\u003cbr /\u003e\n\nSets the opacity of the layer.\n\n\u003cbr /\u003e\n\nReturns this map layer.\n\n| Usage | Returns |\n|---------------------------------|----------------------|\n| Layer.setOpacity`(`*opacity*`)` | ui.Map.AbstractLayer |\n\n| Argument | Type | Details |\n|------------------------------|----------------------|--------------------------------------------------------------|\n| this: `ui.map.abstractlayer` | ui.Map.AbstractLayer | The ui.Map.AbstractLayer instance. |\n| `opacity` | Number, optional | The layer's opacity represented as a number between 0 and 1. |"]]