0

this is my code in Qlickview:

let noRows = NoOfRows('GoogleMaps')-1;

for i=0 to $(noRows)

let a=peek('CUSTACCOUNT',$(i),'GoogleMaps');
let b=peek('Adresa',$(i),'GoogleMaps'); 

Data:
LOAD
'$(a)' as [Kupac šifra],
'$(b)' as Adresa,
subfield([Response/Placemark/Point/coordinates], ',' ,1) AS longitude,
subfield([Response/Placemark/Point/coordinates], ',' ,2) AS latitude
FROM [http://maps.googleapis.com/maps/geo?q=$(b)&output=xml&oe=utf8&key=AIzaSyBByoqS6QmwjSOSRDIOxRe82cUW-iLYJo4] (XmlSimple, Table is [kml]);

next i;

The "output" looks like this:

Data:
LOAD
'454874' as [Kupac šifra],
'Frankfurt Deutschland' as Adresa,
subfield([Response/Placemark/Point/coordinates], ',' ,1) AS longitude,
subfield([Response/Placemark/Point/coordinates], ',' ,2) AS latitude
FROM [http://maps.googleapis.com/maps/geo?q=Frankfurt Deutschland&output=xml&oe=utf8&key=AIzaSyBByoqS6QmwjSOSRDIOxRe82cUW-iLYJo4] (XmlSimple, Table is [kml])

The communication with google doesnt work, there are no coordinates beeing returned. Can somebody pls help me?

Chad Killingsworth
  • 14,360
  • 2
  • 34
  • 57
user2220091
  • 3
  • 1
  • 4

6 Answers6

0

I'm facing the same issue and found following: https://developers.google.com/maps/documentation/geocoding/?hl=de

Since 8.3.2013 the geocoding API 2.0 is no more supported.

New coding is: http://maps.googleapis.com/maps/api/geocode/output?parameters

Standa
  • 1
0

next update: please refer to this link: http://community.qlikview.com/thread/46602

This coding gets state from google as well and in my case I get 610 = bad key http://community.qlikview.com/servlet/JiveServlet/download/188551-30764/QVGeocodeur.qvw

Standa
  • 1
  • Can you please answer in one question and improve them by time. The questions are sometimes not in the order they where created, an so it is nearly impossible for the reads whats that relevant answer. Thanks. – smartmeta Sep 27 '13 at 07:11
0

last update:

if you modify your url with this string, you will see the status:

[http://maps.googleapis.com/maps/api/geocode/xml?address=$(vAddress)+fr&output=csv&oe=utf8&sensor=false&key=AIzaSyBByoqS6QmwjSOSRDIOxRe82cUW-iLYJo4]

Mine is still REQUEST_DENIED. I guess it's maybe our domain is at google's price list and they avait we do register as "google maps api for companies".

Standa
  • 1
0

Solution is:

Table: ADD LOAD '$(i)' as Rowno , @1, @2, @3 as latitude, @4 as longitude FROM [http://maps.googleapis.com/maps/api/geocode/json?address=$(vAddress)&sensor=false]

BE AVARE, that your postal Data are concatenated with

        ,+ 

like in the example: http://maps.google.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=false

Standa
  • 1
0

do this trick, it's definitelly working: http://www.qvsource.com/wiki/General-Web-Connector-For-QlikView.ashx#Example_2

1) open QV Script 2) open wizard Web File 3) copy&paste this link http://maps.google.com/maps/api/geocode/XMLaddress=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=false 4) choose XML 5) three tables will be generated, just to simplify the queries use only GeoCodeResponse: 6) Data in address do not have to include any special letters (Ö => Oe, ...) and should be concatenated with ,+ signs

Standa
  • 1
0

Try this:

Data: LOAD '454874' as [Kupac šifra], 'Frankfurt Deutschland' as Adresa, subfield([lng], ',' ,1) AS longitude, subfield([lat], ',' ,1) AS latitude FROM [http://maps.googleapis.com/maps/api/geocode/xml?address=Frankfurt Deutschland&sensor=false] (XmlSimple, Table is [GeocodeResponse/result/geometry/location]);