Wed, 10/07/2015 - 06:05
#1
Exceeded maximum gross distance for locations
Hello,
I use your API with http://open.mapquestapi.com/directions/v2/routematrix?key=key and a XML-Post for a request to find the times and distances between a set of points.
Now I receive the error "Exceeded maximum gross distance for locations (Max=12000.0, Actual=12738.874 miles)". But my request is not a request for a route. Why do you sum up all the single distances?
Best regards
But I have no route with a distance of 12.000 miles. I have many single point-to-point requests (oneToMany) in one XML-file and none of these requests have a distance > 400 miles. Should I send 40 single requests instead of one?
In your documentation of the route matrix option you can read only a restriction of "A One to Many route matrix call can handle up to 100 locations.".
Best regards
Okay, thank you.
I'm having a similar problem, my question is how am I supposed to predict that the distances are going to be over the given limit when I'm using the request to find the distances in the first place?
Hi MapQuest team!
Now trying your great solution to find number of moving objects in the certain area within a certain radius (e.g. players in 300-500 miles to location) and everything is excellent except one minor detail: when using Radius Search with dynamic number of points (we can't predict how many users will appear in the certain location radius) it sometimes goes over the limit of 12000 miles gross and request returns nothing but a limit hit error.
If you could advise a workaround on that to it would be awesome.
We tried to split request by 5-10 users in each, but it happens to be quite slow when we need to calculate 100-200 users :( So, maybe there's any other option?
Thank you so much!
Best regards,
Denys.
MQBrianCoakley thank you for a quick reply!
It looks like authenticated POST to
http://www.mapquestapi.com/search/v2/search
with the following data
array(3) {
["shapePoints"]=>
array(2) {
[0]=>
string(10) "xx.xxx"
[1]=>
string(11) "xx.xxx"
}
["options"]=>
array(2) {
["units"]=>
string(2) "dm"
["radius"]=>
int(500)
}
["remoteDataList"]=>
array(78) {
[0]=>
array(3) {
["key"]=>
string(1) "0"
["name"]=>
string(4) "1111"
["shapePoints"]=>
array(2) {
[0]=>
string(10) "xx.xxx"
[1]=>
string(11) "xx.xxx"
}
}
[1]=>
array(3) {
["key"]=>
string(1) "1"
["name"]=>
string(4) "3799"
["shapePoints"]=>
array(2) {
[0]=>
string(10) "xx.xxx"
[1]=>
string(11) "xx.xxx"
}
}
************************************More alike data goes here*********************************************
[76]=>
array(3) {
["key"]=>
string(2) "76"
["name"]=>
string(4) "3069"
["shapePoints"]=>
array(2) {
[0]=>
string(13) "xx.xxx"
[1]=>
string(14) "xx.xxx"
}
}
[77]=>
array(3) {
["key"]=>
string(2) "77"
["name"]=>
string(4) "3242"
["shapePoints"]=>
array(2) {
[0]=>
string(10) "xx.xxx"
[1]=>
string(11) "xx.xxx"
}
}
}
}
At some point, the difference between drive distance and straight line distance becomes less significant. You may be able to do a normal radius search and then a second with units=dm with the closest search results. If there is a large number of provided points, a limit can be set to the points per request. If 95% of the failing requests have 50 points, then anything over 50 can be broken into smaller sets.
There is no workaround to bypass the limits.
Hi MQBrianCoakley!
Thanks for the rapid response!
Could you please advise, maybe there's a way to get points up to the limit calculated without failing the whole request but failing only the onces that exceed the limit? E.g. we send 70 points, first 50 are under the limit, but starting from the 51-st one, limit exceeds. Is there any way to get firts 50 calculated and error starting from the 51-st? or at least to get an error starting from which point limit exceeds?
Thank you so much!
Best regards,
Denys
Also,
Could you please advise if there's any way to increase limit of 500 miles for the radius search?
Thank you so much!
Regards,
Denys
Hi MQBrianCoakley,
Sad to hear that :( You definitely should consider to increase limits for your advanced plans :)
Thank you so much!
Best regards,
Denys
Roger. Thank you so much for the clarification!
Roger. Thank you so much for the clarification!