Alert Service
Alert Service
Notice: using alert service directly is a legacy way to leverage the ability of the TA SDK. It's recommended to use drive session instead. Refer to the guide of drive session for more information.
Overview
Alert service provides all the alert data, route situation and specific traffic information. The maximum length limitation the alert can detect is 5 km on a normal road and 80 km on a highway. The alert data source comes from the map and traffic supplier.
Key Concepts
Alert Type
- Zone alert: presents an area with a warning. It's basically a composite with a sequence of links. The following table contains the supported zone alerts and corresponding type definitions in alert service.
Category | Types |
---|---|
School Zone | kSchoolZone |
Conditional Speed Limit Zone Alert | kRainyDaySpeedLimit kSnowyDaySpeedLimit kTimeSpeedLimit kSeasonalTimeSpeedLimit kLaneSpeedLimit kFoggyDaySpeedLimit |
Section Speed Camera | kSectionSpeedCamera |
Access Restriction | kAccessRestriction |
Physical Restriction | kPhysicalRestriction |
Time Restriction | kTimedRestriction |
Road Work | kRoadWork |
- Generic alert: presents a single point-based warning. It is usually a real-world object, such as a traffic sign or a safety camera. The following table contains the supported generic alerts and corresponding type definitions in alert service.
Category | Types |
---|---|
Camera | kSpeedCamera kRedlightCamera kBuslaneCamera kRedlightandspeedCamera kSectionstartCamera kSectionendCamera kDistanceCamera kNolrturnsCamera kOtherCamera kBeginingpointoflaneandspeedingviolationblockCamera kExclusivebuslaneandspeedingviolationCamera kExclusivebuslaneviolationCamera kInformationgatheringCamera kLoadingviolationCamera kNopassingenforcementCamera kOtherviolationCamera kOverloadingviolationCamera kParkingviolationCamera kShoulderlaneenforcementCamera |
Traffic signs | kBeginOvertaking kEndOvertaking kProtectedOvertakingExtraLane kProtectedOvertakingExtraRight kProtectedOvertakingExtraLeft kLaneMergeRight kLaneMergeLeft kLaneMergeCenter kRailwayCrossingProtected kRailwayCrossingUnprotected kRoadNarrows kSharpCurveLeft kSharpCurveRight kWindingRoadStartingLeft kWindingRoadStartingRight kBeginOvertakingTrucks kEndOvertakingTrucks kSteepHillUpwards kSteepHillDownwards kStopSign kLateralWind kGeneralWarningSign(kQuickTurn) kRiskOfGrounding kGeneralCurve kEndOfAllRestrictions kGeneralHill kAnimalCrossing kIcyConditions kSlipperyRoad kFallingRocks kLeftFallingRocks kRightFallingRocks kSchoolSign kTramwayCrossing kCongestionHazard kAccidentHazard kPriorityOverOncomingTraffic kYieldToOncomingTraffic kCrossingWithPriorityFromRight kPedestrianCrossing kYield kBeginNoEngineBrake kEndNoEngineBrake kNoIdling kTruckRollOver kBeginLowGear kEndLowGear kBicycleCrossing kYieldToBicycles kUrbanArea kEmbankment kTwoWayTraffic kUnevenRoad kFloodArea kHumpBridge kSTurns kWindingRoad kMaxSpeed |
TollBooth | kTollbooth |
Other | kBlackSpot kFerry kTunnel kOverpass/kUnderpass(only korea) kUnpaved kSpeedBumper kCrossBorder |
TollBooth information
Attribute | Description |
---|---|
name | The tollbooth name string |
- Traffic incident alert: presents a traffic incident with TMC-based traffic incident code. The following table contains the supported traffic incident type definitions in alert service.
Types | Description |
---|---|
kPoliceCheckPoint | The police check point |
kAccident | Accident alert, it indicates that there exists a traffic accident |
kAccidentCleared | Accident cleared alert, it indicates that an accident is cleared |
kRoadConstruction | Road construction alert, it indicates that there exists roadworks incident ahead |
kRoadConstructionEnded | Road construction ended alert, it indicates that a roadwork incident is cleared |
kBlockedRoad | Blocked road alert, it indicates that there exists blocked roads ahead |
kHazardousRoad | Hazardous road alert, it indicates there exists hazardous roads ahead |
kHazardousRoadPassed | Hazardous road passed alert, it indicates there exists a hazardous roads cleared incident ahead |
kLaneRestriction | Lane restriction alert, it indicates there exists lane restriction roads ahead |
kLaneRestrictionOver | Lane restriction alert, it indicates that a lane restriction is over |
kCongestion | Congestion alert, it indicates that there exists a congestion incident ahead |
kCongestionCleared | Congestion alert, it indicates that there exists a congestion cleared incident ahead |
kEntryBlock | Congestion alert, it indicates that there exists an entry block incident ahead |
kEntryReopen | Congestion alert, it indicates that there exists an entry reopen incident ahead |
kExitBlock | Congestion alert, it indicates that there exists an exit block incident ahead |
kExitReopen | Congestion alert, it indicates that there exists an exit reopen cleared incident ahead |
kTrafficFlow | Traffic flow alert, it indicates that there exists roads with traffic flow ahead |
- Highway information: presents the exit along the highway, including those ahead and behind the vehicle. Each highway information item contains the following contents:
Attribute | Description |
---|---|
Location | Get the location of this item on the highway. For highway exit, it means the position of exit branching off. |
HighwayName | The link's name |
ShieldInfo | The highway shield info |
DistanceToVehicle | The distance from the item to vehicle |
Exit | The exit property of highway info |
The highway info details:
Shield Info | Attribute | Description | | -- | -- | | ShieldInfo | The highway shield info | | globalId | The shield icon ID | | iconImage | The shield icon image bitmap data | | roadNumber | The current road number | | direction | The directon content |
Exit Info | Attribute | Description | | -- | -- | | exitLocation | The exit location | | signpost | The signpost info | | exitNumber | The exit number | | exitName | The exit name | | iconImage | The exit icon image bitmap data | | type | The exit type |
- User position information: presents the road and administrative information nearby.
Attribute | Description |
---|---|
ClosestStreetInfo | The closest street info when vehicle is not on road |
CurrentStreetName | The current street name |
NextIntersection | The next intersection info |
PreviousIntersection | The previous intersection info |
AdminInfo | The current admin info |
TimeZone | The current time zone info |
ClosestStreetInfo: This attribute is only available when the vehicle is not on the road.
Attribute | Description |
---|---|
name | The street name |
distanceToVehicle | The distance from current road to the street |
Intersection Info
Attribute | Description |
---|---|
location | The location of this intersection |
crossRoadInfos | All the cross road info at this intersection |
currentRoadInfo | The current road info |
distanceToVehicle | The distance between current vehicle postion and the intersection |
Admin Info
Attribute | Description |
---|---|
countryCode | The country code |
country | The country admin info |
state | The state admin info |
city | The city admin info |
subcity | The subcity admin info |
Admin Item
Attribute | Description |
---|---|
name | The admin's name |
adminLevel | The admin level info such as country, state, city, etc |
Time Zone
Attribute | Description |
---|---|
UTC_offset | UTC time offset based on UTC±00:00 in seconds |
DST_offset | Daylight saving time in seconds |
country_code | The country code |
timezone_name | String representation of time zone name |
Generic and zone alert information
Setup an alert service with alert detection enabled.
Disable alert detection and remove listener when it's not needed anymore.
Make a customized alert observer to handle alert information changes.
Highway information
Alert service provides highway information including highway names, shield icons and exits. Setup an alert service with highway information detection enabled.
Disable highway information detection and remove listener when it's not needed anymore.
Make a customized alert observer to handle highway information changes.
User position information
Alert service notifies administrative level, time zone, road name, next/previous intersection name, house number and shield icon of the vehicle they are driving on. The maximum road detected limit is 3 km. Setup an alert service with user position detection enabled.
Disable user position detection and remove listener when it's not needed anymore.
Make a customized alert observer to handle user position information changes.
Violation warning
Speed alert can provide users with the speed limit information and a speeding warning. Setup an alert service with violation warning detection enabled.
Disable violation warning detection and remove listener when it's not needed anymore.
Make a customized alert observer to handle violation warning changes.
Lane guidance information
Alert service provides lane guidance information for lane level navigation experience. In free mode, it only provides static lane information. In navigation mode, it also provides lane level navigation guidance instructions. Setup an alert service with lane guidance enabled.
Disable lane guidance and remove listener when it's not needed anymore.
Make a customized alert observer to handle lane guidance.