Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Google maps
Message
De
17/12/2015 14:35:38
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, États-Unis
 
 
À
17/12/2015 07:06:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01629054
Message ID:
01629076
Vues:
108
>Could anyone point me to examples for integrating vfp and google maps (markers- adding and removing, sidebars, selection of group of markers etc.)?
>
>Thanks in advance.

We use this. We have a ShellExec function which I assume you can guess at.
* From Sergey.
PROCEDURE GoogleMapSearch(cAddress, DoNotAutoCorrect)
#DEFINE READYSTATE_COMPLETE 4
LOCAL oIE As InternetExplorer.Application, URL, Result

URL="http://maps.google.com?q=" + m.cAddress

IF NOT m.DoNotAutoCorrect
  oIE = CREATEOBJECT("InternetExplorer.Application")
  oIE.Visible = .F.
  oIE.Navigate(m.URL)
  DO WHILE oIE.Readystate <> READYSTATE_COMPLETE
     WAIT WIND TIME 1.0 ""
  ENDDO
  
  DO CASE
  CASE "Did you mean:" $ oIE.DOCUMENT.body.innerText
     Result = SUBSTR(oIE.DOCUMENT.body.innerText, AT("Did you mean:",oIE.DOCUMENT.body.innerText))
     ?LEFT(m.Result,AT(CHR(13),m.Result))
     ?SUBSTR(m.Result,AT(CHR(13),m.Result)+2,AT(CHR(13),m.Result,2) -AT(CHR(13),m.Result)-1)
  
  CASE "Address:"+CHR(13) $oIE.DOCUMENT.body.innerText
  
     Result = SUBSTR(oIE.DOCUMENT.body.innerText, AT("Address:"+CHR(13),oIE.DOCUMENT.body.innerText))
     lcOut = m.Result
     ilines = 1
  
     DO WHILE lcout <> "A." AND ilines<5
        ?LEFT(lcout,AT(CHR(13),lcout)-1)
        lcout=SUBSTR(lcout,AT(CHR(13),lcout)+2)
        ilines=ilines+1
     ENDDO
  
  OTHERWISE
     m.Result = oIE.DOCUMENT.body.innerText
     STRTOFILE(m.Result,'temp.txt')
  
  ENDCASE
  oIE.Quit()
ELSE
  ShellExecute(m.URL, "", "Web", "")  
ENDIF    
RETURN
Charlie
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform