isNight static method

bool isNight(
  1. Coordinates coords,
  2. 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:

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'];
}