Location for Zia Skills
You can use this widget to display the map interface and allow the visitor to pick a location from the map. You can specify a default location by providing the latitude and longitude details. If the default location is not specified, then the current location of the visitor's device will be considered.
| Attribute | Mandatory | Description | Values |
| type | Yes | The type of input to be displayed to the visitor | location |
| lat | No | To specify the default latitude position to pin the location in the map. | float |
| lng | No | To specify the default longitude position to pin the location in the map. | float |
| radius | No | The maximum distance radius that is allowed for the visitors to search and select from the provided default location. | (n) kms - You can specify the distance radius integer in kilometres. (n) miles - You can specify the distance radius integer number in miles. The integer value can be Min 2 - Max 500. |
| label | No | To specify the text displayed in the share action button. | text |
| select_label | No | To set customized text for widget values/slot submission actions | Instead of 'Schedule' custom text like 'Choose a slot" will be displayed Note: Maximum character limit for values passed inside the select_label key is 20 |
Use Case:
Context Handler function:
Copiedresult = Map();
response = Map();
response.put("action", "reply");
response.put("replies", [
"Choose a location"
]);
response.put("input", {
"type": "location",
"lat": "37.686318",
"lng": "-121.893427",
"radius": "2 kms",
"label": "Share Location",
"select_label":"Send my locale"
});
prompt = Map();
prompt.put("param_name", "location");
prompt.put("data", response);
result.put("prompt", prompt);
result.put("todo", "prompt");
return result;Output:
