Created
January 9, 2017 13:24
-
-
Save gabcarvalhogama/df8288be267e78a7e8fbf6066a738a23 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for(i = 0; i < res.length; i++){ | |
var marker = new google.maps.Marker({ | |
position: {lat: parseFloat(res[i].latHotel), lng: parseFloat(res[i].lngHotel)}, | |
draggable: true, | |
animation: google.maps.Animation.DROP, | |
map: map, | |
icon: image, | |
title: res[i].nameHotel | |
}); | |
google.maps.event.addListener(marker, 'click', function(){ | |
window.location.href = "hotel/"+marker.title; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment