AI-generated Key Takeaways
-  The Maps service allows scripts to generate static maps, find directions, convert addresses to coordinates, and sample elevations. 
-  The service provides classes for finding directions, geocoding, sampling elevation, and creating static map images. 
-  Enums are available for defining restrictions to avoid in directions, map image formats, marker sizes, travel modes, and map types. 
-  You can create new instances of DirectionFinder, ElevationSampler, Geocoder, and StaticMap using the Maps class methods. 
-  Authentication for a Google Maps APIs Premium Plan account can be set to leverage additional quota allowances. 
This service allows scripts to generate static maps, find directions, convert addresses into geocode coordinates, and sample elevations.
Classes
| Name | Brief description | 
|---|---|
|  Avoid 
 | An enum representing the types of restrictions to avoid when finding directions. | 
|  Color 
 | An enum representing the named colors available to use in map images. | 
|  Direction  | Allows for the retrieval of directions between locations. | 
|  Direction  | A collection of enums used by  Direction . | 
|  Elevation  | Allows for the sampling of elevations at particular locations. | 
|  Format 
 | An enum representing the format of the map image. | 
|  Geocoder 
 | Allows for the conversion between an address and geographical coordinates. | 
|  Maps 
 | Allows for direction finding, geocoding, elevation sampling and the creation of static map images. | 
|  Marker  | An enum representing the size of a marker added to a map. | 
|  Mode 
 | An enum representing the mode of travel to use when finding directions. | 
|  Static  | Allows for the creation and decoration of static map images. | 
|  Static  | A collection of enums used by  Static . | 
|  Type 
 | An enum representing the type of map to render. | 
  Avoid 
 
 
 Properties
| Property | Type | Description | 
|---|---|---|
| TOLLS | Enum | Avoid tolls. | 
| HIGHWAYS | Enum | Avoid highways. | 
  Color 
 
 
 Properties
| Property | Type | Description | 
|---|---|---|
| BLACK | Enum | |
| BROWN | Enum | |
| GREEN | Enum | |
| PURPLE | Enum | |
| YELLOW | Enum | |
| BLUE | Enum | |
| GRAY | Enum | |
| ORANGE | Enum | |
| RED | Enum | |
| WHITE | Enum | 
  Direction  
 
 Methods
| Method | Return type | Brief description | 
|---|---|---|
|  Direction  | Adds a waypoint that the route must pass through, using a point (lat/lng). | |
|  Direction  | Adds a waypoint that the route must pass through, using an address. | |
|  Direction  | Clears the current set of waypoints. | |
| Object | Gets the directions using the origin, destination, and other options that were set. | |
|  Direction  | Sets whether or not alternative routes should be returned, instead of just the highest ranked route (defaults to false). | |
|  Direction  | Sets the desired time of arrival (when applicable). | |
|  Direction  | Sets whether to avoid certain types of restrictions. | |
|  Direction  | Sets the desired time of departure (when applicable). | |
|  Direction  | Sets the ending location for which to calculate directions to, using a point (lat/lng). | |
|  Direction  | Sets the ending location for which to calculate directions to, using an address. | |
|  Direction  | Sets the language to be used for the directions. | |
|  Direction  | Sets the mode of travel (defaults to driving). | |
|  Direction  | Sets whether or not to optimize the provided route by rearranging the waypoints in a more efficient order (defaults to false). | |
|  Direction  | Sets the starting location from which to calculate directions, using a point (lat/lng). | |
|  Direction  | Sets the starting location from which to calculate directions, using an address. | |
|  Direction  | Sets a region to use when interpreting location names. | 
  Direction  
 
  
   Elevation  
 
 Methods
| Method | Return type | Brief description | 
|---|---|---|
| Object | Returns elevation data for a single point (lat/lng). | |
| Object | Returns elevation data for a series of points (lat/lng). | |
| Object | Returns elevation data for the points in an encoded polyline. | |
| Object | Returns elevation data for a number of samples along a line, defined using a series of points. | |
| Object | Returns elevation data for a number of samples along a line, defined using an encoded polyline. | 
  Format 
 
 
 Properties
| Property | Type | Description | 
|---|---|---|
| PNG | Enum | 8-bit PNG format. | 
| PNG8 | Enum | 8-bit PNG format. | 
| PNG32 | Enum | 32-bit PNG format. | 
| GIF | Enum | GIF format. | 
| JPG | Enum | JPEG format. | 
| JPG_BASELINE | Enum | Non-progressive JPEG format. | 
  Geocoder 
 
 
 Methods
