Tide and Currents

For iOS SDK v4.6+

The ocean SDK includes Tide and Currents data in more than 10,000 ports or locations around the world.

Tide

Global tide table and forecast data for the next 10 days.

Interface code (Enum) Interface Class
INQUIRE_TYPE_OCEAN_TIDE Tide data OceanTideBaseClass

Request Parameters

If no optional parameters are set, the default value will be used.

location

The tide station to be queried, need LocationID and LocationID can be obtained by POI Lookup.

For example: location=P2951

date

Set the date, up to 10 days in the future (including today). The date format is yyyyMMdd

For example: date=20200531

appKey

API authentication key, please refer to How To Get Your Key.

For example: appKey=12334567890ABC

Sample Code

QWeatherConfigInstance.publicID = @"publicID";
QWeatherConfigInstance.appKey = @"key";
QWeatherConfigInstance.appType = APP_TYPE_BIZ;    
QWeatherConfigInstance.location = @"P66981";
QWeatherConfigInstance.date = @"20210518";
[QWeatherConfigInstance weatherWithInquireType: INQUIRE_TYPE_OCEAN_TIDE WithSuccess:^(OceanTideBaseClass  *responseObject) {
        
    NSLog(@"描述->%@",[responseObject description]);
        
} faileureForError:^(NSError *error) {
    NSLog(@"error->%@",error);
        
}];

Response

Parameters Description
code

API status code, please refer to Status Code

updateTime

API last update time

fxLink

Responsive web page of this data, for embedded in website or APP

tideTable.fxTime

High tide or Low tide time

tideTable.height

The height of the wave, in meters

tideTable.type

High tide (H) or Low tide (L)

tideHourly.fxTime

Hourly forecast time

tideHourly.height

The height of the wave, in meters

refer.sources

Data source and other statements, may be null

refer.license

Data license, may be null

Currents

Currents data for the next 10 days, including currents speed, direction and hourly forecast.

Interface code (Enum) Interface Class
INQUIRE_TYPE_OCEAN_CURRENTS Currents data OceanTideBaseClass

Request Parameters

If no optional parameters are set, the default value will be used.

location

The currents station to be queried, need LocationID and LocationID can be obtained by POI Lookup.

For example: location=P66981

date

Set the date, up to 10 days in the future (including today). The date format is yyyyMMdd

For example: date=20200531

appKey

API authentication key, please refer to How To Get Your Key.

For example: appKey=12334567890ABC

Sample Code

QWeatherConfigInstance.publicID = @"publicID";
QWeatherConfigInstance.appKey = @"key";
QWeatherConfigInstance.appType = APP_TYPE_BIZ;    
QWeatherConfigInstance.location = @"P66981";
QWeatherConfigInstance.date = @"20210518";
[QWeatherConfigInstance weatherWithInquireType: INQUIRE_TYPE_OCEAN_CURRENTS WithSuccess:^(OceanCurrentsBaseClass  *responseObject) {
        
    NSLog(@"描述->%@",[responseObject description]);
        
} faileureForError:^(NSError *error) {
    NSLog(@"error->%@",error);
        
}];

Response

Parameters Description
code

API status code, please refer to Status Code

updateTime

API last update time

fxLink

Responsive web page of this data, for embedded in website or APP

currentsTable.fxTime

Maximum speed time

currentsTable.speedMax

Maximum speed, cm/sec

currentsTable.dir360

Currents direction in azimuth degree

currentsHourly.fxTime

Hourly forecast time

currentsHourly.speed

Currents speed, cm/sec

currentsHourly.dir360

Currents direction in azimuth degree

refer.sources

Data source and other statements, may be null

refer.license

Data license, may be null