Select Data in Drawn Rectangle Sample This sample shows how to use the drawing tools to draw a rectangle search area on the map and then search for all shapes on the map that are within that rectangle. The drawing tools currently does not provide a rectangle drawing function, however, this code sample extends the drawing tools and provides a rectangle drawing function.