How can I get latitude & longitude values by using address from below geocode API inside Configure.IT API flow.
https://maps.googleapis.com/maps/api/geocode/json?address=XXXXX&key=XXXXX
In below flow chart, before insert customer data I need to fetch lat & lng values and store those values into customer table.
To find a location using its latitude and longitude on any device, just open Google Maps. On your phone or tablet, start the Google Maps app. On a computer, go to Google Maps in a browser. Then enter the latitude and longitude values in the search field — the same one you would ordinarily use to enter an address.
If you are located in the northern hemisphere, the latitude of your exact position can be determined using the pole star Polaris. Polaris is a bright star with a magnitude of 2 and can be easily seen with your naked eye. To determine your latitude, you will have to measure the angle between Polaris and your horizon.
ConfigureIT provides API Connector block for connecting to external datasources and fetching data. You need to insert API Connector block before INSERT_CUSTOMER_DATA block.
Follow the steps and example screenshots given below :-
1) Add an input parameter for supplying address.
2) Save your changes and in next step double-click API Connector block, to add in to your API configuration flow chart.
3) In API Connector block configuration dialog, select Custom for API Type
4) And then enter "https://maps.googleapis.com/maps/api/geocode/json" in API URL field and in input parameters section add and input parameter, address and link it to API input Parameter(we added in step 1) address and then click Save & Next to proceed to next step.
5) Now you need to set up API output. Enter test input and then for getting whole result from google api in result select Current Format and for specific part of the response, select Specific Result
6) Save all your API changes and then Execute to check the result
Hope this helps..
https://maps.googleapis.com/maps/api/geocode/json?address=&key=
You have to pass your Google service API key to above URL then you will get
the result in json format as:
{
"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"
}
The geometry contains location as lat lon format.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With