Here is my code(most code from Google\'s API page).
This may not be the initial doubt, but to clear the markers and other components of the map, just before loading the map and its components put:
map.clear ();