Skip to content

Instantly share code, notes, and snippets.

@enlacee
Created February 22, 2013 16:24
Show Gist options
  • Save enlacee/5014605 to your computer and use it in GitHub Desktop.
Save enlacee/5014605 to your computer and use it in GitHub Desktop.
<script type="text/javascript"
src="http://maps.googleapis.com/maps/api/js?key=AIzaSyCJHoCLJb_K0TPxWagrigvltvi33-lhpDU&sensor=false">
</script>
<script type ="text/javascript">
function initialize() {
// marcas padre
var mapOptions = {
zoom: 6,
center: new google.maps.LatLng(-25.363882,131.044922),
mapTypeId: google.maps.MapTypeId.ROADMAP,
}
var map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
// marcas hijo
var arrayll = new Array();
arrayll.push(new google.maps.LatLng(-25.363882,131.044922));
arrayll.push(new google.maps.LatLng(-10.363882,15.044922));
//pintar all
for(i=0;i<arrayll.length;i++){
var marker = new google.maps.Marker({
position: arrayll[i],
title:"Hello World!"
});
marker.setMap(map);
console.log("pintadoo",i);
//infowindow.open(map,marker);
}
// var infowindow = new google.maps.InfoWindow({
// content: contentString
// });
// infowindow.setContent(contentString);
// infowindow.setPosition(event.latLng);
// infowindow.open(map);
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment