<script type="text/javascript">
var map;
var infowindow;
var k =0
var lat = [28.6312870,28.634244 ,28.634401,28.626969]
var lang =[77.2270520, 77.22220300000004, 77.222125,77.22228300000006]
var destination =['Lalit House', 'Nirulas', 'Costa Coffee','British Council']
function initialize()
{
var pyrmont = new google.maps.LatLng(28.6312870, 77.2270520);
map = new google.maps.Map(document.getElementById('googleMap'), {
mapTypeId: google.maps.MapTypeId.ROADMAP,
center: pyrmont,
zoom: 15
});
infowindow = new google.maps.InfoWindow();
var service = new google.maps.places.PlacesService(map);
var placeLoc = '(28.6312870, 77.2270520)';
for(var i =0 ; i< lat.length; i++)
{
if(i < lang.length){
for(var j =0 ; j < lang.length; j++)
{
var items = new google.maps.LatLng(lat[i++],lang[j])
if(j< destination.length){
createMarker(items,destination[k])
}
k++;
}
}
}
}
function createMarker(place,name)
{
var marker = new google.maps.Marker({ map: map, position:place });
google.maps.event.addListener(marker, 'click', function()
{
infowindow.setContent(name+"<div><a href=\"\">More Info</a></div>");
infowindow.open(map, this);
});
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
<div id="googleMap" style="width:400px; height:300px;" runat="server"></div>
var map;
var infowindow;
var k =0
var lat = [28.6312870,28.634244 ,28.634401,28.626969]
var lang =[77.2270520, 77.22220300000004, 77.222125,77.22228300000006]
var destination =['Lalit House', 'Nirulas', 'Costa Coffee','British Council']
function initialize()
{
var pyrmont = new google.maps.LatLng(28.6312870, 77.2270520);
map = new google.maps.Map(document.getElementById('googleMap'), {
mapTypeId: google.maps.MapTypeId.ROADMAP,
center: pyrmont,
zoom: 15
});
infowindow = new google.maps.InfoWindow();
var service = new google.maps.places.PlacesService(map);
var placeLoc = '(28.6312870, 77.2270520)';
for(var i =0 ; i< lat.length; i++)
{
if(i < lang.length){
for(var j =0 ; j < lang.length; j++)
{
var items = new google.maps.LatLng(lat[i++],lang[j])
if(j< destination.length){
createMarker(items,destination[k])
}
k++;
}
}
}
}
function createMarker(place,name)
{
var marker = new google.maps.Marker({ map: map, position:place });
google.maps.event.addListener(marker, 'click', function()
{
infowindow.setContent(name+"<div><a href=\"\">More Info</a></div>");
infowindow.open(map, this);
});
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
<div id="googleMap" style="width:400px; height:300px;" runat="server"></div>