Location:

RTIC Broadcast

The road condition report includes roads, navigation lines, road conditions ahead of the vehicle, and surrounding road conditions.

Road Traffic Reports

Speech the current road conditions. The sample code is as follows:

                // Set the request parameters
                RoadQuery roadQuery = RoadQuery.newQuery("Beijing-Tibet Expressway");
                // Set the city
                roadQuery.setCity("BEIJING");
                // Initiate a request
                RTICSearch.searchRoadRTIC(roadQuery, new RTICSearch.Listener() {
                    @Override
                    public void onSuccess(RTICResult result) {
                        // request succeeded
                    }

                    @Override
                    public void onFail(APIStatus status) {
                        // Request failed
                    }
                });
            

RoadQuery Description:
1. RoadQuery.newQuery(String roadName) constructor, the parameter is the road name, such as "Kyosho Expressway" or "Kyosang Expressway";
2. setCity (String city) sets the city, city is the city full name / abbreviation / national standard code pinyin, such as "beijing".
Note: The result return interface is an asynchronous thread interface. If the Android project needs to operate the control in the return, it must switch to the Main main thread.

Front Road Reports

Speech the road conditions in the 45° sector in front of the coordinate point. The sample code is as follows:

                // Set the coordinate point set, for reference only
                GeoPoint[] geoPoints=new GeoPoint[]{
                    new GeoPoint(116.2305,40.07837),
                    new GeoPoint(116.23058,40.07822),
                    new GeoPoint(116.23069,40.07801)
                };
                //Initiate a request
                RTICSearch.searchFrontRTIC(FrontQuery.newQuery(geoPoints), new RTICSearch.Listener() {
                    @Override
                    public void onSuccess(RTICResult result) {
                        // request succeeded
                    }

                    @Override
                    public void onFail(APIStatus status) {
                        // Request failed
                    }
                });
            

FrontQuery Description:
1. FrontQuery.newQuery(GeoPoint[] getPoints) constructor with parameters geoPoint coordinate set;
2. FrontQuery.newQuery(GeoPoint getPoint, String direction), parameter explanation:
(1) GeoPoint: geoPoint coordinates.
(2) direction: direction, unit: degree, value range: [0-359], default: 0, true north is 0, counterclockwise direction is positive, ie: positive west is 90, south is 180, east Is 270.
Note: The result return interface is an asynchronous thread interface. If the Android project needs to operate the control in the return, it must switch to the Main main thread.

Nearby Traffic Reports

Speech the road conditions around the POI point. The sample code is as follows:

                // According to the POI point name to initiate a request
                RTICSearch.searchAroundRTIC(AroundQuery.newQuery("NavInfoitu New Building"), new RTICSearch.Listener() {
                    @Override
                    public void onSuccess(RTICResult result) {
                        // request succeeded
                    }

                    @Override
                    public void onFail(APIStatus status) {
                        // Request failed
                    }
                });
            

AroundQuery Description:
1. AroundQuery.newQuery(GeoPoint geoPoints) constructor with parameters geoPoint coordinates;
2. AroundQuery.newQuery(String poiName), the parameter is the name of the poi point, such as "four-dimensional map new building".
Note: The result return interface is an asynchronous thread interface. If the Android project needs to operate the control in the return, it must switch to the Main main thread.

Navigation Line Traffic Reports

Speech the road condition according to the latitude and longitude trajectory. The sample code is as follows:

                    // Set the coordinate point set, for reference only
                    GeoPoint[] geoPoints=new GeoPoint[]{
                        new GeoPoint(116.2305,40.07837),
                        new GeoPoint(116.23058,40.07822),
                        new GeoPoint(116.23069,40.07801),
                        new GeoPoint(116.23114,40.07706),
                        new GeoPoint(116.23138,40.07662)
                    };
                    // Initiate a request
                    RTICSearch.searchNaviRTIC(NaviQuery.newQuery(geoPoints), new RTICSearch.Listener() {
                        @Override
                        public void onSuccess(RTICResult result) {
                            // request succeeded
                        }
    
                        @Override
                        public void onFail(APIStatus status) {
                            // Request failed
                        }
                    });
                

Note: The result return interface is an asynchronous thread interface. If the Android project needs to operate the control in the return, it must switch to the Main main thread.

TOP