如何使用Configure.IT中的google地理编码API提供的地址获取经度和纬度API流程

问题描述:

如何使用API​​流程中Configure.IT以下的地理编码API中的地址获取纬度&经度值。如何使用Configure.IT中的google地理编码API提供的地址获取经度和纬度API流程

https://maps.googleapis.com/maps/api/geocode/json?address=XXXXX&key=XXXXX

在以下流程图,前插入物的客户数据我需要LAT取&经度值,并将这些值存储到客户表。

enter image description here

ConfigureIT提供了API连接器用于连接到外部数据源和获取数据的块。您需要在INSERT_CUSTOMER_DATA块之前插入API连接器块。

按照下面给出的步骤和实施例的屏幕截图: -

1)添加一个输入参数,用于提供地址。

enter image description here

2)保存更改并在下一步双击API接口块,以添加到您的API配置流程图。

enter image description here

3)在API接口模块配置对话框中,选择定制API类型

enter image description here

4),然后在API URL字段中输入 “https://maps.googleapis.com/maps/api/geocode/json”并在输入参数部分添加和输入参数,地址并链接它到API输入参数(我们在步骤1中添加的)地址然后点击保存&下一步继续下一步。

enter image description here

5)现在,你需要设置API输出。进入测试输入,然后在结果让整个结果从谷歌API选择当前格式 和响应的特定部分,选择特定结果

enter image description here

6)保存所有API的变化和然后执行检查结果

enter image description here

希望这帮助..

https://maps.googleapis.com/maps/api/geocode/json?address= &键= 你要通过你的谷歌服务API密钥,以上面的URL,那么你将得到
结果以JSON格式为:

{ 
    "results" : [ 
     { 
     "address_components" : [ 
      { 
       "long_name" : "Mumbai", 
       "short_name" : "Mumbai", 
       "types" : [ "locality", "political" ] 
      }, 
      { 
       "long_name" : "Maharashtra", 
       "short_name" : "MH", 
       "types" : [ "administrative_area_level_1", "political" ] 
      }, 
      { 
       "long_name" : "India", 
       "short_name" : "IN", 
       "types" : [ "country", "political" ] 
      }, 
      { 
       "long_name" : "400093", 
       "short_name" : "400093", 
       "types" : [ "postal_code" ] 
      } 
     ], 
     "formatted_address" : "Udyog Sarathi, Mahakali Caves Road, Marol Industrial Area, Andheri East, Mumbai, Maharashtra 400093, India", 
     "geometry" : { 
      "location" : { 
       "lat" : 19.1254233, 
       "lng" : 72.8665118 
      }, 
      "location_type" : "GEOMETRIC_CENTER", 
      "viewport" : { 
       "northeast" : { 
        "lat" : 19.1267722802915, 
        "lng" : 72.86786078029151 
       }, 
       "southwest" : { 
        "lat" : 19.1240743197085, 
        "lng" : 72.8651628197085 
       } 
      } 
     }, 
     "place_id" : "ChIJ02N9eyPI5zsRMEB_9ivO_B0", 
     "types" : [ "establishment", "point_of_interest" ] 
     } 
    ], 
    "status" : "OK" 
} 

几何包含位置作为纬度格式。