Server-side waypoint limit for Google Directions API
Asked Answered
L

0

0

I am trying to access the 23 waypoint limit in the Google Directions API.

Based on Google Maps Directions API Standard Usage Limits:

2,500 free directions requests per day, calculated as the sum of client-side and server-side queries.
UP TO 23 WAYPOINTS ALLOWED IN EACH SERVER-SIDE REQUEST, or up to 8 waypoints when using the Directions service in the Google Maps JavaScript API.
50 requests per second, calculated as the sum of client-side and server-side queries.

I currently have a Server API Key setup that I am referencing in my request URI. My Google API account also has Billing Enabled.

When I try to make a request to the Google Directions API in my ASP.NET MVC Controller, I am always hit with a MAX_WAYPOINTS_EXCEEDED response because I have over 8 waypoints in my request. However, I am not using the Google Maps JavaScript API. I am making a server-side request with a billable account.

Is there anything I may need to configure in my API account? Maybe I am not linking the billing account to the server API key?

Below is the request URI. Maybe I am not requesting from the appropriate service?

https://maps.googleapis.com/maps/api/directions/xml?units=imperial&mode=driving&origin={0}&destination={1}&waypoints=optimize:true|{2}&KEY={3}

Liederkranz answered 1/8, 2016 at 15:14 Comment(4)
Before anyone can answer, a full request (without the API key) is needed. Please replace those (0) (1) (2) with actual values sent to the API.Plasmolysis
@Plasmolysis how would that prevent anybody from answering the question? I am obviously sending a proper request if I am getting the response that I am providing too many waypoints.Liederkranz
Are you using Premium Plan?Cornie
@noogui no i am not. however, i resorted to using this .NET wrapper and it worked just fine.. I'll have to dig into the code and see what I am doing wrong in my request.. github.com/maximn/google-mapsLiederkranz

© 2022 - 2024 — McMap. All rights reserved.