| Current Path : /var/www/html/nadineandmiabeauty/js/ |
| Current File : //var/www/html/nadineandmiabeauty/js/map-active.js |
var map;
var latlng = new google.maps.LatLng(34.0522, 118.2437);
var stylez = [{
featureType: "all",
elementType: "all",
stylers: [{
saturation: 0
}]
}];
var mapOptions = {
zoom: 13,
center: latlng,
scrollwheel: false,
scaleControl: false,
disableDefaultUI: true,
mapTypeControlOptions: {
mapTypeIds: [google.maps.MapTypeId.ROADMAP, 'gMap']
}
};
map = new google.maps.Map(document.getElementById("googleMap"), mapOptions);
var geocoder_map = new google.maps.Geocoder();
var address = 'Los Angeles';
geocoder_map.geocode({
'address': address
}, function (results, status) {
if (status == google.maps.GeocoderStatus.OK) {
map.setCenter(results[0].geometry.location);
var marker = new google.maps.Marker({
map: map,
icon: '',
position: map.getCenter(),
animation: google.maps.Animation.BOUNCE,
});
} else {
alert("Geocode was not successful for the following reason: " + status);
}
});
var mapType = new google.maps.StyledMapType(stylez, {
name: "Grayscale"
});
map.mapTypes.set('gMap', mapType);
map.setMapTypeId('gMap');