Home > @magiclane/maps-sdk > WeatherService > getForecast

WeatherService.getForecast() method

Retrieves weather forecast for coordinates at specified future times.

The duration in each WeatherDurationCoordinates specifies the time offset into the future for which the forecast is requested.

Signature:

static getForecast(input: {
        coords: WeatherDurationCoordinates[];
        onComplete?: (error: GemError, forecasts: LocationForecast[]) => void;
        coverageGeometry?: CoverageGeometry;
    }): ProgressListener;

Parameters

Parameter

Type

Description

{ coords, onComplete, coverageGeometry, }

(not declared)

input

{ coords: WeatherDurationCoordinates[]; onComplete?: (error: GemError, forecasts: LocationForecast[]) => void; coverageGeometry?: CoverageGeometry; }

input properties:

  • coords: WeatherDurationCoordinates[]
  • Optional onComplete?: (error: GemError, forecasts: LocationForecast[]) => void
  • Optional coverageGeometry?: CoverageGeometry

Returns:

ProgressListener

ProgressListener for tracking the operation