Skip to content
This repository has been archived by the owner on Dec 16, 2020. It is now read-only.

Maximum locations per request in "info" endpoint #42

Open
fbonzon opened this issue Oct 17, 2016 · 0 comments
Open

Maximum locations per request in "info" endpoint #42

fbonzon opened this issue Oct 17, 2016 · 0 comments

Comments

@fbonzon
Copy link

fbonzon commented Oct 17, 2016

It would be nice to know, before sending a routing request to the API, what is the maximum locations per request allowed with our API key. This number varies with GraphHopper account types. E.g. 5 with Free accounts, 30 with Basic accounts, etc.

Currently, there is no way to programmatically know if my routing query with n locations will be allowed, other than issuing it and check if it returns an error or not.

My first use case is the GraphHopper Maps UI. Creating a new intermediate point could be disabled once the maximum allowed count of intermediate points is reached.

E.g. if using a free account (max. 5 locations: start, end and 3 intermediates), and you already defined 3 intermediate points, then the + icon in the left margin to add a new location would be disabled, as well as the "Add intermediate point" item in the context menu.

You should create and return a new key max_locations in the answer to the info endpoint calls.

@fbonzon fbonzon changed the title Maximum locations per request in API "info" endpoint Maximum locations per request in "info" endpoint Oct 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants