How is GMAP API requests accounted for?

Asked

Viewed 50 times

3

In an internal system, there is a simple plot of a route A - B on one of the pages. Recently this page is receiving a larger number of requests and consequently ordering Gmap more times.

I want to implement a way that just requests and renders Gmap after a click.

What I want to know is: The requisitions to API of GMAP are accounted for from the loading of the script

<script type="text/javascript" src="https://www.google.com/jsapi"></script>

Or the method load

google.load(module, version)

'Cause then I’ll know how to change it better to avoid unnecessary requests to API

1 answer

5


Basically you will be charged whenever you carry one map/image on screen and not when only loading the Google Maps script on your website.

You will be charged when:

  • A web page or app displays a map using the Google Maps Javascript API
  • The web page or app displays a Google Street View Image API using Google Maps Javascript API. If a Street View panorama replaces a map in the same div element, the panorama is not charged.
  • An application requests a map image from the Google Static Maps API.
  • An application requests a panoramic image of Google Street View Image API

Source: https://developers.google.com/maps/faq#usage_mapload

Browser other questions tagged

You are not signed in. Login or sign up in order to post.