Skip to main content
Version: General Availability - 1.0.6.X

Searching

parseLocation

Attempt to parse a free‑text coordinate string (e.g. "-31.95, 115.8575"). If the string looks like a valid lat/long pair it returns a SearchResult; otherwise undefined.

Parameters:

FieldTypeRequiredDescription
possibleCoordinatestringYesFree‑text that may contain a latitude/longitude pair.

Usage:

const result = control.parseLocation('-31.9505,115.8575');
if (result) {
await control.navigateToLatLong(result.Geometry.coordinates[1], result.Geometry.coordinates[0], 14);
}
info

Please note that the position 1 in the array is first and 0 is second, this is because of the way Geojson is handled


searchAddresses

Forward geocode: find address candidates for a search phrase.

Parameters:

FieldTypeRequiredDescription
searchTermstringYesAddress or partial address text.

Usage:

const addresses = await control.searchAddresses('752 North Lake Rd');
Response
[
{
"Title": "752 North Lake Rd, South Lake, Perth, Western Australia, 6164, AUS",
"Address": {
"CompositeAddress": "752 North Lake Rd, South Lake, Perth, Western Australia, 6164, AUS",
"Unit": "",
"Street": "752 North Lake Rd",
"Suburb": "South Lake",
"City": "Perth",
"State": "Western Australia",
"Zip": "6164",
"Country": "Australia"
},
"Extent": {
"xmin": 115.838023254572,
"xmax": 115.838023254572,
"ymin": -32.115650853196,
"ymax": -32.115650853196,
"zmin": 0,
"zmax": 0,
"spatialReference": {
"wkid": 4326
}
},
"Geometry": {
"type": "Point",
"coordinates": [
115.838023254572,
-32.115650853196
]
}
}
]

searchAddressesByLocation

Reverse geocode: get nearby address candidates around a coordinate.

Parameters:

FieldTypeRequiredDescription
latnumberYesLatitude (WGS84).
lonnumberYesLongitude (WGS84).

Usage:

const nearby = await control.searchAddressesByLocation(-31.95, 115.8575);
Response
[
{
"Title": "Roe Street, Perth, Western Australia, 6000, AUS (-31.949581629963, 115.857741026825)",
"Address": {
"CompositeAddress": "Roe Street, Perth, Western Australia, 6000, AUS",
"Unit": "",
"Street": "Roe Street",
"Suburb": "Perth",
"City": "Perth",
"State": "Western Australia",
"Zip": "6000",
"Country": "Australia"
},
"Extent": {
"xmin": 115.857741026825,
"xmax": 115.857741026825,
"ymin": -31.949581629963,
"ymax": -31.949581629963,
"zmax": 0,
"zmin": 0,
"spatialReference": {
"wkid": 4326
}
},
"Geometry": {
"type": "Point",
"coordinates": [
115.857741026825,
-31.949581629963
]
}
}
]

searchRegions

Search region / boundary datasets (e.g. suburbs, administrative areas).

Parameters:

FieldTypeRequiredDescription
searchTermstringYesRegion name fragment.

Usage:

