目录

MapNaviLink

Class Info

public class MapNaviLink

Road link information class.

Public Field Summary

Qualifier and Type

Field and Description

Value

public static final int

KIND_INNER_LINK

Inner link.

1

public static final int

KIND_INTERSECTION_IN

Intersection entrance link.

2

public static final int

KIND_INTERSECTION_OUT

Intersection exit link.

4

public static final int

KIND_ROUNDABOUT_INNER

Roundabout inner link.

8

public static final int

KIND_REAL_TUNNEL

Real tunnel link.

16

public static final int

KIND_PASS_SIDE

Left-turn and right-turn exclusive lane link.

32

public static final int

KIND_HIGHWAY_CONNECT

Highway connector link.

64

Public Method Summary

Qualifier and Type

Method Name and Description

boolean

isHighwayConnect()

Checks whether the link is a highway connector link.

boolean

isRealTunnel()

Checks whether a link is a tunnel link.

List<MapNaviBranch>

getBranches()

Obtains a list of branches connected with the link.

List<NaviLatLng>

getCoords()

Obtains a list of coordinate points on the road of the link.

String

getCountryCode()

Obtains the country/region code of the link.

int

getCrdBegIndex()

Obtains the index of the link start point among all points.

int

getCrdEndIndex()

Obtains the index of the link end point among all points.

List<MapTrafficStatus>

getCurStatus()

Obtains the processed traffic condition of the link.

int

getDescType()

Obtains the route description type (route detail) of the link.

int

getDir()

Obtains the road direction of the link.

int

getDriveSide()

Obtains the drive side information of the link.

int

getDuration()

Obtains the estimated road pass-through time of the link.

float

getFlowSpeed()

Obtains the average flow speed of the link.

List<MapTrafficStatus>

getFullTrafficStatus()

Obtains the full traffic status (MapTrafficStatus) regardless of the segmented traffic condition.

int

getGrade()

Obtains the road level of the link.

long

getHwId()

Obtains hw_id of the road of the link.

List<JamSegment>

getJamSegments()

Obtains traffic condition segment information.

int

getJamType()

Obtains the jam type of the link.

int

getKind()

Obtains the road type of the link.

int[]

getLaneFullNum()

Obtains all lanes of the link.

int[]

getLaneFullNum4K()

Obtains all lanes of the link (4K navigation).

int

getLaneValid()

Obtains the road traffic relationship of the link.

float

getLength()

Obtains the length of the link.

String

getLocalRoadLangCode()

Obtains the local language code of the link.

String

getLocalRoadName()

Obtains the road name of the link in the local language.

int

getMaxLimitSpeed()

Obtains the maximum speed limit of the link.

int

getPntsNum()

Obtains the number of shape points of the link.

int

getRoadClass()

Obtains the road type of the link.

String

getRoadId()

Obtains the global road ID of the link.

String

getRoadName()

Obtains the default road name of the link.

List<RoadSignInfo>

getRoadSn()

Obtains information about all road signs of the link.

ArrayList<String>

getRoadSnBgs()

Obtains the background IDs of all road signs of the link.

ArrayList<String>

getRoadSnNames()

Obtains all road sign names of the link.

String

getSettingRoadLangCode()

Obtains the code of the language set for the link.

String

getSettingRoadName()

Obtains the road name in the language set for the link.

int

getSpeedUnit()

Obtains the road speed limit unit of the link.

int

getTime()

Obtains the estimated pass-through time of the link.

long

getTimeStamp()

Obtains the real-time traffic timestamp of the link.

NaviLatLng

getTrafficLightCoord()

Obtains the traffic light coordinates of the link.

boolean

getTrafficLights()

Checks whether the link has traffic lights.

boolean

isFerry()

Checks whether the link involves ferries.

String

toString()

Prints the default road name, start point index, and end point index.

Public Fields

[h2]KIND_INNER_LINK

Fields

public static final int KIND_INNER_LINK

Inner link.

KIND_INNER_LINK: 1

For other constant values, please refer to Constant-values.

[h2]KIND_INTERSECTION_IN

Fields

public static final int KIND_INTERSECTION_IN

Intersection entrance link.

KIND_INTERSECTION_IN: 2

For other constant values, please refer to Constant-values.

[h2]KIND_INTERSECTION_OUT

Fields

public static final int KIND_INTERSECTION_OUT

Intersection exit link.

KIND_INTERSECTION_OUT: 4

For other constant values, please refer to Constant-values.

[h2]KIND_ROUNDABOUT_INNER

Fields

public static final int KIND_ROUNDABOUT_INNER

Roundabout inner link.

KIND_ROUNDABOUT_INNER: 8

For other constant values, please refer to Constant-values.

[h2]KIND_REAL_TUNNEL

Fields

public static final int KIND_REAL_TUNNEL

Real tunnel link.

KIND_REAL_TUNNEL: 16

For other constant values, please refer to Constant-values.

[h2]KIND_PASS_SIDE

