LocationService

First available in SystemsLink 2017.3.0.

Use LocationService to get the longitude, latitude, and other location information of resources.

Endpoint address: [SystemsLinkRootUrl]/LocationService.svc

GetGeocodeLocation method

Method Name Parameters C# return type Description

Name

C# data type

GetGeocodeLocation()

locationData

Location

List<Geocode>

Retrieve a list of the longitudes and latitudes of the location specified by locationData CompanyId and/or AdHocAddress. See below for details.

LocationData (Location) object properties and column mapping

Property Database column Comments

Name

C# data type

Name

Data type

Id

string

company.cmp_id

Varchar(8)

AddHocLocation

AdHocAddress

Not mapped to database.

LocationData.AdHocLocation (AdHocAddress) object properties and column mapping

Property Database column Comments

Name

C# data type

Name

Data type

Address1

string

Not used.

Address2

string

Not used.

CityId

int?

city.cty_code

int

Name

string

Not used.

ZipCode

string

Return: List<Geocode>

The following is returned when a valid LocationData.Id (Company ID) is passed in.

Property Database column Comments

Name

C# data type

Name

Data type

Latitude

decimal?

company.cmp_latseconds

decimal (11, 3)

Longitude

decimal?

company.cmp_latseconds

decimal (11, 3)

The following is returned when an invalid locationData.Id (Company ID) is passed in and a valid locationData.AdhocLocation.CityId is passed in.

Property Database column Comments

Name

C# data type

Name

Data type

Latitude

decimal?

city.cty_latitude

decimal (11, 3)

Longitude

decimal?

city.cty_longitude

decimal (11, 3)

GetGeography method

Method Name Parameters C# return type Description

Name

C# data type

GetGeography()

locationData

Location

Geography

Retrieve Geography object as specified by locationData CompanyId and/or AdHocAddress. See below for details.

LocationData (Location) object properties and column mapping

Property Database column Comments

Name

C# data type

Name

Data type

Id

string

company.cmp_id

varchar(8)

AddHocLocation

AdHocAddress

Not mapped to database.

LocationData.AdHocLocation (AdHocAddress) object properties and column mapping

Property Database column Comments

Name

C# data type

Name

Data type

Address1

string

Not used.

Address2

string

Not used.

CityId

int?

city.cty_code

int

Name

string

Not used.

ZipCode

string

Return: Geography

Geography object properties and column mappings when a valid locationData.Id (Company ID) is passed in.

Property Database column Comments

Name

C# data type

Name

Data type

LatitudeLongitude

GeoCode

Not mapped to database.

City

string

city.cty_name

varchar(18)

Only when company.cmp_city is valid.

State

string

city.cty_state

varchar(6)

Only when company.cmp_city is valid.

Geography.Geocode object properties and column mappings when a valid locationData.Id (Company ID) is passed in.

Property Database column Comments

Name

C# data type

Name

Data type

Latitude

decimal?

company.cmp_latseconds

decimal (11, 3)

Longitude

decimal?

company.cmp_latseconds

decimal (11, 3)

Geography object properties and column mappings when an invalid locationData.Id (Company ID) is passed in and a valid locationData.AdhocLocation.CityId is passed in.

Property Database column Comments

Name

C# data type

Name

Data type

LatitudeLongitude

GeoCode

Not mapped to database.

City

string

city.cty_name

varchar(18)

Only when company.cmp_city is valid.

State

string

city.cty_state

varchar(6)

Only when company.cmp_city is valid.

Geography.Geocode object properties and column mappings when an invalid locationData.Id (Company ID) is passed in and a valid locationData.AdhocLocation.CityId is passed in.

Property Database column Comments

Name

C# data type

Name

Data type

Latitude

decimal?

city.cty_latitude

decimal (14, 6)

Longitude

decimal?

city.cty_longitude

decimal (14, 6)

GetLocation method

Method Name Parameters C# return type Description

Name

C# data type

GetLocation()

locationData

Location

Location

Retrieve Location object as specified by locationData. See below for details.

LocationData (Location) object properties and column mapping

Property Database column Comments

Name

C# data type

Name

Data type

Id

string

company.cmp_id

Varchar(8)

AddHocLocation

AdHocAddress

Not mapped to database.

LocationData.AdHocLocation (AdHocAddress) object properties and column mapping

Property Database column Comments

Name

C# data type

Name

Data type

Address1

string

Not used.

Address2

string

Not used.

CityId

int?

city.cty_code

int

Name

string

city.cty_name

varchar(18)

Not used.

ZipCode

string

Return: Location

The following is returned when a valid locationData.Id (Company ID) is passed in.

Property Database column Comments

Name

C# data type

Name

Data type

Id

string

company.cmp_id

Varchar(8)

First address associated with the safety incident.

AddHocLocation

AdHocAddress

Not mapped to database.

The following Location.AdhocLocation (AdHocAddress) is returned when a valid locationData.Id (Company ID) is passed in.

Property Database column Comments

Name

C# data type

Name

Data type

Address1

string

company.cmp_address1

varchar(100)

Address2

string

company.cmp_address2

varchar(100)

CityId

int?

company.cmp_city

int

Name

string

company.cmp_name

varchar(100)

ZipCode

string

company.cmp_zip

varchar(100)

Location object properties and column mappings when an invalid locationData.Id (Company ID) is passed in and a valid locationData.AdhocLocation.CityId are passed in.

Property Database column Comments

Name

C# data type

Name

Data type

Id

string

Not used.

AddHocLocation

AdHocAddress

Not mapped to database.

Location.AdhocLocation object properties and column mappings when an invalid locationData.Id (Company ID) is passed in and a valid locationData.AdhocLocation.CityId are passed in.

Property Database column Comments

Name

C# data type

Name

Data type

Address1

string

Not used.

Address2

string

Not used.

CityId

int?

city.cty_code

int

Name

string

company.cmp_name

Not used.

ZipCode

string

company.cmp_zip

varchar(10)