const regions = await control.searchRegions('Perth');
Response
[
{
"Title": "Perth, City of Perth, Western Australia, Australia",
"Address": {
"CompositeAddress": "Perth, City of Perth, Western Australia, Australia",
"Unit": "",
"Street": "",
"Suburb": "",
"City": "",
"State": "",
"Zip": "",
"Country": ""
},
"Extent": {
"xmin": 115.827166,
"ymin": -31.973012,
"xmax": 115.877911,
"ymax": -31.936494,
"zmin": 0,
"zmax": 0,
"spatialReference": {
"wkid": 4326
}
},
"Geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[
115.827166,
-31.972635
],
[
115.827269,
-31.97289
],
[
115.84058,
-31.973012
],
[
115.840982,
-31.972369
],
[
115.841501,
-31.970812
],
[
115.841847,
-31.967785
],
[
115.84228,
-31.966488
],
[
115.842971,
-31.965191
],
[
115.843881,
-31.964321
],
[
115.844725,
-31.963838
],
[
115.845928,
-31.963516
],
[
115.847357,
-31.963346
],
[
115.849618,
-31.963346
],
[
115.854561,
-31.964345
],
[
115.859609,
-31.96608
],
[
115.863707,
-31.967436
],
[
115.864248,
-31.967481
],
[
115.868127,
-31.958614
],
[
115.869725,
-31.955069
],
[
115.867613,
-31.954384
],
[
115.867824,
-31.953833
],
[
115.867834,
-31.953386
],
[
115.867774,
-31.952679
],
[
115.867842,
-31.952065
],
[
115.868246,
-31.951069
],
[
115.871705,
-31.949745
],
[
115.8730093,
-31.9490203
],
[
115.873278,
-31.948871
],
[
115.874411,
-31.948162
],
[
115.8746397,
-31.9479053
],
[
115.875913,
-31.946476
],
[
115.876674,
-31.945047
],
[
115.877105,
-31.943944
],
[
115.877911,
-31.941268
],
[
115.8774261,
-31.9410404
],
[
115.876816,
-31.940754
],
[
115.87661,
-31.941057
],
[
115.876581,
-31.941063
],
[
115.87612,
-31.940836
],
[
115.874764,
-31.942829
],
[
115.874346,
-31.942622
],
[
115.87424,
-31.942774
],
[
115.874658,
-31.942986
],
[
115.873977,
-31.943985
],
[
115.873283,
-31.943993
],
[
115.873595,
-31.943538
],
[
115.864653,
-31.939436
],
[
115.8651087,
-31.9387071
],
[
115.866416,
-31.93663
],
[
115.866416,
-31.936543
],
[
115.862484,
-31.936527
],
[
115.858351,
-31.936494
],
[
115.854231,
-31.94312
],
[
115.861071,
-31.94626
],
[
115.8593318,
-31.9490461
],
[
115.858755,
-31.94997
],
[
115.858232,
-31.949743
],
[
115.857422,
-31.949434
],
[
115.8520075,
-31.9469537
],
[
115.851995,
-31.946948
],
[
115.850619,
-31.946495
],
[
115.850584,
-31.947086
],
[
115.85053,
-31.947367
],
[
115.850325,
-31.948032
],
[
115.850101,
-31.948547
],
[
115.848925,
-31.950939
],
[
115.848625,
-31.951674
],
[
115.848534,
-31.952014
],
[
115.848507,
-31.952381
],
[
115.848572,
-31.952916
],
[
115.848625,
-31.953157
],
[
115.849156,
-31.954607
],
[
115.848946,
-31.954684
],
[
115.848912,
-31.954617
],
[
115.848616,
-31.954725
],
[
115.848475,
-31.954486
],
[
115.8482,
-31.954586
],
[
115.848178,
-31.954542
],
[
115.847677,
-31.954937
],
[
115.847639,
-31.954876
],
[
115.847351,
-31.954981
],
[
115.847371,
-31.955021
],
[
115.847223,
-31.955075
],
[
115.847328,
-31.955294
],
[
115.847179,
-31.955345
],
[
115.847075,
-31.955128
],
[
115.846779,
-31.955233
],
[
115.846906,
-31.955501
],
[
115.846609,
-31.955604
],
[
115.846566,
-31.955514
],
[
115.846166,
-31.955685
],
[
115.84644,
-31.95614
],
[
115.846387,
-31.956163
],
[
115.846452,
-31.95627
],
[
115.846467,
-31.956263
],
[
115.846559,
-31.956448
],
[
115.846724,
-31.95649
],
[
115.846642,
-31.956564
],
[
115.845634,
-31.956298
],
[
115.845348,
-31.957079
],
[
115.845758,
-31.957186
],
[
115.84569,
-31.957372
],
[
115.845505,
-31.957547
],
[
115.845105,
-31.957442
],
[
115.844678,
-31.958614
],
[
115.844602,
-31.959466
],
[
115.845619,
-31.959734
],
[
115.84568,
-31.960001
],
[
115.846013,
-31.960767
],
[
115.846112,
-31.961219
],
[
115.845718,
-31.961891
],
[
115.845644,
-31.961959
],
[
115.843669,
-31.962617
],
[
115.843098,
-31.962723
],
[
115.843039,
-31.962695
],
[
115.842455,
-31.962943
],
[
115.842013,
-31.963296
],
[
115.841738,
-31.963597
],
[
115.841438,
-31.963973
],
[
115.841106,
-31.96425
],
[
115.840475,
-31.964621
],
[
115.840169,
-31.964414
],
[
115.839169,
-31.9651
],
[
115.83886,
-31.965613
],
[
115.839306,
-31.965918
],
[
115.839215,
-31.966104
],
[
115.83935,
-31.966151
],
[
115.839373,
-31.966103
],
[
115.839463,
-31.966135
],
[
115.839308,
-31.96645
],
[
115.839113,
-31.966751
],
[
115.838486,
-31.967617
],
[
115.837577,
-31.96858
],
[
115.836377,
-31.969408
],
[
115.835988,
-31.969602
],
[
115.834421,
-31.970098
],
[
115.834112,
-31.970322
],
[
115.833724,
-31.970738
],
[
115.833473,
-31.971217
],
[
115.833265,
-31.971423
],
[
115.832908,
-31.971588
],
[
115.831454,
-31.972093
],
[
115.831137,
-31.972173
],
[
115.830504,
-31.972217
],
[
115.828575,
-31.972435
],
[
115.827166,
-31.972635
]
]
]
]
}
},
]

