You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of now, I've adapted an approach similar to routingpy's when it comes to parsing the response and making the returned coordinates easily accessible. I think that in browsers, memory is more of a concern, so I propose to not parse the response by default and thereby ending up with a lot of duplicate data, but instead providing the parsing as a static method that can be optionally called:
v.directions([[8.512516,47.380742],[8.557835,47.359467],],"auto").then((d)=>{L.GeoJSON(d.toFeatureCollection()).addTo(map)// e.g. if you want to display the results in Leaflet})
We could even attach more attributes to the features than the common ones we're making accessible in routingpy right now (distance and duration), depending on the router's response.
The text was updated successfully, but these errors were encountered:
Hm, how about the other way around? I mean, we could only keep the raw response if specifically requested (and default to false), but keep parsing? But I'm not really familiar how this package does it right now, we can talk about it in the next days.
As of now, I've adapted an approach similar to routingpy's when it comes to parsing the response and making the returned coordinates easily accessible. I think that in browsers, memory is more of a concern, so I propose to not parse the response by default and thereby ending up with a lot of duplicate data, but instead providing the parsing as a static method that can be optionally called:
We could even attach more attributes to the features than the common ones we're making accessible in routingpy right now (distance and duration), depending on the router's response.
The text was updated successfully, but these errors were encountered: