Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Directions for google map with lat and long values
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01417187
Message ID:
01417293
Vues:
53
You can change ALLTRIM(STR(...)) to TRANSFORM(...) w/o second parameter.

>
>I had a brower control on a from and using the following code.
>
>
>lnEmployeeLat = 40.809491
>lnEmployeeLong = -74.007731
>lnClientLat = 41.728390
>lnClientLong = -72.841476
>lcClientName = '(Client Name)'
>lcEmployeeName = '(Employee Name)'
>
>lcEmployeLatLongPre = 'saddr='
>lcClientLatLongPre = '&daddr='
>
>lcEmployeeLat = ALLTRIM(STR(lnEmployeeLat))
>lcEmployeeLong = ALLTRIM(STR(lnEmployeeLong))
>lcClientLat = ALLTRIM(STR(lnClientLat,12,6))
>lcClientLong = ALLTRIM(STR(lnClientLong,12,6))
>
>this.browser.navigate('http://maps.google.com/maps?'+;
>								lcEmployeLatLongPre+lcEmployeeLat+','+;
>								lcEmployeeLong+ ;
>								lcEmployeeName+;
>								lcClientLatLongPre+;
>								lcClientLat+','+;
>								lcClientLong +;
>								lcClientName)
>
>
>but failed to notice that taking the str function was returning an integer so added to allow for decimal places.
>
>
>lcEmployeeLat = ALLTRIM(STR(lnEmployeeLat,12,6))
>lcEmployeeLong = ALLTRIM(STR(lnEmployeeLong,12,6))
>
>Thanks
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform