0

这是我在 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]);

接下来我;

“输出”如下所示:

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])

与谷歌的通信不起作用,没有返回坐标。有人可以帮助我吗?

4

6 回答 6

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

于 2013-04-09T19:23:31.503 回答
0

最后更新:

如果您使用此字符串修改您的 url,您将看到状态:

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

我的仍然是 REQUEST_DENIED。我想这可能是我们的域名在谷歌的价目表上,他们要求我们注册为“公司的谷歌地图 api”。

于 2013-04-09T06:31:18.740 回答
0

解决方案是:

表:添加 LOAD '$(i)' 作为 Rowno,@1、@2、@3 作为纬度,@4 作为经度 FROM [ http://maps.googleapis.com/maps/api/geocode/json?address= $(vAddress)&sensor=false]

请注意,您的邮政数据与

        ,+ 

就像在示例中一样: http ://maps.google.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=false

于 2013-04-09T12:07:44.503 回答
0

我面临同样的问题,发现以下内容: https ://developers.google.com/maps/documentation/geocoding/?hl=de

自 8.3.2013 起,不再支持地理编码 API 2.0。

新的编码是: http ://maps.googleapis.com/maps/api/geocode/output?parameters

于 2013-04-08T17:32:44.140 回答
0

下次更新:请参考此链接:http: //community.qlikview.com/thread/46602

这种编码也从谷歌获得状态,在我的情况下,我得到 610 = bad key http://community.qlikview.com/servlet/JiveServlet/download/188551-30764/QVGeocodeur.qvw

于 2013-04-09T06:21:39.750 回答
0

尝试这个:

数据: LOAD '454874' as [Kupac šifra],'Frankfurt Deutschland' as Adresa,子字段([lng],',',1)作为经度,子字段([lat],',',1)作为纬度 FROM [ http://maps.googleapis.com/maps/api/geocode/xml?address=Frankfurt Deutschland&sensor=false](XmlSimple,表格为 [GeocodeResponse/result/geometry/location]);

于 2013-06-11T21:23:05.727 回答