Questions tagged [google-maps-api-3]

Google Maps JavaScript API Version 3 lets you embed the functionality of Google Maps into your own website. Version 3 provides greatly improved support for mobile devices. Ask non-programming and licensing questions in the Maps API Google Group (see full description for a link)

The Google Maps JavaScript API Version 3 is now the official JavaScript API. Version 2 of the API has been officially deprecated as per Google's deprecation policy. Version 3 of the API is designed to be faster and more applicable to mobile devices, as well as traditional desktop browser applications.

For support questions unrelated to programming as defined in the Stack Overflow usage guidelines, there is a Maps API Google Group.

Google has established two licensing models for use of the Google Maps JavaScript API v3:

  1. The Google Maps API Standard Plan requires an API key and is free up to 25K Map Loads per day. If you need more than 25K Map Loads per day you need to enable billing on your project. After exceeding the free usage limits, billing at $0.50 USD / 1000 additional requests, up to 100,000 per 24 hours is enforced. You can find more info about Google Maps API JavaScript quotas in the developer docs. When using the Google Maps API Services in JavaScript (Directions, GeoCoding, etc.) and Places API quota restrictions also apply, please check this document for more info on Services usage limits.
    If you need more than 100,000 daily Map Loads you should switch to the Google Maps API Premium Plan.
    To use the Standard Plan you need to provide public accessibility to your Google Maps API implementation.
    Note: Quota exceptions may apply. Learn more here.

  2. The Google Maps API Premium Plan provides higher quotas, enhanced features, reporting and analytics and added support to organizations that wish to add maps to their fee-based websites, mobile apps, or to their internal websites. To learn more about this option, contact Google Maps API Premium Plan Sales.

Check out the showcase site to see examples of what is possible with the Google Maps APIs.

Customize your own map with the help of Google Maps APIs Styling Wizard!

The Google Maps JavaScript API v3 also provides support for Keyhole Mark-Up Language (KML) and Google also provides information about the v3 API's KML Support.

More detailed information is available at the Google Maps JavaScript API v3 Documentation page and includes:

25067 questions
100
votes
12 answers

Google Maps v3 - limit viewable area and zoom level

is it possible to limit Google map v3 to a certain area? I want to allow displaying only some area (e.g. a country) and disallow the user to slide elsewhere. Also I want to restrict the zoom level - e.g. only between levels 6 and 9. And I want to…
Tomik
  • 23,857
  • 8
  • 121
  • 100
98
votes
4 answers

How to find current zoom level in a Google Map?

How do I find the current zoom level when loading or clicking a Google map?
K6t
  • 1,821
  • 1
  • 13
  • 21
98
votes
7 answers

What is the Proper Way to Destroy a Map Instance?

I recently developed an html5 mobile application. The application was a single page where navigation hash change events replaced the entire DOM. One section of the application was a Google Map using API v3. Before the map div is removed from the…
Chad Killingsworth
  • 14,360
  • 2
  • 34
  • 57
97
votes
7 answers

Google Maps Api v3 - find nearest markers

When i click on map, which will be best way to find nearest marker or markers? is there some functions in api that will help me to do that? it's google map api v3.
user198003
  • 11,029
  • 28
  • 94
  • 152
97
votes
5 answers

Google Maps API Multiple Markers with Infowindows

I am trying to add multiple markers each with its own infowindow that comes up when clicked on. I am having trouble with getting the infowindows coming up, when I try it either shows up only one marker without an infowindow. Thanks, let me know if…
96
votes
10 answers

Google Maps API throws "Uncaught ReferenceError: google is not defined" only when using AJAX

I have a page that uses the Google Maps API to display a map. When I load the page directly, the map appears. However, when I try to load the page using AJAX, I get the error: Uncaught ReferenceError: google is not defined Why is this? This is the…
greener
  • 4,989
  • 13
  • 52
  • 93
95
votes
4 answers

Google Maps API v3: How to remove an Event Listener?

How do I remove the 'bounds_changed' Event listener in Google Maps API v3? google.maps.event.removeListener(_???_);
mp_
  • 5,573
  • 4
  • 20
  • 15
95
votes
5 answers

How do I set default location and Zoom level for google map api v2?

When my map shows, it always start at a fixed location (near Africa). Then, I use the following code to center the map to the location I want. mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(loc.getLatitude(), loc.getLongitude()),…
dong221
  • 3,390
  • 6
  • 29
  • 31
94
votes
4 answers

Google Maps API warning: NoApiKeys

I've been using Google Maps API v3 for some time without an API key, and it worked well. It still works, but I get a warning in the console: Google Maps API warning: NoApiKeys …
Tamás Sallai
  • 3,195
  • 1
  • 14
  • 25
91
votes
9 answers

Google Maps v3: Enforcing min. zoom level when using fitBounds

I'm drawing a series of markers on a map (using v3 of the maps api). In v2, I had the following code: bounds = new GLatLngBounds(); ... loop thru and put markers on map ... bounds.extend(point); ... end looping …
chris
  • 36,094
  • 53
  • 157
  • 237
91
votes
6 answers

Add marker to Google Map on Click

I'm struggling to find a very simple example of how to add a marker(s) to a Google Map when a user left clicks on the map.
Andre R.
  • 2,769
  • 2
  • 17
  • 17
90
votes
12 answers

Have just one InfoWindow open in Google Maps API v3

I need to have only one InfoWindow open on my Google Map. I need to close all other InfoWindows before I open a new one. Can someone show me how to do this?
leo
  • 3,045
  • 5
  • 24
  • 23
89
votes
10 answers

How to offset the center point in Google maps api V3

I have a Google map with a semi transparent panel covering a portion of the area. I would like to adjust the center point of the map to take into account the portion of the map that is partially obscured. See the image below. Ideally, where the…
will
  • 4,557
  • 6
  • 32
  • 33
87
votes
10 answers

Access Google's Traffic Data through a Web Service

Is there a way I can access traffic data that Google provides through a web service? There seems to be a GTrafficOverlay that puts traffic on top of a route on an embedded google map, but no direct web service that I can consume to, say, give the…
Tejaswi Yerukalapudi
  • 8,987
  • 12
  • 60
  • 101
85
votes
4 answers

Google maps API V3 method fitBounds()

I have this code that renders a map. function initialize() { var myOptions = { center: new google.maps.LatLng(45.4555729, 9.169236), zoom: 13, mapTypeId: google.maps.MapTypeId.ROADMAP, panControl: true, mapTypeControl:…
maxdangelo
  • 3,063
  • 5
  • 21
  • 25