How to call google map geocode service with jquery ajax
问题 I'm trying to get the LatLng from google map geocode api. my code is below with address values is "New York, NY" $.ajax({ url: 'http://maps.googleapis.com/maps/api/geocode/json', data: { sensor: false, address: address }, success: function (data) { alert(data) } }); But I'm not getting any values in alert. Thanks for any help. 回答1: You will need to contact the API regarding the rules. $.getJSON( { url : 'https://maps.googleapis.com/maps/api/geocode/json', data : { sensor : false, address :