I am looking for a way to avoid being charged for
- Places API Atmosphere Data
- Places API Contact Data
I only need to reverse the place id to its formatted_address. Any idea about what changes I need to do in the code bellow?
Related question, although I am not using Autocomplete
but PlacesService
.
$('.company_location_id').each(function(i, obj) {
if ($(this).length > 0) {
if ($(this).val()) {
var request = {
placeId: $(this).val()
};
service = new google.maps.places.PlacesService(document.getElementsByClassName($(this).attr('class'))[0]);
service.getDetails(request, callback);
var new_text = $(this)
function callback(place, status) {
if (status == google.maps.places.PlacesServiceStatus.OK) {
$(new_text).next().text(place.formatted_address);
}
}
}
}
});