Create a gist now

Instantly share code, notes, and snippets.

Embed
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