Google maps javascript DirectionRenderers limit - javascript

I am looking to display many routes on one instance of map, each route with different color. For it I created an array of DirectionsRenderer objects and assigning separate DirectionsRenderer for each route.
The problem is GoogleMap component displays only first 10 DirectionsRenderer, I was not able to find any info on this limitation in google developers website. Is there any way to use more than 10 DirectionsRenderers at same time?
Thanks for help in advance.

Just to add to what #geocodezip said:
"I was not able to find any info on this limitation in google developers website."
Here you go:
Usage limits and
policies
-Up to 8 waypoints per request, plus the origin and destination. // 10 overall
-50 requests per second, calculated as the sum of client-side and server-side queries.
-2,500 free requests per day, calculated as the sum of client-side and server-side queries; enable billing to access higher daily quotas,
billed at $0.50 USD / 1000 additional requests, up to 100,000 requests
daily.

Related

Where can I view the secondary rate limit of GitHub REST api?

I'm trying to create something with GitHub's REST api using Octokit, but I'm having trouble dealing with their secondary rate limit, I wonder where can I view this secondary rate limit, or know exactly how they work? The documentation seems to be very vague about the inner workings of this said secondary rate limit.
The rate limits can be viewed using the endpoint below, but it does not include the secondary rate limit.
await octokit.request('GET /rate_limit', {})
Also the documentation only provides best practices to avoid this secondary rate limit, but even this does not help.
Specifically I'm constantly using their follow a user endpoint every 2 seconds and doing a 5 minute sleep after 24 requests, but at some point I'm still hitting this secondary rate limit.
await octokit.request('PUT /user/following/{username}', {
username: 'USERNAME'
})
At this point, the only solution that I can think of is to slow down even further with the requests, but that is not optimal.
I wonder If GitHub has a way to view this secondary rate limit so I can deal with it programmatically, or on a much clearer way?
You can see secondary rate limits configured on a on-premise GHE (GitHub for Enterprise) instance.
Type limits for:
Total Requests,
CPU Limit, and
CPU Limit for Searching,
or accept the pre-filled default limits.
But even that instance does not have an exposed API to configure those elements: web page interface only.

google places location and radius search for address do not limit results within radius

I'm building an application where i use the google place autocomplete API.
Once user selects a city, I want to limit the addresses results to within that city.
calling the API with this http request:
https://maps.googleapis.com/maps/api/place/autocomplete/json?input=dvor&types=address&location=32.716221,35.127483&rankby=distance&radius=2000&key=MY_KEY(replaced).
i get results far beyond the radius provided, even 10sKM away.
anyway to solve this issue?
Thanks.
Update - found it is working by adding &strictbounds.

increase query limitations at overpass api

I have an application with leaflet and overpass.api. I use this overpass-layer plugin to query to OSM data.
My problem ist, when i query to0 often to overpass.api i get an Too Many request error after 2 queries.
overpass-api status shows me that there is a limitation. There is 1 available slot, and after a query it blocks my IP for a time period (30sec-3min).
Why is my IP banned already after 1 query?
I wanted to make an application to search with OSM tags and receive data from OSM database. My application works , but it is not possible to query often.

Does calling google.maps.LatLng() contribute to any API limits?

I see the limits chart on Google Maps API and it says a limit of 25,000 map loads per day.
https://developers.google.com/maps/documentation/javascript/usage#premium-usage-limits
But what about calling google.maps.LatLng()?
https://developers.google.com/maps/documentation/javascript/reference#LatLng
I assume its just a function so there is no limit, but I want to make sure before I put my code into production.
Thanks to #user2263572 for his comment. For anyone wondering how to see requests going out, go to:
Right-click > Inspect Element > Network
And from here you can observe the network traffic!

Any way to improve accuracy of getCurrentPosition() coordinates other than enableHighAccuracy?

My intention is to utilize the coordinates that are returned by geolocation in order to generate directions to a given destination, without the visitor having to manually input their address. However, since these coordinates seem to vary from browser to browser, whereby some sets are accurate and other sets are not accurate at all, I am beginning to think this will be impossible.
The code below apparently has very little impact on the accuracy of the returned values.
var options = {
enableHighAccuracy: true,
timeout: Infinity,
maximumAge: 0
};
Is there another way to improve the accuracy of the coordinates, so that the coordinates actually become usable?
Based on the Official Google Documentation, the Google Maps Geolocation API returns a location and accuracy radius based on information about cell towers and WiFi nodes that the mobile client can detect. The protocol used to send this data to the server and to return a response to the client.
In Geolocation request, you must specify a key in your request. The request body must be formatted as JSON.
You may include 'radioType' in the API call. The mobile radio type supports 'lte, gsm, cdma, and wcdma'. While this field is optional, it should be included if a value is available, for more accurate results.
For more details regarding Maps Geocoding API, please follow this link: https://developers.google.com/maps/documentation/geocoding/intro

Categories

Resources