Hello all! wondering if there is a way to make the Sketch widget create an equal-sided Square, instead of a Rectangle? the rectangle selection mode works great, but I need the selection to be a square.
Thanks again!
pvs
Thanks. however my polygon/rectangle Sketch does not seem to be affected by the shift key? but I will look into it further. thankyou!
glayer = new GraphicsLayer();
const sketch = new Sketch({layer: glayer,view: view,creationMode: "single",availableCreateTools: ["point", "polyline", "rectangle"],layout: "vertical",label:"select a drawing tool for "});
I don't think there's a documented way to automate this, but the user can hold the Shift key down while drawing with the rectangle tool, and it will force a square. This can be confirmed by using the Shift key in combination with the "Draw a rectangle" tool in this sample.
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.