isNight static method
- Coordinates coords,
- DateTime time
Returns whether it is night at the given coordinates and reference time.
Parameters
coords: (Coordinates) WGS84 coordinates.time: (DateTime) Reference time.
Returns
- (
bool) True if it is night at the specified location/time, false otherwise.
Also see:
- getSunriseAndSunset - Retrieve sunrise/sunset times for a location.
Implementation
static bool isNight(final Coordinates coords, final DateTime time) {
final OperationResult resultString = staticMethod(
'MapDetails',
'isNight',
args: <String, Object>{
'coords': coords,
'refTime': time.millisecondsSinceEpoch,
},
);
return resultString['result'];
}