alaurenz / metrobike

0 stars 1 forks source link

Add constant DirectionsRequest.DONT_CARE as the default for options like maxNumBusTransfers #137

Closed dutchscout closed 11 years ago

dutchscout commented 11 years ago

Make the DONT_CARE value negative and make it pass validation.

CoolCapri commented 11 years ago

So how should I use this? I think, for anything textbox the user left blank, I simply set the corresponding attribute to DONT_CARE in DirectionsRequest? Or do I simply NOT set that attribute?

dutchscout commented 11 years ago

When I get this done, DONT_CARE should be the default, so you won't have to set it, but setting it shouldn't break anything.

On May 24, 2013, at 10:16, Shuo Wang notifications@github.com wrote:

So how should I use this? I think, for anything textbox the user left blank, I simply set the corresponding attribute to DONT_CARE in DirectionsRequest? Or do I simply NOT set that attribute?

— Reply to this email directly or view it on GitHubhttps://github.com/alaurenz/metrobike/issues/137#issuecomment-18418056 .

dutchscout commented 11 years ago

(This change is pending commit until a build error is fixed)

This constant has been added as the default for arrival time, departure time, min/max bicycling distance, and min/max transit transfers. @alaurenz Please note that 0 is no longer the default for these values. If your algorithms check for 0 to see if an option is unspecified, please now check for the value DirectionsRequest.RequestParameters.DONT_CARE. I've updated the SimpleAlgorithm to do this, in the addTransitResults method.

dutchscout commented 11 years ago

This has been added and is hopefully complete. Please create a new issue if something related to this breaks.