aviroez / osmbonuspack

Automatically exported from code.google.com/p/osmbonuspack
0 stars 0 forks source link

mNodes does not seem to be initialized on Road class. #31

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Run a for loop with mNodes.size() parameter;

What is the expected output? What do you see instead?
Expected output = the size of mNodes from a Road;
What I see = mNodes is aways zero;

What version of the product are you using?
osmdroid r1382
osmbonuspack r198

Please provide any additional information below.
It's like Issue 14.

I'm getting this error on the log, is possible that it is the trouble?
10-28 23:41:04.261: E/BONUSPACK(5487): OSRMRoadManager::getRoad: request failed.

In the next screenshot you can see the route without the marker nodes.

Original issue reported on code.google.com by ricardoa...@gmail.com on 28 Oct 2013 at 11:46

Attachments:

GoogleCodeExporter commented 9 years ago
This error typically happens if the OSRM service is not reachable (no network 
access, or OSRM service issue). 

After calling road = roadManager.getRoad(), your code must check the road 
status:
if (road.status == STATUS_OK) => fine. 
If not, there is a technical error. You will get a default road (straigth 
line), with no nodes. 

Original comment by mathieu....@gmail.com on 29 Oct 2013 at 6:16

GoogleCodeExporter commented 9 years ago
Checking road.mStatus it returns:

10-29 22:31:53.193: I/System.out(5312): 2

"2" refers to STATUS_DEFAULT right?
Sending the mapview activity.

Original comment by ricardoa...@gmail.com on 29 Oct 2013 at 11:10

Attachments:

GoogleCodeExporter commented 9 years ago
Right. And your code seems OK. 

What is the content of your waypoints list (Terreo.getWaypoints())?

Are you sure your terminal or emulator has network connection? And that your 
application has android.permission.INTERNET?

Original comment by mathieu....@gmail.com on 30 Oct 2013 at 9:14

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Yes, emulator is connected and have permissions.
I'm using a zip with my map tiles, do I really have to connect something?

Sending Terreo.class + AndroidManifest.xml + Log

Original comment by ricardoa...@gmail.com on 30 Oct 2013 at 10:05

Attachments:

GoogleCodeExporter commented 9 years ago
Execute the http request shown in the log.txt in a browser: 
http://router.project-osrm.org/viaroute?&loc=-26.759999999999998,-52.207&loc=-26
.84,-52.207&loc=-26.84,-52.162&loc=-26.924999999999997,-52.162&loc=-27.0,-52.162
&instructions=true&alt=false

And you will see in the OSRM reply: "status_message": "Cannot find route 
between points"
Check carefully your waypoints. 

Original comment by mathieu....@gmail.com on 1 Nov 2013 at 8:17

GoogleCodeExporter commented 9 years ago

Original comment by mathieu....@gmail.com on 26 Nov 2013 at 11:23