Fields

public static final int KIND_PASS_SIDE

Left-turn and right-turn exclusive lane link.

KIND_PASS_SIDE: 32

For other constant values, please refer to Constant-values.

[h2]KIND_HIGHWAY_CONNECT

Fields

public static final int KIND_HIGHWAY_CONNECT

Highway connector link.

KIND_HIGHWAY_CONNECT: 64

For other constant values, please refer to Constant-values.

Public Methods

[h2]isHighwayConnect

Method

public boolean isHighwayConnect()

Checks whether the link is a highway connector link.

Returns

Type

Description

boolean

Whether the link is a highway connector link.

  • true: yes
  • false: no

[h2]isRealTunnel

Method

public boolean isRealTunnel()

Checks whether a link is a tunnel link. Note that the tunnel here refers to the tunnel attribute in real data instead of the tunnel of the service-side inducing point.

Returns

Type

Description

boolean

Whether the link is a tunnel link.

  • true: yes
  • false: no

[h2]getBranches

Method

public List<MapNaviBranch> getBranches()

Obtains a list of branches connected with the link.

Returns

Type

Description

List<MapNaviBranch>

A list of branches connected with the link. For details, please refer to MapNaviBranch.

[h2]getCoords

Method

public List<NaviLatLng> getCoords()

Obtains a list of coordinate points on the road of the link.

Returns

Type

Description

List<NaviLatLng>

A list of coordinate points on the road of the link. For details, please refer to NaviLatLng.

[h2]getCountryCode

Method

public String getCountryCode()

Obtains the country/region code of the link.

Returns

Type

Description

String

Country/Region code of the link.

[h2]getCrdBegIndex

Method

public int getCrdBegIndex()

Obtains the index of the link start point among all points.

Returns

Type

Description

int

Index of the link start point among all points.

[h2]getCrdEndIndex

Method

public int getCrdEndIndex()

Obtains the index of the link end point among all points.

Returns

Type

Description

int

Index of the link end point among all points.

[h2]getCurStatus

Method

public List<MapTrafficStatus> getCurStatus()

Obtains the processed traffic condition of the link. This method is used for historical traffic conditions and in-app internal roads.

Returns

Type

Description

List<MapTrafficStatus>

Processed traffic condition of the link.

[h2]getDescType

Method

public int getDescType()

Obtains the route description type (route detail) of the link.

Returns

Type

Description

int

Route description type of the link. For details, please refer to PathType.

[h2]getDir

Method

public int getDir()

Obtains the road direction of the link.

Returns

Type

Description

int

Road direction of the link.

  • 0: bidirectional
  • 1: forward direction
  • 2: reverse direction
  • 3: unknown

[h2]getDriveSide

Method

public int getDriveSide()

Obtains the drive side information of the link.

Returns

Type

Description

int

Drive side of the link.

  • 0: left side
  • 1: right side

[h2]getDuration

Method

public int getDuration()

Obtains the estimated road pass-through time of the link.

Return

Type

Description

int

Estimated road pass-through time, in 0.1s.

[h2]getFlowSpeed

Method

public float getFlowSpeed()

Obtains the average flow speed of the link.

Returns

Type

Description

float

Average flow speed of the link, in km/h.

[h2]getFullTrafficStatus

Method

public List<MapTrafficStatus> getFullTrafficStatus()

Obtains the full traffic status (MapTrafficStatus) regardless of the segmented traffic condition. (This method is used for drawing internal roads in the app.)

Returns

Type

Description

List<MapTrafficStatus>

Full traffic status regardless of the segmented traffic condition. The list contains only one traffic condition object covering the entire link.

[h2]getGrade

Method

public int getGrade()

Obtains the road level of the link.

Returns

Type

Description

int

Road level of the link. For details, please refer to RoadClass.

[h2]getHwId

Method

public long getHwId()

Obtains hw_id of the road of the link.

Returns

Type

Description

long

hw_id of the road of the link.

[h2]getJamSegments

Method

public List<JamSegment> getJamSegments()

Obtains original traffic condition segment information.

Returns

Type

Description

List<JamSegment>

Original traffic condition segment information. For details, please refer to JamSegment.

[h2]getJamType

Method

public int getJamType()

Obtains the jam type of the link.

Returns

Type

Description

int

Jam type of the link. For details, please refer to TrafficStatus.

[h2]getKind

Method

public int getKind()

Obtains the road type of the link.

Returns

Type

Description

int

Road type of the link.

  • bit0: internal link
  • bit1: entrance intersection link
  • bit2: exit intersection link
  • bit3: roundabout link
  • bit4: tunnel link
  • bit5: left-turn and right-turn exclusive lane link
  • bit6: highway connector link

For details about types after calculation, please refer to Public Field Summary.

[h2]getLaneFullNum

Method

public int[] getLaneFullNum()

Obtains the number of all lanes of the link.

Returns

Type

Description

int[]

