This appendix provides a detailed explanation of all the methods, classes, constants, and objects available through the Google Maps API as of version 2.66. For the most up-to-date list, visit

Note The class, method, and function arguments listed within square brackets are optional.

class GMap2

GMap2 (aka GMap) is the central class in the API. If you've loaded the API using the v=2 flag, you may also use GMap to refer to the GMap2 class; however, GMap is provided only for better backward compatibility, and Google recommends that you modify your code to call GMap2 to conform with the most current API.

GMap2 Constructor

Constructor Description
GMap2(containerDomElement, ...

Get Beginning Google Maps Applications with Rails and Ajax: From Novice to Professional now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.