ui.Map.DrawingTools.setShape
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Définit la forme du mode dessin et démarre le mode dessin. Les formes disponibles en mode dessin sont les suivantes : point, ligne, polygone et rectangle.
Renvoie cet ensemble d'outils de dessin.
Utilisation | Renvoie |
---|
DrawingTools.setShape(shape) | ui.Map.DrawingTools |
Argument | Type | Détails |
---|
ceci : ui.map.drawingtools | ui.Map.DrawingTools | Instance ui.Map.DrawingTools. |
shape | Chaîne | Forme à dessiner. |
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/29 (UTC).
[null,null,["Dernière mise à jour le 2025/07/29 (UTC)."],[[["\u003cp\u003eEnables users to initiate drawing mode on a map with selectable shapes like points, lines, polygons, and rectangles.\u003c/p\u003e\n"],["\u003cp\u003eProvides a method (\u003ccode\u003esetShape\u003c/code\u003e) to specify the desired shape for drawing, accepting a string argument representing the shape type.\u003c/p\u003e\n"],["\u003cp\u003eReturns the DrawingTools instance, allowing for method chaining and further customization.\u003c/p\u003e\n"]]],["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"],null,["# ui.Map.DrawingTools.setShape\n\n\u003cbr /\u003e\n\nSets the draw mode shape and starts draw mode. The available draw mode shapes are: point, line, polygon, and rectangle.\n\n\u003cbr /\u003e\n\nReturns this set of drawing tools.\n\n| Usage | Returns |\n|--------------------------------|---------------------|\n| DrawingTools.setShape`(shape)` | ui.Map.DrawingTools |\n\n| Argument | Type | Details |\n|-----------------------------|---------------------|-----------------------------------|\n| this: `ui.map.drawingtools` | ui.Map.DrawingTools | The ui.Map.DrawingTools instance. |\n| `shape` | String | The shape to draw. |"]]