I created an example of a Google Map application where you can plot markers on the map by specifying coordinates.

Creating markers is fairly simple:
1. Create a new instance of GLatLng object. The GLatLng holds the coordinates of your marker.
// create new location object
var location = new GLatLng(latitude, longitude);
2. Create a new instance of GMarker with the GLatLng object.
// place new marker
var marker = new GMarker(location);
3. Use the addOverlay method to create a new overlay in the map.
map.addOverlay(marker);
Just like we add an overlay to create a marker, we clear a marker by removing an overlay.
map.removeOverlay(markersArray[idx]);
The markersArray[idx] is the GMarker we would like to remove. If you are not using an array to keep your markers, you can pass in an instance of GMarker directly.