better than I thought,

with around 15,000 points in 10 lines the algorithm finds the closest
point to mouse after visiting about 600 points. Seems fast.

On Jun 10, 11:15 pm, epicycler <[email protected]> wrote:
> too impatient .... :-)
>
> wrote it roughly, looks at several lines on same map, seems to work
> smoothly, marker follows route, visits 20% of points.
>
> A bit of testing, bit of tidying up, and I'll post a demo.
>
> On Jun 10, 5:09 pm, epicycler <[email protected]> wrote:
>
>
>
> > I suspect that the available algorithms for finding the closest point
> > on a route to a reference point involves iterating through all points.
> > For long lines that can be time consuming. A binary search approach
> > doesn't work because the lines aren't straight.
>
> > It occured to me that the encoded polyline may be of some use. It is
> > technically possible to start at the widest zoom and find the closest
> > point which would be displayed at that zoom level. Then iteratively
> > work through the segments either side of that point until there are no
> > more levels to look at.
>
> > Before I invest time in writing it (its not that hard!) has anyone
> > tried or contemplated it. My question at this stage is whether it will
> > yield a worthwhile result.- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to