API Google Maps Bookmark

Asked

Viewed 168 times

0

Good night Srs.

I am trying to use a marker for each point coming from the database in the code below: In this code there is already the mapping of the route traveled using the Lat and longitude received from the bank, only need that in each insertion in the map be identified with a marker, besides it is clear the line that the object traveled , that in the case is working.

Here is the connection and query in the table..

while($RS= mysql_fetch_array($RSS)){
    $x = $x + 1;
    $kx .= "new google.maps.LatLng(".str_replace(",", ".", $RS["vl_latitude"]).", ".str_replace(",", ".", $RS["vl_longitude"])."),";

    if($RS["ig"] == "1"){$ig="LIGADA";}else{$ig="DESLIGADA";}
    if($x == 1){$pt = $pt . chr(91)."'INICIO: ".date("d/m/Y H:i:s", strtotime($RS["dt_hora"]))." - ".$RS["ds_posicao"]." | Ig: ".$ig."', ".str_replace(",", ".", $RS["vl_latitude"]).", ".str_replace(",", ".", $RS["vl_longitude"]).", ".$x."],";}
    $adata  = $RS["dt_hora"];
    if($RS["ig"] == "1"){$aig="LIGADA";}else{$aig="DESLIGADA";}
    //$aig  = $RS["ig"];
    $apos   = $RS["ds_posicao"];
    $alat   = $RS["vl_latitude"];
    $alng   = $RS["vl_longitude"];
}
$pt = $pt . chr(91)."'FIM: ".date("d/m/Y H:i:s", strtotime($adata))." - ".$apos." | Ig: ".$aig."', ".str_replace(",", ".", $alat).", ".str_replace(",", ".", $alng).", ".$x."],";

?>

Here it continues with the attached file (photo)

inserir a descrição da imagem aqui

  • what error is happening?

  • No error is occurring, so far everything is ok, tracing the line according to the query of latitude and longitude above, but in addition to tracing the line, I need to insert a marker in each point based on the select above. That means I’ll have hundreds of dots for a day when the object has travelled a few miles.

  • Look at the image, I need to insert markers like the comics into the image that represent where the finder sent position to the system

1 answer

0

segue imagem para entender melhor o que estou tentando fazer. See if it’s possible to understand what I’ve been trying to do. Thank you.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.