Open chrstnbwnkl opened 1 year ago
I propose to not parse the response by default
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.