I need to implement a rectangle selection feature and I'm looking for some examples.
I've seen and implemented something using the EditInteractiveOverlay in the past, where we explicitly added a rectangular feature, and then the user clicked on either the corners for resize or a rotation helper. Then, the user needed to do some other explicit action to hide this feature.
What we're more interested in is similar to the zoom box that's seen when the user holds down the shift key. We want to have a button that puts the user into a selection mode and, when the user clicks on the map and drags with the mouse down, a rectangle appears. Then when the user lets go of the mouse, some callback is called so that we can go and apply our selection logic. As you can see, this is very similar to the zoom box feature.
I am not very sure what your requirement is but I found some samples that maybe help you.
You are interested in the zoom box which is a rectangle shape, you can track the same shape by using TrackInteractiveOverlay, and you can look at our HowDoI sample “Track and Edit Shapes”.
There is a sample in our Code Community shows how to track zoom in without shift. If you can not compile, please get rid of the reference of WorldMapKitWms.DLL. code.thinkgeo.com/projects/show/trackzoomwithout
Please provide more information for your requirement and we can create more precise sample code for you.