searchFeatures

Search configured feature datasets (points / polygons) that are indexed for search.

Parameters:

FieldTypeRequiredDescription
searchTermstringYesFeature label text.

Usage:

const features = await control.searchFeatures('BURSWOOD');
Response
{
"Address": "undefined",
"Extent": {
"xmin": 115.8964606,
"ymin": -31.9557428,
"xmax": 115.8964606,
"ymax": -31.9557428,
"zmin": 0,
"zmax": 0,
"spatialReference": {
"wkid": 4326
}
},
"Feature": {
"id": "1756881716429",
"geometry": {
"type": "Point",
"coordinates": [115.8964606, -31.9557428]
},
"properties": {},
"centroid": {
"x": 115.8964606,
"y": -31.9557428,
"z": 0
},
"extent": {
"xmin": 115.8964606,
"ymin": -31.9557428,
"xmax": 115.8964606,
"ymax": -31.9557428,
"zmin": 0,
"zmax": 0,
"spatialReference": {
"wkid": 4326
}
},
"totalCoordinateCount": 1,
"levelOfDetail": 0,
"layerInstanceId": "fba870dc-284d-4b7d-a37f-84ed3a9ada8d"
},
"Geometry": {
"type": "Point",
"coordinates": [115.8964606, -31.9557428]
},
"SubGroup": {
"id": "81c285b6-5962-437c-8ae4-a1312441809d",
"name": "Active Accounts"
},
"Title": "Name"
}

searchLayers

Search layer metadata (not individual features) to help users discover available layers.

Parameters:

FieldTypeRequiredDescription
searchTermstringYesLayer name fragment.

Usage:

