GeoLocation

constructor(name: String, latitude: Double, longitude: Double, timeZone: TimeZone)

GeoLocation constructor with parameters for all required fields.

Parameters

name

The location name for display use such as "Lakewood, NJ"

latitude

the latitude in a double format such as 40.095965 for Lakewood, NJ. Note: For latitudes south of the equator, a negative value should be used.

longitude

double the longitude in a double format such as -74.222130 for Lakewood, NJ. Note: For longitudes east of the Prime Meridian (Greenwich), a negative value should be used.

timeZone

the TimeZone for the location.


constructor(name: String, latitude: Double, longitude: Double, elevation: Double, timeZone: TimeZone)

GeoLocation constructor with parameters for all required fields.

Parameters

name

The location name for display use such as "Lakewood, NJ"

latitude

the latitude in a double format such as 40.095965 for Lakewood, NJ. Note: For latitudes south of the equator, a negative value should be used.

longitude

double the longitude in a double format such as -74.222130 for Lakewood, NJ. Note: For longitudes east of the [Prime

  • Meridian](https://en.wikipedia.org/wiki/Prime_Meridian) (Greenwich), a negative value should be used.

elevation

the elevation above sea level in Meters. Elevation is not used in most algorithms used for calculating sunrise and set.

timeZone

the TimeZone for the location.


constructor()

Default GeoLocation constructor will set location to the Prime Meridian at Greenwich, England and a TimeZone of GMT. The longitude will be set to 0 and the latitude will be 51.4772 to match the location of the Royal Observatory, Greenwich. No daylight savings time will be used.


constructor(location: Location)
constructor(timeZone: TimeZone, locationName: String)