Coder Social home page Coder Social logo

road.mNodes.size() = 0 about osmbonuspack HOT 15 CLOSED

mkergall avatar mkergall commented on August 22, 2024
road.mNodes.size() = 0

from osmbonuspack.

Comments (15)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
See the attached file please!!

Original comment by [email protected] on 26 Nov 2012 at 9:04

  • Added labels: ****
  • Removed labels: ****

from osmbonuspack.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
Nodes are instructions, like "turn left at street xx", "turn right at road 
yy",... 
I've not tried your FROM/TO path, but having no instruction doesn't necessarily 
means there is an error. 
The right way to check errors is looking if Road.mStatus==STATUS_DEFAULT. 

If you really have an error, here is a good way to analyze what happens: look 
at the logcat, you will see the url sent: copy/paste it in a browser, and see 
how the answer look like. 

Original comment by [email protected] on 28 Nov 2012 at 9:45

  • Added labels: ****
  • Removed labels: ****

from osmbonuspack.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
[deleted comment]

from osmbonuspack.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
I attached the code... Becouse the same example was working five days ago. I 
just put some markers un the map... Like tutorial 1. And it was working ok!! I 
tried to change from/to... But the result it's the same... I also copy the path 
from/to of your example in Paris and it doesn't work. So i decide to create an 
issue becouse it's really extrange...
Please if you have a minute, see the code... Thank you very much!!

Original comment by [email protected] on 29 Nov 2012 at 10:44

  • Added labels: ****
  • Removed labels: ****

from osmbonuspack.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
I forgot... If you download your app example "OSMBonusPackDemo_v2.4.1.apk" it 
doesn't work either. The app draw the path but doesn't put the markers... 
Becouse the arrayList mNodes size = 0...

Original comment by [email protected] on 29 Nov 2012 at 10:49

  • Added labels: ****
  • Removed labels: ****

from osmbonuspack.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024

Original comment by [email protected] on 29 Nov 2012 at 11:08

  • Added labels: ****
  • Removed labels: ****

Attachments:

from osmbonuspack.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
Oh my God, OSRM service has changed their input parameters! And their online 
doc has not been updated yet. 
I just fixed that, and published corrected jar and apk (v3.0, embarking some 
other minor improvements). I will commit OSRM source change very soon. 

Original comment by [email protected] on 7 Dec 2012 at 6:11

  • Added labels: ****
  • Removed labels: ****

from osmbonuspack.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
Well... Thank you very much. I really appreciate your quickly response!! And 
congratulations for your work!!

Original comment by [email protected] on 7 Dec 2012 at 7:16

  • Added labels: ****
  • Removed labels: ****

from osmbonuspack.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
source commited now. 
Thanks for noticing the issue!

Original comment by [email protected] on 7 Dec 2012 at 9:27

  • Changed state: Fixed
  • Added labels: ****
  • Removed labels: ****

from osmbonuspack.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
I'm having the same problem. I already have the updated library.

Original comment by [email protected] on 16 Oct 2013 at 2:23

  • Added labels: ****
  • Removed labels: ****

from osmbonuspack.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
Me too... I have the same problem, I'm using the osmbonuspack_v4.4.jar library.
I don't know why road.mNodes.size() = 0 
but I have resolved changing road.mNodes.size() to road.mRouteHigh.size()
more exactly, replacing the original code (in Tutorial_1) with this code

Drawable nodeIcon = getResources().getDrawable(R.drawable.marker_node);
        for (int i=0; i<road.mRouteHigh.size(); i++){
                GeoPoint node = road.mRouteHigh.get(i);
                Marker nodeMarker = new Marker(map);
                nodeMarker.setPosition(node);
                nodeMarker.setIcon(nodeIcon);
                nodeMarker.setTitle("Step "+i);
                map.getOverlays().add(nodeMarker);
        }  

Thank you very much for your work

Original comment by [email protected] on 26 Apr 2014 at 1:06

  • Added labels: ****
  • Removed labels: ****

from osmbonuspack.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
I have found a solution, you must put this code

StrictMode.ThreadPolicy policy = new StrictMode.
ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy); 

at the beginning of your main activity

this method is valid just in debug fase, but after this fase is better change 
it with an AsyncTask

Original comment by [email protected] on 26 Apr 2014 at 5:13

  • Added labels: ****
  • Removed labels: ****

from osmbonuspack.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
The problem was try to connect in HTTPConnection mode inside of GUIThread
for that reason we need to define 

StrictMode.ThreadPolicy policy = new 
StrictMode.ThreadPolicy.Builder().permitAll().build();
        StrictMode.setThreadPolicy(policy); 

alternatively, we can declare an AsynTask to Connect in HTTPConnection mode
because the call 

Road road = roadManager.getRoad(waypoints);

uses HTTPConnection

Original comment by [email protected] on 26 Apr 2014 at 5:22

  • Added labels: ****
  • Removed labels: ****

from osmbonuspack.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
Your analysis and solution are correct. 
You can also refer to the "Important note about network calls" in Tutorial_0. 

Original comment by [email protected] on 26 Apr 2014 at 8:35

  • Added labels: ****
  • Removed labels: ****

from osmbonuspack.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
Thank you for your answer and consideration

Original comment by [email protected] on 27 Apr 2014 at 7:45

  • Added labels: ****
  • Removed labels: ****

from osmbonuspack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.