The Map.clearGeometry function removes all the Geometry currently on the Map object named map_name. Note that this clears only Geometry added using the Map.addGeometry function. Markers added to the map using Map.addMarker should be cleared using the function Map.clearMarkers.