Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
7
Erster Beitrag:
vor 4 Jahren, 9 Monaten
Letzter Beitrag:
vor 4 Jahren, 9 Monaten
Beteiligte Autoren:
Rudi Werner, iso, Paul Murray, Fabrice Harari

Get latitude / Longitude from adress ...

Startbeitrag von Rudi Werner am 12.04.2013 12:48

Anyone who has experience with getting the latitude longitude from a adress ???

i use :

localization is gglCoordinate
latitude,longitude is real

localization = gglAddresstocoordinates("grote markt 14, 8900 Ieper")

Latitude = localization..Latitude
Lonitude = localization..Longitude

get always and for every adress 0 for both ???

Antworten:

Hi Rudi

there was a change in the google API that makes the ggl function not operational any more... If you do a search on the FRENCH windev/webdev forums (pcsoft.fr) you will find a direct call to the google api to work around the problem (which has been fixed in version 18, but I'm not sure there is a fix available for 17)

Best regards

von Fabrice Harari - am 12.04.2013 13:28
Hi Fabrice/Rudi,

I have this problem to (V16) I cant seem to find any solutions documented on PCSofts website? Did you find anything Rudi.

Thanks

iso

von iso - am 15.04.2013 13:13
Hello,

Just email to pc soft they have a upgrade to that issue
They emailed directly to me !

One topic -> i work with version 17 so i dont know if they have it for version 17

Best regards,

von Rudi Werner - am 15.04.2013 13:15
Hi

I have been given a work around from PC Soft For V16, works fine.

PROCEDURE GglAddressToCoordinates(LOCAL sAdresse is string)
sUrlgglMaps is string
xmlGgl is a xmlDocument
rLatitude is real
rLongitude is real
localisation is a gglCoordinate

sUrlgglMaps="http://maps.googleapis.com/maps/api/geocode/xml?address="+URLEncode(sAdresse)+"&sensor=false";

IF NOT HTTPRequest(sUrlgglMaps) = True THEN
ErrorPropagate("Erreur d'accès au service de géolocalisation, vérifiez la connexion Internet")
ELSE

sCodeRetourHTTP is string = ExtractString(HTTPGetResult(httpHeader),2, " ")
sResultat is string = HTTPGetResult(httpResult)
sSeparateur is string = ","

IF sCodeRetourHTTP[[1]]2 THEN
ErrorPropagate("Erreur HTTP" +sCodeRetourHTTP+CR+HTTPGetResult(httpHeader)+CR+sResultat)
ELSE

xmlGgl = XMLOpen(sResultat,fromString)

IF ErrorOccurred THEN
ErrorPropagate("Erreur XML avec" +sResultat)
ELSE

SWITCH xmlGgl.GeocodeResponse.status


CASE "OK"
rLongitude = xmlGgl.GeocodeResponse.result.geometry.location.lng
rLatitude= xmlGgl.GeocodeResponse.result.geometry.location.lat

CASE "ZERO_RESULTS"
ErrorThrow(1,"Zero Results")

CASE "OVER_QUERY_LIMIT"
ErrorThrow(2,"You have Used Your Daily Quota")

CASE "REQUEST_DENIED"
ErrorThrow(3,"Request Has Been Denied")

CASE "INVALID_REQUEST"
ErrorThrow(4,"Invalid Request")

CASE "UNKNOWN_ERROR"
ErrorThrow(5,"An Unknow Error Has Occured, Please Try Again")

OTHER CASE
ErrorThrow(5,"An Unknow Error Has Occured, Please Try Again"+CR+sResultat)

END

localisation..Longitude = rLongitude
localisation..Latitude = rLatitude

END
END
END

RESULT localisation

von iso - am 17.04.2013 13:25
Hi Iso,

Do you know if this issue is resolve in WebDev 17?

Thank you,

Paul

von Paul Murray - am 20.04.2013 05:08
No but i think they use the same DLL's !

von Rudi Werner - am 20.04.2013 07:32
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.