Un champ position GPS en ° " '

More
2 years 1 month ago #81764 by schott0200
Bonjour j'ai deux champs "latitude" et "longitude". J'aurai besoin, si c'est possible, que ces deux champs me donne un autre champs automatiquement d'une position GPS en ° " '. J'ai le code php ou je dois remplacer les valeurs par les champs.
Code:
<?PHP     // LATITUDE           $min=abs(intval(60*($row_rs_planetariums['Latitude']-intval($row_rs_planetariums['Latitude']))));           $sec=abs(intval(3600*$row_rs_planetariums['Latitude']-60*(intval(60*$row_rs_planetariums['Latitude']))));           echo abs(intval($row_rs_planetariums['Latitude'])).'&deg;';           if ($min<10) echo '0';                   echo $min.''';           if ($sec<10) echo '0';                   echo $sec.'" ';           if ($row_rs_planetariums['Latitude']>=0) echo 'N'; else echo 'S';     // LONGITUDE          $min=abs(intval(60*($row_rs_planetariums['Longitude']-intval($row_rs_planetariums['Longitude']))));           $sec=abs(intval(3600*$row_rs_planetariums['Longitude']-60*(intval(60*$row_rs_planetariums['Longitude']))));           echo abs(intval($row_rs_planetariums['Longitude'])).'&deg;';           if ($min<10) echo '0';                   echo $min.''';           if ($sec<10) echo '0';                   echo $sec.'" ';           if ($row_rs_planetariums['Longitude']>=0) echo 'E'; else echo 'W'; ?>
Je sais que je dois remplacer $row_rs_planetariums et $row_rs_planetariums) par les valeurs champs. mais parès je ne sais pas comment m'y prendre.
Merci pour votre aide.
 

Please Log in or Create an account to join the conversation.

More
2 years 1 month ago #81767 by micker
Tu dois faire un calcul..
Tu prend ton champs long et ton champs latitude
Tu les mets dans la position render de ton template
Puis tu va travailler sur une version custom de ton template pour ajouter ton code et remplacer les valeurs par celle de tes deux champs
Le code pour charger un champs venant de la position render est dans l'édition du template il y a une aide en dessous de l'éditeur de code

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.474 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline