$(function() {
var lat = 41.9100711;
var lng = 12.535`enter code here`9979;  
var geocoder = new google.maps.Geocoder();
var address = "<?php echo $citta ?>";
geocoder.geocode( { 'address': address}, function(results, status) {
   if (status == google.maps.GeocoderStatus.OK)
   {
       // do something with the geocoded result
       //
       lat = results[0].geometry.location.lat();
       lng = results[0].geometry.location.lng();
   }
});
alert("latitudine"+lat);
I need lat and lng for this plugin and i need to declare lat and lng inside this, for this is why i'm asking about to have a globa variablse to use .... in case any other idea to find lat and lng from an address to use with this plugin ?
$('#map-container').storeLocator({'deafultlat'=lat,'defaultlng'=lng});
 
    