Draw Polygon and Select Data This sample shows how to draw a polygon on the map using the Polygon Drawing tools and then use the generated polygon to calculate all pins on the map that intersect with that polygon. Turf.js is used to provide the spatial intersection calculation. Press the "Draw Polygon" then start selecting points on the map. When you are done, either click on the first point of the polygon or press ESC.