const layers = await control.searchLayers('account');
Response
[
{
"Title": "My Active Accounts(Account)",
"SubLayer": {
"id": "9f89f28f-ecc2-4d5f-806e-76a14e1a4f9e",
"instanceId": "",
"name": "My Active Accounts",
"description": null,
"url": "<fetch version=\"1.0\" output-format=\"xml-platform\" mapping=\"logical\" savedqueryid=\"00000000-0000-0000-00aa-000010001001\"><entity name=\"account\"><attribute name=\"name\" /><attribute name=\"address1_city\" /><order attribute=\"name\" descending=\"false\" /><filter type=\"and\"><condition attribute=\"ownerid\" operator=\"eq-userid\" /><condition attribute=\"statecode\" operator=\"eq\" value=\"0\" /></filter><attribute name=\"primarycontactid\" /><attribute name=\"telephone1\" /><attribute name=\"accountid\" /><link-entity alias=\"accountprimarycontactidcontactcontactid\" name=\"contact\" from=\"contactid\" to=\"primarycontactid\" link-type=\"outer\" visible=\"false\"><attribute name=\"emailaddress1\" /></link-entity></entity></fetch>",
"parentLayerId": "91405523-73dc-480f-8961-18c7037d87a5",
"subLayerProperties": [
[
"LayerTableLatitudeField",
{
"id": "4204fc97-d1e7-46f5-9122-0d58588e366e",
"name": "LayerTableLatitudeField",
"value": "{\"fieldName\":\"mtrcore_latitude\",\"displayName\":\"Latitude\",\"displayType\":\"Number\",\"isFilterable\":true,\"orderNumber\":178,\"type\":\"number\",\"value\":\"\",\"visibility\":true,\"enabled\":true}",
"subLayerId": "9f89f28f-ecc2-4d5f-806e-76a14e1a4f9e"
}
],
[
"SingleRecordAction",
{
"value": "[{\"id\":\"1a32ffa2-9b96-4ec3-bea6-27b5b73e75fc\",\"actionName\":\"Edit Account\",\"actionData\":[{\"key\":\"entityName\",\"value\":\"account\"},{\"key\":\"entityId\",\"value\":\"{{accountid}}\"},{\"key\":\"formPosition\",\"value\":\"1\"},{\"key\":\"formId\",\"value\":\"\"},{\"key\":\"formProps\",\"value\":\"\"}],\"actionType\":\"OpenD365Modal\",\"actionIcon\":\"Open\",\"actionOrder\":0}]",
"name": "SingleRecordAction",
"id": "30ab775f-aa02-4837-badf-35d684182efa",
"subLayerId": "9f89f28f-ecc2-4d5f-806e-76a14e1a4f9e"
}
],
[
"LayerStyleProperty",
{
"id": "f0c73061-b039-42cc-b7eb-54145e5c6be7",
"name": "LayerStyleProperty",
"value": "{\"version\":8,\"sources\":{\"latlong-source\":{\"type\":\"geojson\",\"data\":{\"type\":\"FeatureCollection\",\"features\":[]}}},\"layers\":[{\"source\":\"latlong-source\",\"id\":\"8287041f-7171-4fac-aa9d-6e3bf43fa3a2-circle\",\"type\":\"circle\",\"paint\":{\"circle-color\":\"rgb(255, 0, 0)\",\"circle-radius\":5,\"circle-stroke-color\":\"rgba(255, 0, 0, 1)\",\"circle-stroke-width\":1,\"circle-opacity\":1},\"metadata\":{\"legendname\":\"My Active Accounts\"}}]}",
"subLayerId": "9f89f28f-ecc2-4d5f-806e-76a14e1a4f9e"
}
],
[
"MultiRecordAction",
{
"value": "[]",
"name": "MultiRecordAction",
"id": "00b047b3-1a1c-4e4a-a912-565ddc48ed23",
"subLayerId": "9f89f28f-ecc2-4d5f-806e-76a14e1a4f9e"
}
],
[
"LayerAttributeProperty",
{
"id": "3f987081-0198-4c0d-b97e-83c6b958660b",
"name": "LayerAttributeProperty",
"value": "[{\"fieldName\":\"accountid\",\"displayName\":\"Account\",\"displayType\":\"String\",\"isFilterable\":true,\"orderNumber\":0,\"type\":\"guid\",\"value\":\"\",\"visibility\":true,\"enabled\":true},{\"fieldName\":\"name\",\"displayName\":\"Account Name\",\"displayType\":\"String\",\"isFilterable\":true,\"orderNumber\":1,\"type\":\"string\",\"value\":\"\",\"visibility\":true,\"enabled\":true},{\"fieldName\":\"address1_city\",\"displayName\":\"Address 1: City\",\"displayType\":\"String\",\"isFilterable\":true,\"orderNumber\":2,\"type\":\"string\",\"value\":\"\",\"visibility\":true,\"enabled\":true},{\"fieldName\":\"mtrcore_latitude\",\"displayName\":\"Latitude\",\"displayType\":\"Number\",\"isFilterable\":true,\"orderNumber\":3,\"type\":\"number\",\"value\":\"\",\"visibility\":true,\"enabled\":true},{\"fieldName\":\"mtrcore_longitude\",\"displayName\":\"Longitude\",\"displayType\":\"Number\",\"isFilterable\":true,\"orderNumber\":4,\"type\":\"number\",\"value\":\"\",\"visibility\":true,\"enabled\":true},{\"fieldName\":\"_primarycontactid_value\",\"displayName\":\"Primary Contact Id\",\"displayType\":\"String\",\"isFilterable\":true,\"orderNumber\":5,\"type\":\"lookup\",\"value\":\"\",\"visibility\":true,\"enabled\":true},{\"fieldName\":\"_primarycontactid_value@OData.Community.Display.V1.FormattedValue\",\"displayName\":\"Primary Contact\",\"displayType\":\"String\",\"isFilterable\":true,\"orderNumber\":6,\"type\":\"string\",\"value\":\"\",\"visibility\":true,\"enabled\":true},{\"fieldName\":\"telephone1\",\"displayName\":\"Main Phone\",\"displayType\":\"String\",\"isFilterable\":true,\"orderNumber\":7,\"type\":\"string\",\"value\":\"\",\"visibility\":true,\"enabled\":true},{\"fieldName\":\"accountprimarycontactidcontactcontactid.emailaddress1\",\"displayName\":\"Email\",\"displayType\":\"String\",\"isFilterable\":true,\"orderNumber\":8,\"type\":\"string\",\"value\":\"\",\"visibility\":true,\"enabled\":true}]",
"subLayerId": "9f89f28f-ecc2-4d5f-806e-76a14e1a4f9e"
}
],
[
"LayerTableIDField",
{
"id": "70356380-8959-4ae1-890b-972360792763",
"name": "LayerTableIDField",
"value": "{\"fieldName\":\"accountid\",\"displayName\":\"Account\",\"displayType\":\"String\",\"isFilterable\":true,\"orderNumber\":1,\"type\":\"guid\",\"value\":\"\",\"visibility\":true,\"enabled\":true}",
"subLayerId": "9f89f28f-ecc2-4d5f-806e-76a14e1a4f9e"
}
],
[
"LayerTitleAttributeProperty",
{
"id": "ab9d3ca2-9817-4581-a4e5-b083c6dc885f",
"name": "LayerTitleAttributeProperty",
"value": "{\"fieldName\":\"accountid\",\"displayName\":\"Account\",\"displayType\":\"String\",\"isFilterable\":true,\"orderNumber\":1,\"type\":\"guid\",\"value\":\"\",\"visibility\":true,\"enabled\":true}",
"subLayerId": "9f89f28f-ecc2-4d5f-806e-76a14e1a4f9e"
}
],
[
"LayerTableLongitudeField",
{
"id": "ad95bc94-7d1d-4b61-9c9b-ecb3a7d159f2",
"name": "LayerTableLongitudeField",
"value": "{\"fieldName\":\"mtrcore_longitude\",\"displayName\":\"Longitude\",\"displayType\":\"Number\",\"isFilterable\":true,\"orderNumber\":179,\"type\":\"number\",\"value\":\"\",\"visibility\":true,\"enabled\":true}",
"subLayerId": "9f89f28f-ecc2-4d5f-806e-76a14e1a4f9e"
}
]
],
"offlineRegions": [],
"isSelected": true,
"hasOffline": false,
"externalLayerId": "00000000-0000-0000-00aa-000010001001",
"parentSubLayerId": "b2adaa9c-45db-410c-8321-28ce4a809ad6",
"isFolder": false,
"order": 1
}
}
]

setRecordAddress

Apply a chosen address result to the current bound record's address fields (used inside form contexts).

Parameters:

FieldTypeRequiredDescription
itemSearchResultYesAddress result returned by searchAddresses().

Usage:

const [addr] = await control.searchAddresses('752 North Lake Rd');
control.setRecordAddress(addr);