Skip to content

Instantly share code, notes, and snippets.

@lenafaure
Last active May 8, 2017 09:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lenafaure/5d91bea9d6cd91698dbbb23eb7db3db3 to your computer and use it in GitHub Desktop.
Save lenafaure/5d91bea9d6cd91698dbbb23eb7db3db3 to your computer and use it in GitHub Desktop.
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