If I create a dot on Google Maps like this:
function initialize() {
var myLatlng = new google.maps.LatLng(-28.457122, -52.197458);
var mapOptions = {
zoom: 15,
center: myLatlng
};
var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
var contentString = '<div id="content">'+
'<div id="siteNotice">'+
'</div>'+
'<h1 id="firstHeading" class="firstHeading">Hello</h1>'+
'<div id="bodyContent">'+
'Hello World '+
'</div>'+
'</div>';
var infowindow = new google.maps.InfoWindow({
content: contentString
});
var image = 'pin.png';
var marker = new google.maps.Marker({
position: myLatlng,
map: map,
icon: image,
title: 'Hello'
});
google.maps.event.addListener(marker, 'click', function() {
infowindow.open(map,marker);
});
}
Is it possible to create one more point in the same function?
Do I have to do another role?
How to do it?