Announcement: All noncommercial projects registered to use Earth Engine before
April 15, 2025 must
verify noncommercial eligibility to maintain Earth Engine access.
ui.Map.DrawingTools.setShape
Sets the draw mode shape and starts draw mode. The available draw mode shapes are: point, line, polygon, and rectangle.
Returns this set of drawing tools.
Usage | Returns | DrawingTools.setShape(shape) | ui.Map.DrawingTools |
Argument | Type | Details | this: ui.map.drawingtools | ui.Map.DrawingTools | The ui.Map.DrawingTools instance. |
shape | String | The shape to draw. |
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."],[[["Enables users to initiate drawing mode on a map with selectable shapes like points, lines, polygons, and rectangles."],["Provides a method (`setShape`) to specify the desired shape for drawing, accepting a string argument representing the shape type."],["Returns the DrawingTools instance, allowing for method chaining and further customization."]]],["The `DrawingTools.setShape(shape)` method configures the drawing tool's shape (point, line, polygon, or rectangle) and activates draw mode. It accepts a string argument specifying the desired shape and returns the `ui.Map.DrawingTools` instance, allowing for method chaining. This method is used to select the shape to draw and initiate the drawing process.\n"]]