| Method | Return type | Brief description | 
|---|---|---|
| Object | Gets the approximate geographic points for a given address. | |
| Object | Gets the approximate addresses for a given geographic point. | |
|  Geocoder 
 | Sets the bounds of an area that should be given extra preference in the results. | |
|  Geocoder 
 | Sets the language to be used in the results. | |
|  Geocoder 
 | Sets a region to use when interpreting location names. | 
  Maps 
 
 
 Properties
| Property | Type | Description | 
|---|---|---|
| Direction  |  Direction  | |
| Static  |  Static  | 
Methods
| Method | Return type | Brief description | 
|---|---|---|
| Number[] | Decodes an encoded polyline string back into an array of points. | |
| String | Encodes an array of points into a string. | |
|  Direction  | Creates a new DirectionFinder object. | |
|  Elevation  | Creates an ElevationSampler object. | |
|  Geocoder 
 | Creates a new Geocoder object. | |
|  Static  | Creates a new StaticMap object. | |
| void | Enables the use of an externally established Google Maps APIs Premium Plan account, to leverage additional quota allowances . | 
  Marker  
 
 Properties
| Property | Type | Description | 
|---|---|---|
| TINY | Enum | Tiny sized markets (smallest available). | 
| MID | Enum | Medium sized markers (largest available). | 
| SMALL | Enum | Small sized markers. | 
  Mode 
 
 
 Properties
| Property | Type | Description | 
|---|---|---|
| DRIVING | Enum | Driving directions via roads. | 
| WALKING | Enum | Walking directions via pedestrian paths and sidewalks (where available). | 
| BICYCLING | Enum | Bicycling directions via bicycle paths and preferred streets (where available). | 
| TRANSIT | Enum | Transit directions via public transit routes (where available). | 
  Static  
 
 Methods
| Method | Return type | Brief description | 
|---|---|---|
|  Static  | Adds a new address to the current path definition. | |
|  Static  | Adds a marker to the map using a point (lat/lng). | |
|  Static  | Adds a marker to the map using an address. | |
|  Static  | Adds a path to the map using an array of points. | |
|  Static  | Adds a path to the map using an encoded polyline. | |
|  Static  | Adds a new point (lat/lng) to the current path definition. | |
|  Static  | Adds a point (lat/lng) location that must be visible in the map. | |
|  Static  | Adds an address location that must be visible in the map. | |
|  Static  | Starts a new path definition. | |
|  Static  | Clears the current set of markers. | |
|  Static  | Clear the current set of paths. | |
|  Static  | Clears the current set of visible locations. | |
|  Static  | Completes a path definition started with beginPath(). | |
|  Blob 
 | Return the data inside this object as a blob converted to the specified content type. | |
|  Blob 
 | Gets the image data as a  Blob 
. | |
| Byte[] | Gets the raw image data as a byte array. | |
| String | Gets the URL of the map image. | |
|  Static  | Sets the center of the map using a point (lat/lng). | |
|  Static  | Sets the center of the map using an address. | |
|  Static  | Sets the custom marker image to use when creating new markers. | |
|  Static  | Sets the format of the map image. | |
|  Static  | Sets the language to be used for text on the map (where available). | |
|  Static  | Sets the type of map to be shown. | |
|  Static  | Sets the marker style to use when creating new markers. | |
|  Static  | Sets whether or not to use specialized tile sets for mobile devices. | |
|  Static  | Sets the path style to use when creating new paths. | |
|  Static  | Sets the width and height of the map image in pixels. | |
|  Static  | Sets the zoom factor, or magnification level, used for the map. | 
  Static  
 
 Properties
| Property | Type | Description | 
|---|---|---|
| Color |  Color 
 | |
| Format |  Format 
 | |
| Marker  |  Marker  | |
| Type |  Type 
 | 
  Type 
 
 
 Properties
| Property | Type | Description | 
|---|---|---|
| ROADMAP | Enum | A standard roadmap, as is normally shown on the Google Maps website. | 
| SATELLITE | Enum | A satellite map. | 
| TERRAIN | Enum | A physical relief map, showing terrain and vegetation. | 
| HYBRID | Enum | A hybrid of the satellite and roadmap maps, showing a transparent layer of major streets and place names on the satellite map. | 

