I have something like this:

int[] edges = graph.findCloseEdges(lat, lon, 1); // returns only one element
RoutingResultSegment rrs = graph.lookupSegment(edges[0]);
LatLon[] latlons = rrs.getLatLons()

For the red dot in the image (with lat/lon), array latlons contains the blue points. I would instead expect "close edge" to be a segment of the A3/E70 road.

Here is the image (I don't have enough reputation to post images apparently).

What is the third integer argument in findCloseGraph and what does this method return? I need to do simple "snap to road".


Oh, this is a very expert question ;-)

graph.findCloseEdges(lat, lon, x)

finds x close Edges that are not necessarily the closest ones. What you are going to find is clear. Use TouchPoint.create(...) instead.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.