android - Route calculation failed and simulating re-routing -
i using skobbler sample android sdk (downloaded here) write navigation application , works perfect if run application android studio when install application using generated apk, fails on route calculation , in logs is:
06-04 10:09:43.435 6285-6285/com.skobbler.sdkdemo d/skmaps﹕ skmapsurfaceview----@setzoom 11.0 06-04 10:09:43.435 6285-6285/com.skobbler.sdkdemo d/skmaps﹕ skmapsurfaceview---- centermaponposition [101.6156902,3.0311728] 06-04 10:09:43.435 6285-6285/com.skobbler.sdkdemo d/skmaps﹕ skroutemanager---- @clearallroutesfromcache 06-04 10:09:43.436 6285-6285/com.skobbler.sdkdemo d/skmaps﹕ skroutemanager---- @calculateroute skroutesettings [startcoordinate=[101.6156902,3.0311728], destinationcoordinate=[101.6156,3.03496], routemode=car_fastest, alternativeroutemodes=null, routeconnectionmode=hybrid, downloadroutecorridor=true, routecorridorwidthinmeters=2000, waitforcorridordownload=false, destinationispoint=true, tollroadsavoided=false, highwaysavoided=false, avoidferries=false, noofroutes=1, countrycodesreturned=false, extendedpointsreturned=false, viapoints=null, useroadslopes=false, exposeroute=true, filteralternatives=false, requestadvices=true, bicyclewalk= false, bicyclecarryavoided= false] 06-04 10:09:43.437 6285-6285/com.skobbler.sdkdemo d/skmaps﹕ skroutemanager----@clearcurrentroute 06-04 10:09:43.437 6285-6285/com.skobbler.sdkdemo d/skobblerng﹕ clear route 06-04 10:09:43.437 6285-6285/com.skobbler.sdkdemo d/skobblerng﹕ clear route final 06-04 10:09:43.439 6285-6285/com.skobbler.sdkdemo d/skmaps﹕ skutils----return calculated device type high 06-04 10:09:43.440 6285-6285/com.skobbler.sdkdemo d/skmaps﹕ skroutemanager---- calculate route setroute skroutesettings [startcoordinate=[101.6156902,3.0311728], destinationcoordinate=[101.6156,3.03496], routemode=car_fastest, alternativeroutemodes=null, routeconnectionmode=hybrid, downloadroutecorridor=true, routecorridorwidthinmeters=2000, waitforcorridordownload=false, destinationispoint=true, tollroadsavoided=false, highwaysavoided=false, avoidferries=false, noofroutes=1, countrycodesreturned=false, extendedpointsreturned=false, viapoints=null, useroadslopes=false, exposeroute=true, filteralternatives=false, requestadvices=true, bicyclewalk= false, bicyclecarryavoided= false] 06-04 10:09:43.440 6285-6285/com.skobbler.sdkdemo d/skobblerng﹕ java_com_skobbler_ngx_routing_skroutemanager_setroute 06-04 10:09:43.440 6285-6285/com.skobbler.sdkdemo d/skobblerng﹕ no via points added route 06-04 10:09:43.442 6285-6285/com.skobbler.sdkdemo d/skobblerng﹕ java_com_skobbler_ngx_routing_skroutemanager_setroute final 06-04 10:09:43.445 6285-6344/com.skobbler.sdkdemo d/skmaps﹕ skroutemanager---- @onroutecalculationfailed called skroutingerrorcode =route_cannot_be_calculated 06-04 10:09:43.447 6285-6344/com.skobbler.sdkdemo w/skmaps﹕ skroutemanager---- @onallroutescompleted called
also, there way simluate re-routing when using navigation in sknavigationtype.simulation
mode? tried changing current user location explicitly inside oncurrentpositionupdate(skposition currentposition)
method this, isn't working:
@override public void oncurrentpositionupdate(skposition currentposition) { iteration++; this.currentposition = currentposition; if (mapview != null) { if(iteration >= 5) { toast.maketext(mapactivity.this, "changed location", toast.length_long).show(); this.currentposition = new skposition(); this.currentposition.setcoordinate(new skcoordinate(101.618133, 3.025863)); } mapview.reportnewgpsposition(this.currentposition); } }
for simulating re-routing, have use blockroad method sknavigationmanager. please check doc here: http://developer.skobbler.ro/docs/android/com/skobbler/ngx/navigation/sknavigationmanager.html#blockroad%28double%29
Comments
Post a Comment