1
If I create a point 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);
});
}
It is possible in the same function to create 1 more point?
I have to do another function?
How to do?