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
var map; | |
var infowindow; | |
// Defining the keywords for filtering the search | |
var searchwords = "agence+web"; | |
// Initiate Map | |
function initMap() { | |
var paris = {lat: 48.8704907, lng: 2.3309359}; | |
map = new google.maps.Map(document.getElementById('map'), { |
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
// Create array for storing results | |
var agencies = []; | |
function callback(results, status) { | |
if (status === google.maps.places.PlacesServiceStatus.OK) { | |
for (var i = 0; i < results.length; i++) { | |
//Fetch the ID of each Place returned by the Radar Search | |
var request = { |
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
// Using setTimeout and closure to overcome limit of 10 queries / second for getDetails | |
(function (j) { | |
var request = { | |
placeId: results[i]['place_id'] | |
}; | |
service = new google.maps.places.PlacesService(map); |
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
var map; | |
var infowindow; | |
var searchwords = "agence+web"; | |
// Initiate Map | |
function initMap() { | |
var paris = {lat: 48.8704907, lng: 2.3309359}; | |
map = new google.maps.Map(document.getElementById('map'), { | |
center: paris, |
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
rockStar = “Mick Jagger”; | |
var rockStar; | |
console.log(rockStar); // Prints “Mick Jagger” |
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
console.log(rockStar); // Prints “undefined” | |
var rockStar = “Mick Jagger”; |
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
var rockStar; | |
rockStar = “Mick Jagger”; |
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
var rockStar; | |
console.log(rockStar); | |
rockStar = “Mick Jagger”; |
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
movieStar(); | |
function movieStar() { | |
var name = “Meryl Streep”; | |
console.log(name); | |
} |
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
function movieStar() { // function declaration is moved to the top of the global scope | |
var name; // variable declaration is moved to the top of the local scope | |
name = “Meryl Streep”; // variable assignement is left in place | |
console.log(name); | |
} | |
movieStar(); // Prints “Meryl Streep” |
OlderNewer