Using a map tool to draw polygons or lines on the canvas