1
votes

The following are the usage limits as specified by Google on their Developer Guide pages:

  • Google Maps JavaScript API v3 => For-profit web sites are permitted to generate up to 25,000 map loads per day
  • Google Geocoding API => subject to a query limit of 2,500 geolocation requests per day
  • Google Maps API for Business => may perform up to 100,000 requests per day

Am trying to evaluate using any one of the above for use with Visualforce on Salesforce.com (SFDC) platform [*]

I understand for a public website the requests are per IP. Now for SFDC, there could be many different Organizations on a particular server (say, NA1). So, two different companies using SFDC and Google Maps API could have an URL at https://na1.salesforce.com/something_here and their requests should be counted separately.

Will it be so? What will happen in case of each API?

[*]SFDC is a SaaS cloud for the purpose of our discussion. All users login through the same page but they could be logged into different "orgs"/"organizations" but their URLs might look similar

2

2 Answers

1
votes

This question on SO addresses the geocoding API specifically being run from a visualforce page directly, Salesforce: Google maps query status 620 G_GEO_TOO_MANY_QUERIES and it does seem to mean that without a key the limits are shared. I would suspect that unless you plan on giving the app away that you are working on, you will pretty much be forced to pick up an upgraded API key. One thing you may want to look at to work around this is hosting the maps portion in another location, and iframing it into Salesforce.

1
votes

It's important to differentiate between the server-side and client-side limits here. The server-side geocoding api would have have the 2500 limit enforced across the shared Salesforce instance based on how many machines the requests come from (I assume NA1 isn't 1 huge server). Multiple organization using the free geocoding API would all share the same server-side geocoding limit. I've actually run into the same limits using Google's own App Engine platform, where a bunch of applications share the same outbound IP address.

For any sort of guaranteed performance you'll need to send the queries from your own server or go the Maps for Business route which lets you authenticate your queries to get those higher limits.

Client-side geocoding via the JavaScript API doesn't have these server-limits, so if users do any sort of action to trigger a geocode or two using the JS API is the best route.

You can already create your own "bucket" to track your 25K map loads per day by signing up for an API Key.