I used this in lightning component but i got error
var latlng = new google.maps.LatLng(lat, lon);
var geocoder =new google.maps.Geocoder();
geocoder.geocode({ 'latLng': latlng },
function (results, status) {
if (status == google.maps.GeocoderStatus.OK) {
if (results[1]) {
alert("Location: " + results[1].formatted_address);
}
}
});
Refused to load the script 'http://maps.googleapis.com/maps-api-v3/api/js/25/6/common.js' because it violates the following Content Security Policy directive: "script-src 'self' chrome-extension: 'unsafe-inline' 'unsafe-eval' https://ssl.gstatic.com/accessibility/".