2017-06-27 32 views

回答

8

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

希望這幫助..

1

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" 
} 

幾何包含位置作爲緯度格式。

相關問題