Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Steps in the cableway #668

Open
thoarca opened this issue Sep 8, 2022 · 5 comments
Open

Steps in the cableway #668

thoarca opened this issue Sep 8, 2022 · 5 comments
Labels

Comments

@thoarca
Copy link

thoarca commented Sep 8, 2022

Hi there,
how can connect two points in cableway, using leafletmap ?

Thanks

@curtisy1
Copy link
Collaborator

curtisy1 commented Sep 8, 2022

I'm guessing you would want a polyline? Or is it that you want to find the route between two stations on a cableway?

@thoarca
Copy link
Author

thoarca commented Sep 8, 2022

Hi,
thanks for the reply.
My goal is to derive a route between two points of a exiaisting cableway. If possibile, this path will be a polyline, right?
thank you

@curtisy1
Copy link
Collaborator

curtisy1 commented Sep 9, 2022

Yes. Suppose you have a set of points, you could simply do the following

const points = [51.65464, 14.5756], [51.5785, 14.87575]; // your coordinates
const line = new L.Polyline(points);
line.addTo(map);

or if you want routing, you could use something like this

L.Routing.control({
    waypoints: [
        L.latLng(57.74, 11.94),
        L.latLng(57.6792, 11.949)
    ],
}).addTo(map);

although I'm not sure, how accurate the result would be since cableways are not usually included in OSRM routes as far as I know

@thoarca
Copy link
Author

thoarca commented Sep 11, 2022 via email

@curtisy1
Copy link
Collaborator

Is it possible that you show me some sample code of what you want to achieve? I'm still not sure whether you really want all the routing overhead when you know your waypoints and could just create a route between them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants