Category : google-maps-api-3

hellow everybody, i’m try import coordinates from api, i use fetch but don’t work for me, i’m not so god on javascript, actually i’m import with php using var listPos = <?php echo json_encode($result); ?>; but i need import from api var stepDisplay function initMap() { const directionsService = new google.maps.DirectionsService(); map = new google.maps.Map(document.getElementById("map"), ..

Read more

When going to the site with www and without, the Google maps doesn’t load consistently. I am using the google maps api on my site and getting the "This page didn’t load Google Maps correctly. See the JavaScript console for technical details." error, but only in certain scenarios. Going to https://www.[site].com/ the Google maps section ..

Read more

In the client react application where I am calling the Google Distance Matrix API: const origins = [{ lat: parseFloat(lat1), lng: parseFloat(lon1) }]; const destinations = [{ lat: parseFloat(lat2), lng: parseFloat(lon2) }]; const travelMode = google.maps.TravelMode.DRIVING; const service = new google.maps.DistanceMatrixService(); service.getDistanceMatrix( { origins: origins, destinations: destinations, travelMode: travelMode, }, (response, status) => { console.log("RESPONSE", ..

Read more

I am using this endpoint with CURL to get lat/long for specific address and it working fine but if i need to get it for 1000 records then needs to make 1000 api call is there any way i can supply json of address and get the lat/long for 1000 records in one call https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway, ..

Read more

I am using below code to get "Most Relevent" Google reviews using PHP. Ref – https://stackoverflow.com/a/55703133/6829420 <?php $cid = ‘<MY-CID>’; // The CID you want to see the reviews for $show_only_if_with_text = false; // true OR false $show_only_if_greater_x = 0; // 0-4 $show_rule_after_review = false; // true OR false /* ————————————————————————- */ $ch = curl_init(‘https://www.google.com/maps?cid=’.$cid); ..

Read more