Number of all lanes of the link (for SD+ enlarged image).

Element corresponding to subscript 0: number of lanes in the current driving direction

Element corresponding to subscript 1: number of lanes in the opposite direction

[h2]getLaneFullNum4K

Method

public int[] getLaneFullNum4K()

Obtains all lanes of the link (4K navigation).

Returns

Type

Description

int[]

Number of all lanes of the link (for 4K enlarged image).

Element corresponding to subscript 0: number of lanes on the left.

Element corresponding to subscript 1: number of lanes on the right.

[h2]getLaneValid

Method

public int getLaneValid()

Obtains the road traffic relationship of the link.

Returns

Type

Description

int

Road traffic relationship of the link. The value is a 32-bit binary number, and the last 5 bits indicates the number of lanes. The value 1 indicates that the lane can be passed, and the value 0 indicates that the lane cannot be passed.

Example: 0010 1000 0000 0000 0000 0000 0001 1110

The example value indicates that there are five lanes and the four lanes on the left can be passed.

[h2]getLength

Method

public float getLength()

Obtains the length of the link.

Returns

Type

Description

float

Length of the link, in meters.

[h2]getLocalRoadLangCode

Method

public String getLocalRoadLangCode()

Obtains the local language code of the link.

Returns

Type

Description

String

Local language code of the link.

[h2]getLocalRoadName

Method

public String getLocalRoadName()

Obtains the road name of the link in the local language.

Returns

Type

Description

String

Road name of the link in the local language.

[h2]getMaxLimitSpeed

Method

public int getMaxLimitSpeed()

Obtains the maximum speed limit of the link.

Returns

Type

Description

int

Maximum speed limit of the link, in km/h.

[h2]getPntsNum

Method

public int getPntsNum()

Obtains the number of shape points of the link.

Returns

Type

Description

int

Number of shape points of the link.

[h2]getRoadClass

Method

public int getRoadClass()

Obtains the road type of the link.

Returns

Type

Description

int

Road type of the link.

  • 10: motorway
  • 20: major road of high importance
  • 30: other major road
  • 40: secondary road
  • 51: local connecting road
  • 52: local road of high importance
  • 60: local road
  • 70: local road of minor importance
  • 80: other road

[h2]getRoadId

Method

public String getRoadId()

Obtains the global road ID of the link.

Returns

Type

Description

String

Global road ID of the link.

[h2]getRoadName

Method

public String getRoadName()

Obtains the default road name of the link.

Returns

Type

Description

String

Default road name of the link.

[h2]getRoadSn

Method

public List<RoadSignInfo> getRoadSn()

Obtains information about all road signs of the link.

Returns

Type

Description

List<RoadSignInfo>

Information about all road signs of the link. For details, please refer to RoadSignInfo.

[h2]getRoadSnBgs

Method

public ArrayList<String> getRoadSnBgs()

Obtains the background IDs of all road signs of the link.

Returns

Type

Description

ArrayList<String>

Background IDs of all road signs of the link.

[h2]getRoadSnNames

Method

public ArrayList<String> getRoadSnNames()

Obtains all road sign names of the link.

Returns

Type

Description

ArrayList<String>

All road sign names of the link.

[h2]getSettingRoadLangCode

Method

public String getSettingRoadLangCode()

Obtains the code of the language set for the link.

Returns

Type

Description

String

Code of the language set for the link.

[h2]getSettingRoadName

Method

public String getSettingRoadName()

Obtains the road name in the language set for the link.

Returns

Type

Description

String

Road name in the language set for the link.

[h2]getSpeedUnit

Method

public int getSpeedUnit()

Obtains the road speed limit unit of the link.

Returns

Type

Description

int

Road speed limit unit of the link. For details, please refer to SpeedUtilConstants.

[h2]getTime

Method

public int getTime()

Obtains the estimated pass-through time of the link.

Returns

Type

Description

int

Estimated pass-through time of the link, in seconds.

[h2]getTimeStamp

Method

public long getTimeStamp()

Obtains the real-time traffic timestamp of the link.

Returns

Type

Description

long

Real-time traffic timestamp of the link.

[h2]getTrafficLightCoord

Method

public NaviLatLng getTrafficLightCoord()

Obtains the traffic light coordinates of the link. If there is no traffic light, null will be returned.

Returns

Type

Description

NaviLatLng

Longitude-latitude coordinates of the traffic light. For details, please refer to NaviLatLng.

[h2]getTrafficLights

Method

public boolean getTrafficLights()

Checks whether the link has traffic lights.

Returns

Type

Description

boolean

Whether the link has traffic lights.

true: yes

false: no

[h2]isFerry

Method

public boolean isFerry()

Checks whether the link involves ferries.

Returns

Type

Description

boolean

Whether the link involves ferries.

  • true: yes
  • false: no

[h2]toString

Method

public String toString()

Prints the default road name, start point index, and end point index.

Returns

Type

Description

String

Default road name, start point index, and end point index.