[net6] Winforms Map

Posted by: cnoelle on 28 October 2022, 5:47 am EST

    • Post Options:
    • Link

    Posted 28 October 2022, 5:47 am EST

    How can I draw a rectangle with the mouse?

    Regards

  • Posted 1 November 2022, 1:50 pm EST

    Hi,

    You can extend the C1Map and override the OnMouseDown, OnMouseMove, and OnMouseUp events to detect dragging and the initial and final point. Then in MouseUp, you can add a VectorPolygon according to the points.

    Please refer to the sample attached that adds a rectangle to the Map if you drag Mouse while holding the Control key.

    Regards

    Avnish

    C1Map_CreateRect.zip

  • Posted 6 November 2022, 5:36 pm EST

    Thanks, this is the straightforward way.

    I added a rubberbox for better targeting.

    Regards,

    Chris

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels