Google maps measure mileage between two points by the time

0

Next galera: google maps measure speed (mileage) between two points by the time of each example point:

  • Point A (Lat and Long + hour type 10:00 hs)

  • Point B (Lat and Long + hour type 11:00 hs)

Then the speed would be approximately 45 kilometers per hour between the 2 example points!

I saw this site below that I need exactly this for a project can anyone help with anything there?

follow the link where I saw this: link

Follow the code of how I get the data point 1 and point 2 where each point has the time now I need to know the speed

<?php
$xml = simplexml_load_file('https://api.findmespot.com/spot-main-web/consumer/rest-api/2.0/public/feed/0gUKvaesqck4s3oqr65sqUimR9gUjnSQd/message.xml');
$i = 0;
foreach($xml->feedMessageResponse->messages->message as $message) {
    $i++;
}?>

<?php $data_um = $xml->feedMessageResponse->messages->message[0]->dateTime; ?>
<?php $data_dois = $xml->feedMessageResponse->messages->message[1]->dateTime; ?>

Hora Ponto um:<?php echo  date('H:i:s', strtotime($data_um));?><br>
Lat Ponto um:<?php echo $latitude = $xml->feedMessageResponse->messages->message[0]->latitude;?><br>
long Ponto um:<?php echo $longitude = $xml->feedMessageResponse->messages->message[0]->longitude;?><br>


<hr> </hr>



Hora Ponto dois:<?php echo  date('H:i:s', strtotime($data_dois));?><br>
Lat Ponto dois:<?php echo $latitude = $xml->feedMessageResponse->messages->message[1]->latitude;?><br>
long Ponto dois:<?php echo $longitude = $xml->feedMessageResponse->messages->message[1]->longitude;?><br>
    
asked by anonymous 22.12.2017 / 08:35

0 answers