/ Published in: Other
Expand |
Embed | Plain Text
var locations=new Array(3); for (i=0; i <3; i++){ locations[i]=new Array(3); } locations[0][0]="dumap"; locations[0][1]="56.467043"; locations[0][2]="-2.864299"; locations[1][0]="edmap"; locations[1][1]="55.936787"; locations[1][2]="-3.208029"; locations[2][0]="inmap"; locations[2][1]="57.479016"; locations[2][2]="-4.224894"; for (i=0; i<locations.length; i++){ var el = locations[i][0]; if ($('#'+el).length){ var myLatlng = new google.maps.LatLng(locations[i][1],locations[i][2]); var myOptions = { zoom: 11, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById(el), myOptions); var marker = new google.maps.Marker( { position: myLatlng, map: map, title:"KLMP" }); } }
You need to login to post a comment.
