Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var twitterId = venue.contact.twitter;
- if (twitterId !== null && twitterId !== undefined) {
- self.foursquareInfo += 'twitter: @' +
- twitterId + '<br>';
- }
- })
- // Fail message for Foursquare API
- .fail(function(error){
- alert("Foursquare API has failed");
- });
- };
- /*
- Function that will pan to the position and open an info window of an item clicked in the list.
- */
- self.clickMarker = function(place) {
- var marker;
- for(var e = 0; e < markersArray.length; e++) {
- if(place.place_id === markersArray[e].place_id) {
- marker = markersArray[e];
- break;
- }
- }
- self.getFoursquareInfo(place);
- map.panTo(marker.position);
- // waits 300 milliseconds for the getFoursquare async function to finish
- setTimeout(function() {
- var contentString = '<div style="font-weight: bold">' + place.name + '</div><div>' + place.address + '</div>' + self.foursquareInfo;
- infowindow.setContent(contentString);
- infowindow.open(map, marker);
- marker.setAnimation(google.maps.Animation.DROP);
- }, 300);
- }
- }
- google.maps.event.addDomListener(window, 'load', initialize);
Add Comment
Please, Sign In to add comment