Address editor

Configure an address editor in your mobile extension.

Overview

The Address editor is a component that allows users to select an address with the help of GPS and the Skedulo GeoServices API.

Users need an internet connection while using this component, because it requires the GeoServices API to retrieve address information.

Searching for an address in an address editor component.

Selecting an address in an address editor component

Properties

Property Description
Editor common Property set Common properties in Flat page editor components.
structureExpression* All address information including Addresss, GeoLongitude and GeoLatitude will be bound to this expression.
displayExpression* Define which property the control should used to display value from the editor
selectPage Define the metadata of the Select page (after user click on the address editor field)
selectPage.title A localized expression string that define how to render the Title of the address select page. (Navigation title)

Address information

Field name Type Description
Address string Full address selected by the user. It typically includes components such as street number, street name, city, state, postal code, and country.
GeoLongitude number (from -180 to 180) The geographical longitude of the selected address. Longitude is a geographic coordinate that specifies the east-west position of a point on the Earth’s surface.
GeoLatitude number (from -90 to 90) The geographical latitude of the selected address. Latitude is a geographic coordinate that specifies the north-south position of a point on the Earth’s surface.

Usage example

Address editor component

The following code sample is and example of what how to add an Address editor component to your mobile extension.

{
  "type": "addressEditor",
  "title": "form.ShowCasePage.AddressEditorTitle",
  "placeholder": "form.ShowCasePage.AddressEditorPlaceholder",
  "structureExpression": "pageData.__Address",
  "displayExpression": "pageData.__Address.Address",
  "selectPage": {
    "title": "form.ShowCasePage.AddressSelectPageTitle",
  }
}

Data from the Geoservices API

Example of the data that is returned after the user selects an address:

{
  "Address": "P. Tô Hiệu, Khu tập thể Nghĩa Tân, Nghĩa Tân, Cầu Giấy, Hà Nội, Vietnam",
  "GeoLatitude": 21.0416423, 
  "GeoLongitude": 105.7925672
}