I am working in joomla 2.5 and I have to create a module for Google map and using Google map api v2.
and I am using geocoder = new GClientGeocoder(); but it is now working
output image:- 
My html <div> tag
<div id="map_canvas" style="width: 800px; height:800px;"></div>
My script
<script>
//<![CDATA[
var map = null;
var geocoder = null;
function initialize() {
if (GBrowserIsCompatible()) {
//calls map to appear inside <div> with id, "map_canvas"
map = new GMap2(document.getElementById("map_canvas"));
//adds zoom and arrow controls to map
geocoder = new GClientGeocoder();
map.setMapType(G_SATELLITE_MAP);
var allAddress = "Dubai~Abu Dhabi";
var addresses = new Array();
addresses = allAddress.split("~");
var curIndex = 0;
function showAddress() {
var _cur = addresses[curIndex];
geocoder.getLatLng(
_cur,
function(point) {
alert(_cur);
if (!point) {
alert(_cur + " not found");
} else {
alert(_cur+":"+point);
}
//do next after done
curIndex++;
if(curIndex<addresses.length)
showAddress();
}
);
}
showAddress();
}
}
//]]>
</script>
See below code and try it.
I am using php static array you can connect your database and create array according your requirement. see the array below.
Below My Code Take a look.