Added a function to clear data of polygons array.