Last active
May 8, 2017 09:11
-
-
Save lenafaure/5d91bea9d6cd91698dbbb23eb7db3db3 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
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'), { | |
center: paris, | |
zoom: 13, | |
styles: [{ | |
stylers: [{ visibility: 'simplified' }] | |
}, { | |
elementType: 'labels', | |
stylers: [{ visibility: 'off' }] | |
}] | |
}); | |
infowindow = new google.maps.InfoWindow(); | |
var populationOptions = { | |
strokeColor: '#FF0000', | |
strokeOpacity: 0.1, | |
strokeWeight: 2, | |
fillColor: '#FF0000', | |
fillOpacity: 0.075, | |
map: map, | |
center: paris, | |
radius: 7000 | |
}; | |
// Add the circle for this city to the map. | |
cityCircle = new google.maps.Circle(populationOptions); | |
// Call the Places API Web Service | |
var service = new google.maps.places.PlacesService(map); | |
// Initiate Radar Search | |
service.radarSearch({ | |
location: paris, | |
radius: 7000, | |
keyword: searchwords | |
}, callback); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment