This is the code for each marker having different characters
var marker=[
{
"title": ".vc",
"lat":13.253383500000000000,
"lng":-61.196250999999960000,
"description": "(.vc)Saint Vincent and the Grenadines,Ministry of Telecommunications,Science, Technology and Industry"
},
{
"title": ".ve",
"lat":10.4794485,
"lng":-66.85575110000002,
"description": "(.ve)Venezuela,CONATEL"
}];
var mapOptions = {
center: new google.maps.LatLng(-34.397, 150.644 ),
zoom: 5
};
var infoWindow = new google.maps.InfoWindow();
var map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
for (i = 0; i < markers.length; i++) {
var data = markers[i]
var myLatlng = new google.maps.LatLng(data.lat, data.lng);
var pinIcon = new google.maps.MarkerImage(
"http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld="+data.title+"|90EE90",
null, /* size is determined at runtime */
null, /* origin is 0,0 */
null, /* anchor is bottom center of the scaled image */
new google.maps.Size(20, 30)); /* Size given in CSS Length units */
var marker = new google.maps.Marker({
position: myLatlng,
map: map,
icon:pinIcon,
title: data.title
});
(function(marker, data) {
// Attaching a click event to the current marker
google.maps.event.addListener(marker, "click", function(e) {
infoWindow.setContent(data.description);
infoWindow.open(map, marker);
});
})(marker, data);
}
}