Category : google-maps

A website I’m running maintenance on filters locations by latitude / longitude – now they want it to filter zips. I am not a backend, and don’t have a lot of time between other projects, so I’m in dire need of help in understanding – I’ll take anything you got. $locations = $wpdb->get_results($sql,ARRAY_A); case ‘zip’: ..

Read more

I’m trying to populate a google map with a list of long/lat from a JSON file and having this issue, any help would be greatly appreciated! [Error] SyntaxError: Cannot declare a const variable twice: ‘map’. [Error] Unhandled Promise Rejection: InvalidValueError: initMap is not a function <!– Async script executes immediately and must be after any ..

Read more

”’ <form action="" method="post"> <label>Origin:</label> <input type="text" name="o" placeholder="Enter Origin location" required> <br><br> <label>Destination:</label> <input type="text" name="d" placeholder="Enter Destination location" required> <br><br> <input type="submit" value="Calculate distance & time" name="submit"> <br><br> </form> <?php $con = mysqli_connect("localhost","root","","buspass"); if(isset($_POST[‘submit’])){ $origin = $_POST[‘o’]; $destination = $_POST[‘d’]; $api = file_get_contents("http://maps.googleapis.com/maps/api/distancematrix/json? units=imperial&origins=".$origin."&destinations=".$destination."&key=YOUR_API"); $data = json_decode($api,true); ?> <label><b>Distance: </b></label> <span> <?php if(isset($_POST[‘elements’])){ ..

Read more