Map route problems

Source: Internet
Author: User
I want to provide a map route question function to know the starting and ending points of a route. so, how do I know the starting point and ending point of a location? ------ Solution -------------------- start point (x0, y0) and end point (x1, y1), then the slope is & nbsp; k & nbsp; (y1-y0) (x1-x0) if point (x, y) is on this line, there is a (y-y0) (x-x0) & nbs map route problem
I want to make a function to know the starting and ending points of a route. so, how can I know the starting point and ending point of a route?
------ Solution --------------------
Start point (x0, y0) and end point (x1, y1), then the slope is k = (y1-y0)/(x1-x0)
If point (x, y) is on this line, there is (y-y0)/(x-x0) = k

The map route consists of multiple broken lines. you can apply the discriminant algorithm one by one and relax the error accordingly.
Because in actual road construction, if the line is near A, it may bypass A, or it may build A branch line between the line and.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.