// To report an issue with these types, please open a support ticket at: // https://issuetracker.google.com/savedsearches/558438 // Google Maps JS API Version: 3.58 // tslint:disable:enforce-name-casing // tslint:disable:no-any // tslint:disable:interface-over-type-literal // tslint:disable:array-type // tslint:disable:no-empty-interface // tslint:disable:no-unnecessary-class // tslint:disable:strict-export-declare-modifiers // Generated by an automated process. DO NOT EDIT! declare namespace google.maps { /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * A relational description of a location. Includes a ranked set of nearby * landmarks and the areas containing the target location. */ export interface AddressDescriptor { /** * A ranked list of containing or adjacent areas. The most useful * (recognizable and precise) areas are ranked first. */ areas: google.maps.Area[]; /** * A ranked list of nearby landmarks. The most useful (recognizable and * nearby) landmarks are ranked first. */ landmarks: google.maps.Landmark[]; } /** * Animations that can be played on a marker. Use the {@link * google.maps.Marker.setAnimation} method on Marker or the {@link * google.maps.MarkerOptions.animation} option to play an animation. * * Access by calling `const {Animation} = await * google.maps.importLibrary("marker")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum Animation { /** * Marker bounces until animation is stopped by calling {@link * google.maps.Marker.setAnimation} with null. */ BOUNCE = 0.0, /** * Marker drops from the top of the map to its final location. Animation * will cease once the marker comes to rest and {@link * google.maps.Marker.getAnimation} will return null. This type * of animation is usually specified during creation of the marker. */ DROP = 1.0, } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * A place that is a small region, such as a neighborhood, sublocality, or * large complex that contains the target location. */ export interface Area { /** * Defines the spatial relationship between the target location and the * area. */ containment: google.maps.Containment; /** * The name for the area. */ display_name: string; /** * The language of the name for the area. */ display_name_language_code: string; /** * The Place ID of the underlying area. Can be used to resolve more * information about the area through Place Details or Place ID Lookup. */ place_id: string; } /** * A layer showing bike lanes and paths. * * Access by calling `const {BicyclingLayer} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class BicyclingLayer extends google.maps.MVCObject { /** * Returns the map on which this layer is displayed. */ getMap(): google.maps.Map | null; /** * Renders the layer on the specified map. If map is set to * null, the layer will be removed. */ setMap(map: google.maps.Map | null): void; } /** * The display options for the Camera control. */ export interface CameraControlOptions { /** * Position id. Used to specify the position of the control on the map. * @defaultValue {@link google.maps.ControlPosition.INLINE_START_BLOCK_END} */ position?: google.maps.ControlPosition | null; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * Used for setting the map's camera options. */ export interface CameraOptions { center?: google.maps.LatLngLiteral | google.maps.LatLng; heading?: number; tilt?: number; zoom?: number; } /** * Used for retrieving camera parameters, such as that of the GL camera used * for the {@link google.maps.WebGLOverlayView}. */ export interface CameraParams extends google.maps.CameraOptions { center: google.maps.LatLng; heading: number; tilt: number; zoom: number; } /** * A circle on the Earth's surface; also known as a "spherical * cap". * * Access by calling `const {Circle} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class Circle extends google.maps.MVCObject { /** * A circle on the Earth's surface; also known as a "spherical * cap". * * Access by calling `const {Circle} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor( circleOrCircleOptions?: | google.maps.Circle | null | google.maps.CircleLiteral | google.maps.CircleOptions, ); /** * Gets the LatLngBounds of this Circle. */ getBounds(): google.maps.LatLngBounds | null; /** * Returns the center of this circle. */ getCenter(): google.maps.LatLng | null; /** * Returns whether this circle can be dragged by the user. */ getDraggable(): boolean; /** * Returns whether this circle can be edited by the user. */ getEditable(): boolean; /** * Returns the map on which this circle is displayed. */ getMap(): google.maps.Map | null; /** * Returns the radius of this circle (in meters). */ getRadius(): number; /** * Returns whether this circle is visible on the map. */ getVisible(): boolean; /** * Sets the center of this circle. */ setCenter( center: google.maps.LatLng | null | google.maps.LatLngLiteral, ): void; /** * If set to true, the user can drag this circle over the map. */ setDraggable(draggable: boolean): void; /** * If set to true, the user can edit this circle by dragging * the control points shown at the center and around the circumference of * the circle. */ setEditable(editable: boolean): void; /** * Renders the circle on the specified map. If map is set to * null, the circle will be removed. */ setMap(map: google.maps.Map | null): void; setOptions(options: google.maps.CircleOptions | null): void; /** * Sets the radius of this circle (in meters). */ setRadius(radius: number): void; /** * Hides this circle if set to false. */ setVisible(visible: boolean): void; } /** * Object literal which represents a circle. */ export interface CircleLiteral extends google.maps.CircleOptions { /** * The center of the Circle. */ center: google.maps.LatLng | google.maps.LatLngLiteral; /** * The radius in meters on the Earth's surface. */ radius: number; } /** * CircleOptions object used to define the properties that can be set on a * Circle. */ export interface CircleOptions { /** * The center of the Circle. */ center?: google.maps.LatLng | google.maps.LatLngLiteral | null; /** * Indicates whether this Circle handles mouse events. * @defaultValue true */ clickable?: boolean | null; /** * If set to true, the user can drag this circle over the map. * @defaultValue false */ draggable?: boolean | null; /** * If set to true, the user can edit this circle by dragging * the control points shown at the center and around the circumference of * the circle. * @defaultValue false */ editable?: boolean | null; /** * The fill color. All CSS3 colors are supported except for extended named * colors. */ fillColor?: string | null; /** * The fill opacity between 0.0 and 1.0. */ fillOpacity?: number | null; /** * Map on which to display the Circle. */ map?: google.maps.Map | null; /** * The radius in meters on the Earth's surface. */ radius?: number | null; /** * The stroke color. All CSS3 colors are supported except for extended named * colors. */ strokeColor?: string | null; /** * The stroke opacity between 0.0 and 1.0. */ strokeOpacity?: number | null; /** * The stroke position. * @defaultValue {@link google.maps.StrokePosition.CENTER} */ strokePosition?: google.maps.StrokePosition | null; /** * The stroke width in pixels. */ strokeWeight?: number | null; /** * Whether this circle is visible on the map. * @defaultValue true */ visible?: boolean | null; /** * The zIndex compared to other polys. */ zIndex?: number | null; } /** * Access by calling `const {CollisionBehavior} = await * google.maps.importLibrary("marker")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum CollisionBehavior { /** * Display the marker only if it does not overlap with other markers. If two * markers of this type would overlap, the one with the higher zIndex is * shown. If they have the same zIndex, the one with the lower vertical * screen position is shown. */ OPTIONAL_AND_HIDES_LOWER_PRIORITY = 'OPTIONAL_AND_HIDES_LOWER_PRIORITY', /** * Always display the marker regardless of collision. This is the default * behavior. */ REQUIRED = 'REQUIRED', /** * Always display the marker regardless of collision, and hide any * OPTIONAL_AND_HIDES_LOWER_PRIORITY markers or labels that would overlap * with the marker. */ REQUIRED_AND_HIDES_OPTIONAL = 'REQUIRED_AND_HIDES_OPTIONAL', } /** * Identifiers for map color schemes. Specify these by value, or by using the * constant's name. For example, 'FOLLOW_SYSTEM' or * google.maps.ColorScheme.FOLLOW_SYSTEM. * * Access by calling `const {ColorScheme} = await * google.maps.importLibrary("core")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum ColorScheme { /** * The dark color scheme for a map. */ DARK = 'DARK', /** * The color scheme is selected based on system preferences. */ FOLLOW_SYSTEM = 'FOLLOW_SYSTEM', /** * The light color scheme for a map. Default value for legacy Maps JS. */ LIGHT = 'LIGHT', } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * An enum representing the spatial relationship between the area and the * target location. * * Access by calling `const {Containment} = await * google.maps.importLibrary("geocoding")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum Containment { /** * The target location is outside the area region, but close by. */ NEAR = 'NEAR', /** * The target location is within the area region, close to the edge. */ OUTSKIRTS = 'OUTSKIRTS', /** * The target location is within the area region, close to the center. */ WITHIN = 'WITHIN', } /** * Identifiers used to specify the placement of controls on the map. Controls * are positioned relative to other controls in the same layout position. * Controls that are added first are positioned closer to the edge of the map. * Usage of "logical values" (see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical_properties_and_values) * is recommended in order to be able to automatically support both * left-to-right (LTR) and right-to-left (RTL) layout contexts.
*
Logical values in LTR:
+----------------+
   * 
| BSIS BSIC BSIE | *
| ISBS      IEBS | *
|                | *
| ISBC      IEBC | *
|                | *
| ISBE      IEBE | *
| BEIS BEIC BEIE |
+----------------+

* Logical values in RTL:
+----------------+
   * 
| BSIE BSIC BSIS | *
| IEBS      ISBS | *
|                | *
| IEBC      ISBC | *
|                | *
| IEBE      ISBE | *
| BEIE BEIC BEIS |
+----------------+

* Legacy values:
+----------------+
   * 
| TL    TC    TR | *
| LT          RT * | *
|                | *
| LC          RC * | *
|                | *
| LB          RB * |
| BL    BC    BR | *
+----------------+

Elements in the top or bottom row flow * towards the middle of the row. Elements in the left or right column flow * towards the middle of the column. * * Access by calling `const {ControlPosition} = await * google.maps.importLibrary("core")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum ControlPosition { /** * Equivalent to BOTTOM_CENTER in both LTR and RTL. */ BLOCK_END_INLINE_CENTER = 0.0, /** * Equivalent to BOTTOM_RIGHT in LTR, or BOTTOM_LEFT in RTL. */ BLOCK_END_INLINE_END = 1.0, /** * Equivalent to BOTTOM_LEFT in LTR, or BOTTOM_RIGHT in RTL. */ BLOCK_END_INLINE_START = 2.0, /** * Equivalent to TOP_CENTER in both LTR and RTL. */ BLOCK_START_INLINE_CENTER = 3.0, /** * Equivalent to TOP_RIGHT in LTR, or TOP_LEFT in RTL. */ BLOCK_START_INLINE_END = 4.0, /** * Equivalent to TOP_LEFT in LTR, or TOP_RIGHT in RTL. */ BLOCK_START_INLINE_START = 5.0, /** * Elements are positioned in the center of the bottom row. Consider using * BLOCK_END_INLINE_CENTER instead. */ BOTTOM_CENTER = 6.0, /** * Elements are positioned in the bottom left and flow towards the middle. * Elements are positioned to the right of the Google logo. Consider using * BLOCK_END_INLINE_START instead. */ BOTTOM_LEFT = 7.0, /** * Elements are positioned in the bottom right and flow towards the middle. * Elements are positioned to the left of the copyrights. Consider using * BLOCK_END_INLINE_END instead. */ BOTTOM_RIGHT = 8.0, /** * Equivalent to RIGHT_CENTER in LTR, or LEFT_CENTER in RTL. */ INLINE_END_BLOCK_CENTER = 9.0, /** * Equivalent to RIGHT_BOTTOM in LTR, or LEFT_BOTTOM in RTL. */ INLINE_END_BLOCK_END = 10.0, /** * Equivalent to RIGHT_TOP in LTR, or LEFT_TOP in RTL. */ INLINE_END_BLOCK_START = 11.0, /** * Equivalent to LEFT_CENTER in LTR, or RIGHT_CENTER in RTL. */ INLINE_START_BLOCK_CENTER = 12.0, /** * Equivalent to LEFT_BOTTOM in LTR, or RIGHT_BOTTOM in RTL. */ INLINE_START_BLOCK_END = 13.0, /** * Equivalent to LEFT_TOP in LTR, or RIGHT_TOP in RTL. */ INLINE_START_BLOCK_START = 14.0, /** * Elements are positioned on the left, above bottom-left elements, and flow * upwards. Consider using INLINE_START_BLOCK_END instead. */ LEFT_BOTTOM = 15.0, /** * Elements are positioned in the center of the left side. Consider using * INLINE_START_BLOCK_CENTER instead. */ LEFT_CENTER = 16.0, /** * Elements are positioned on the left, below top-left elements, and flow * downwards. Consider using INLINE_START_BLOCK_START instead. */ LEFT_TOP = 17.0, /** * Elements are positioned on the right, above bottom-right elements, and * flow upwards. Consider using INLINE_END_BLOCK_END instead. */ RIGHT_BOTTOM = 18.0, /** * Elements are positioned in the center of the right side. Consider using * INLINE_END_BLOCK_CENTER instead. */ RIGHT_CENTER = 19.0, /** * Elements are positioned on the right, below top-right elements, and flow * downwards. Consider using INLINE_END_BLOCK_START instead. */ RIGHT_TOP = 20.0, /** * Elements are positioned in the center of the top row. Consider using * BLOCK_START_INLINE_CENTER instead. */ TOP_CENTER = 21.0, /** * Elements are positioned in the top left and flow towards the middle. * Consider using BLOCK_START_INLINE_START instead. */ TOP_LEFT = 22.0, /** * Elements are positioned in the top right and flow towards the middle. * Consider using BLOCK_START_INLINE_END instead. */ TOP_RIGHT = 23.0, } /** * This interface provides convenience methods for generating matrices to use * for rendering WebGL scenes on top of the Google base map.

Note: A * reference to this object should not be held outside of the scope of * the encapsulating {@link google.maps.WebGLOverlayView.onDraw} call. */ export interface CoordinateTransformer { /** * @param latLngAltitude Latitude, longitude, and altitude. * @param rotations An array that contains an Euler rotation angle in * degrees, in the XYZ convention. * @param scale Array that contains an XYZ scalar array to apply to the * cardinal axis. */ fromLatLngAltitude( latLngAltitude: | google.maps.LatLngAltitude | google.maps.LatLngAltitudeLiteral, rotations?: Float32Array, scale?: Float32Array, ): Float64Array; getCameraParams(): google.maps.CameraParams; } export interface CoreLibrary { ColorScheme: typeof google.maps.ColorScheme; ControlPosition: typeof google.maps.ControlPosition; event: typeof google.maps.event; LatLng: typeof google.maps.LatLng; LatLngAltitude: typeof google.maps.LatLngAltitude; LatLngBounds: typeof google.maps.LatLngBounds; MapsNetworkError: typeof google.maps.MapsNetworkError; MapsNetworkErrorEndpoint: typeof google.maps.MapsNetworkErrorEndpoint; MapsRequestError: typeof google.maps.MapsRequestError; MapsServerError: typeof google.maps.MapsServerError; MVCArray: typeof google.maps.MVCArray; MVCObject: typeof google.maps.MVCObject; Point: typeof google.maps.Point; Settings: typeof google.maps.Settings; Size: typeof google.maps.Size; SymbolPath: typeof google.maps.SymbolPath; UnitSystem: typeof google.maps.UnitSystem; } /** * A layer for displaying geospatial data. Points, line-strings and polygons * can be displayed.

Every Map has a Data object * by default, so most of the time there is no need to construct one. For * example:

 var myMap = new google.maps.Map(...);
* myMap.data.addGeoJson(...);
myMap.data.setStyle(...);
The * Data object is a collection of Features. * * Access by calling `const {Data} = await google.maps.importLibrary("maps")`. * See https://developers.google.com/maps/documentation/javascript/libraries. */ export class Data extends google.maps.MVCObject { /** * A layer for displaying geospatial data. Points, line-strings and polygons * can be displayed.

Every Map has a Data * object by default, so most of the time there is no need to construct one. * For example:

 var myMap = new google.maps.Map(...);
* myMap.data.addGeoJson(...);
myMap.data.setStyle(...);
The * Data object is a collection of Features. * * Access by calling `const {Data} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(options?: google.maps.Data.DataOptions | null); /** * Adds a feature to the collection, and returns the added feature.

If * the feature has an ID, it will replace any existing feature in the * collection with the same ID. If no feature is given, a new feature will * be created with null geometry and no properties. If * FeatureOptions are given, a new feature will be created with * the specified properties.

Note that the IDs 1234 and * '1234' are equivalent. Adding a feature with ID * 1234 will replace a feature with ID '1234', and * vice versa. */ add( feature?: | google.maps.Data.Feature | null | google.maps.Data.FeatureOptions, ): google.maps.Data.Feature; /** * Adds GeoJSON features to the collection. Give this method a parsed JSON. * The imported features are returned. Throws an exception if the GeoJSON * could not be imported. */ addGeoJson( geoJson: object, options?: google.maps.Data.GeoJsonOptions | null, ): google.maps.Data.Feature[]; /** * Checks whether the given feature is in the collection. */ contains(feature: google.maps.Data.Feature): boolean; /** * Repeatedly invokes the given function, passing a feature in the * collection to the function on each invocation. The order of iteration * through the features is undefined. */ forEach(callback: (a: google.maps.Data.Feature) => void): void; /** * Returns the position of the drawing controls on the map. */ getControlPosition(): google.maps.ControlPosition; /** * Returns which drawing modes are available for the user to select, in the * order they are displayed. This does not include the null * drawing mode, which is added by default. Possible drawing modes are * "Point", "LineString" or * "Polygon". */ getControls(): string[] | null; /** * Returns the current drawing mode of the given Data layer. A drawing mode * of null means that the user can interact with the map as * normal, and clicks do not draw anything. Possible drawing modes are * null, "Point", "LineString" or * "Polygon". */ getDrawingMode(): string | null; /** * Returns the feature with the given ID, if it exists in the collection. * Otherwise returns undefined.

Note that the IDs * 1234 and '1234' are equivalent. Either can be * used to look up the same feature. */ getFeatureById(id: number | string): google.maps.Data.Feature | undefined; /** * Returns the map on which the features are displayed. */ getMap(): google.maps.Map | null; /** * Gets the style for all features in the collection. */ getStyle(): | google.maps.Data.StylingFunction | google.maps.Data.StyleOptions | null; /** * Loads GeoJSON from a URL, and adds the features to the collection.

* NOTE: The GeoJSON is fetched using XHR, and may not work cross-domain. If * you have issues, we recommend you fetch the GeoJSON using your choice of * AJAX library, and then call addGeoJson(). */ loadGeoJson( url: string, options?: google.maps.Data.GeoJsonOptions | null, callback?: (a: google.maps.Data.Feature[]) => void, ): void; /** * Changes the style of a feature. These changes are applied on top of the * style specified by setStyle(). Style properties set to * null revert to the value specified via * setStyle(). */ overrideStyle( feature: google.maps.Data.Feature, style: google.maps.Data.StyleOptions, ): void; /** * Removes a feature from the collection. */ remove(feature: google.maps.Data.Feature): void; /** * Removes the effect of previous overrideStyle() calls. The * style of the given feature reverts to the style specified by * setStyle().

If no feature is given, all features have * their style reverted.

*/ revertStyle(feature?: google.maps.Data.Feature | null): void; /** * Sets the position of the drawing controls on the map. */ setControlPosition(controlPosition: google.maps.ControlPosition): void; /** * Sets which drawing modes are available for the user to select, in the * order they are displayed. This should not include the null * drawing mode, which is added by default. If null, drawing * controls are disabled and not displayed. Possible drawing modes are * "Point", "LineString" or * "Polygon". */ setControls(controls: string[] | null): void; /** * Sets the current drawing mode of the given Data layer. A drawing mode of * null means that the user can interact with the map as * normal, and clicks do not draw anything. Possible drawing modes are * null, "Point", "LineString" or * "Polygon". */ setDrawingMode(drawingMode: string | null): void; /** * Renders the features on the specified map. If map is set to * null, the features will be removed from the map. */ setMap(map: google.maps.Map | null): void; /** * Sets the style for all features in the collection. Styles specified on a * per-feature basis via overrideStyle() continue to apply. *

Pass either an object with the desired style options, or a function * that computes the style for each feature. The function will be called * every time a feature's properties are updated. */ setStyle( style: | google.maps.Data.StylingFunction | google.maps.Data.StyleOptions | null, ): void; /** * Exports the features in the collection to a GeoJSON object. */ toGeoJson(callback: (a: object) => void): void; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * An interface representing a feature from a Dataset. The * featureType of a DatasetFeature will always be * FeatureType.DATASET. */ export interface DatasetFeature extends google.maps.Feature { /** * Key-value mapping of the feature's attributes. */ datasetAttributes: {[key: string]: string}; /** * Dataset id of the dataset that this feature belongs to. */ datasetId: string; } /** * A single geocoded waypoint. */ export interface DirectionsGeocodedWaypoint { /** * Whether the geocoder did not return an exact match for the original * waypoint, though it was able to match part of the requested address. */ partial_match?: boolean; /** * The place ID associated with the waypoint. Place IDs uniquely identify a * place in the Google Places database and on Google Maps. Learn more about * Place * IDs in the Places API developer guide. */ place_id?: string; /** * An array of strings denoting the type of the returned geocoded element. * For a list of possible strings, refer to the * Address Component Types section of the Developer's Guide. */ types?: string[]; } /** * A single leg consisting of a set of steps in a DirectionsResult. Some fields in the * leg may not be returned for all requests. Note that though this result is * "JSON-like," it is not strictly JSON, as it directly and * indirectly includes LatLng objects. */ export interface DirectionsLeg { /** * An estimated arrival time for this leg. Only applicable for TRANSIT * requests. */ arrival_time?: google.maps.Time; /** * An estimated departure time for this leg. Only applicable for TRANSIT * requests. */ departure_time?: google.maps.Time; /** * The total distance covered by this leg. This property may be undefined as * the distance may be unknown. */ distance?: google.maps.Distance; /** * The total duration of this leg. This property may be * undefined as the duration may be unknown. */ duration?: google.maps.Duration; /** * The total duration of this leg, taking into account the traffic * conditions indicated by the trafficModel property. This * property may be undefined as the duration may be unknown. */ duration_in_traffic?: google.maps.Duration; /** * The address of the destination of this leg. This content is meant to be * read as-is. Do not programmatically parse the formatted address. */ end_address: string; /** * The DirectionsService calculates directions between * locations by using the nearest transportation option (usually a road) at * the start and end locations. end_location indicates the * actual geocoded destination, which may be different than the * end_location of the last step if, for example, the road is * not near the destination of this leg. */ end_location: google.maps.LatLng; /** * The address of the origin of this leg. This content is meant to be read * as-is. Do not programmatically parse the formatted address. */ start_address: string; /** * The DirectionsService calculates directions between * locations by using the nearest transportation option (usually a road) at * the start and end locations. start_location indicates the * actual geocoded origin, which may be different than the * start_location of the first step if, for example, the road * is not near the origin of this leg. */ start_location: google.maps.LatLng; /** * An array of DirectionsSteps, each of which contains * information about the individual steps in this leg. */ steps: google.maps.DirectionsStep[]; /** * Information about traffic speed along the leg. * @deprecated This array will always be empty. */ traffic_speed_entry: any[]; /** * An array of non-stopover waypoints along this leg, which were specified * in the original request.

Deprecated in alternative * routes. Version 3.27 will be the last version of the API that * adds extra via_waypoints in alternative routes.

When * using the Directions Service to implement draggable directions, it is * recommended to disable dragging of alternative routes. Only the main * route should be draggable. Users can drag the main route until it matches * an alternative route. */ via_waypoints: google.maps.LatLng[]; } /** * An object containing a points property to describe the * polyline of a {@link google.maps.DirectionsStep}. */ export interface DirectionsPolyline { /** * An encoded * polyline. */ points: string; } /** * Renders directions obtained from the DirectionsService. * * Access by calling `const {DirectionsRenderer} = await * google.maps.importLibrary("routes")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class DirectionsRenderer extends google.maps.MVCObject { /** * Renders directions obtained from the DirectionsService. * * Access by calling `const {DirectionsRenderer} = await * google.maps.importLibrary("routes")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(opts?: google.maps.DirectionsRendererOptions | null); /** * Returns the renderer's current set of directions. */ getDirections(): google.maps.DirectionsResult | null; /** * Returns the map on which the DirectionsResult is rendered. */ getMap(): google.maps.Map | null; /** * Returns the panel <div> in which the * DirectionsResult is rendered. */ getPanel(): HTMLElement | null; /** * Returns the current (zero-based) route index in use by this * DirectionsRenderer object. */ getRouteIndex(): number; /** * Set the renderer to use the result from the * DirectionsService. Setting a valid set of directions in this * manner will display the directions on the renderer's designated map * and panel. */ setDirections(directions: google.maps.DirectionsResult | null): void; /** * This method specifies the map on which directions will be rendered. Pass * null to remove the directions from the map. */ setMap(map: google.maps.Map | null): void; /** * Change the options settings of this DirectionsRenderer after * initialization. */ setOptions(options: google.maps.DirectionsRendererOptions | null): void; /** * This method renders the directions in a <div>. Pass * null to remove the content from the panel. */ setPanel(panel: HTMLElement | null): void; /** * Set the (zero-based) index of the route in the * DirectionsResult object to render. By default, the first * route in the array will be rendered. */ setRouteIndex(routeIndex: number): void; } /** * This object defines the properties that can be set on a * DirectionsRenderer object. */ export interface DirectionsRendererOptions { /** * The directions to display on the map and/or in a <div> * panel, retrieved as a DirectionsResult object from * DirectionsService. */ directions?: google.maps.DirectionsResult | null; /** * If true, allows the user to drag and modify the paths of * routes rendered by this DirectionsRenderer. */ draggable?: boolean | null; /** * This property indicates whether the renderer should provide a * user-selectable list of routes shown in the directions panel. * @defaultValue false */ hideRouteList?: boolean | null; /** * The InfoWindow in which to render text information when a * marker is clicked. Existing info window content will be overwritten and * its position moved. If no info window is specified, the * DirectionsRenderer will create and use its own info window. * This property will be ignored if suppressInfoWindows is set * to true. */ infoWindow?: google.maps.InfoWindow | null; /** * Map on which to display the directions. */ map?: google.maps.Map | null; /** * Options for the markers. All markers rendered by the * DirectionsRenderer will use these options. */ markerOptions?: google.maps.MarkerOptions | null; /** * The <div> in which to display the directions steps. */ panel?: HTMLElement | null; /** * Options for the polylines. All polylines rendered by the * DirectionsRenderer will use these options. */ polylineOptions?: google.maps.PolylineOptions | null; /** * If this option is set to true or the map's center and * zoom were never set, the input map is centered and zoomed to the bounding * box of this set of directions. * @defaultValue false */ preserveViewport?: boolean | null; /** * The index of the route within the DirectionsResult object. * The default value is 0. */ routeIndex?: number | null; /** * Suppress the rendering of the BicyclingLayer when bicycling * directions are requested. */ suppressBicyclingLayer?: boolean | null; /** * Suppress the rendering of info windows. */ suppressInfoWindows?: boolean | null; /** * Suppress the rendering of markers. */ suppressMarkers?: boolean | null; /** * Suppress the rendering of polylines. */ suppressPolylines?: boolean | null; } /** * A directions query to be sent to the DirectionsService. */ export interface DirectionsRequest { /** * If true, instructs the Directions service to avoid ferries * where possible. Optional. */ avoidFerries?: boolean; /** * If true, instructs the Directions service to avoid highways * where possible. Optional. */ avoidHighways?: boolean; /** * If true, instructs the Directions service to avoid toll * roads where possible. Optional. */ avoidTolls?: boolean; /** * Location of destination. This can be specified as either a string to be * geocoded, or a LatLng, or a Place. Required. */ destination: | string | google.maps.LatLng | google.maps.Place | google.maps.LatLngLiteral; /** * Settings that apply only to requests where travelMode is * DRIVING. This object will have no effect for other travel * modes. */ drivingOptions?: google.maps.DrivingOptions; /** * A language identifier for the language in which results should be * returned, when possible. See the list of * supported languages. */ language?: string | null; /** * If set to true, the DirectionsService will * attempt to re-order the supplied intermediate waypoints to minimize * overall cost of the route. If waypoints are optimized, inspect * DirectionsRoute.waypoint_order in the response to determine * the new ordering. */ optimizeWaypoints?: boolean; /** * Location of origin. This can be specified as either a string to be * geocoded, or a LatLng, or a Place. Required. */ origin: | string | google.maps.LatLng | google.maps.Place | google.maps.LatLngLiteral; /** * Whether or not route alternatives should be provided. Optional. */ provideRouteAlternatives?: boolean; /** * Region code used as a bias for geocoding requests. The region code * accepts a ccTLD * ("top-level domain") two-character value. Most ccTLD codes * are identical to ISO 3166-1 codes, with some notable exceptions. For * example, the United Kingdom's ccTLD is "uk" * (.co.uk) while its ISO 3166-1 code is "gb" * (technically for the entity of "The United Kingdom of Great Britain * and Northern Ireland"). */ region?: string | null; /** * Settings that apply only to requests where travelMode is * TRANSIT. This object will have no effect for other travel modes. */ transitOptions?: google.maps.TransitOptions; /** * Type of routing requested. Required. */ travelMode: google.maps.TravelMode; /** * Preferred unit system to use when displaying distance. * @defaultValue The unit system used in the country of origin. */ unitSystem?: google.maps.UnitSystem; /** * Array of intermediate waypoints. Directions are calculated from the * origin to the destination by way of each waypoint in this array. See the * * developer's guide for the maximum number of waypoints allowed. * Waypoints are not supported for transit directions. Optional. */ waypoints?: google.maps.DirectionsWaypoint[]; } /** * The directions response retrieved from the directions server. You can * render these using a {@link google.maps.DirectionsRenderer} or parse this * object and render it yourself. You must display the warnings and copyrights * as noted in the Google Maps Platform * Terms of Service. Note that though this result is * "JSON-like," it is not strictly JSON, as it indirectly includes * LatLng objects. */ export interface DirectionsResult { /** * Contains an array of available travel modes. This field is returned when * a request specifies a travel mode and gets no results. The array contains * the available travel modes in the countries of the given set of * waypoints. This field is not returned if one or more of the waypoints are * 'via waypoints'. */ available_travel_modes?: google.maps.TravelMode[]; /** * An array of DirectionsGeocodedWaypoints, each of which * contains information about the geocoding of origin, destination and * waypoints. */ geocoded_waypoints?: google.maps.DirectionsGeocodedWaypoint[]; /** * The DirectionsRequest that yielded this result. */ request: google.maps.DirectionsRequest; /** * An array of DirectionsRoutes, each of which contains * information about the legs and steps of which it is composed. There will * only be one route unless the DirectionsRequest was made with * provideRouteAlternatives set to true. */ routes: google.maps.DirectionsRoute[]; } /** * A single route containing a set of legs in a DirectionsResult. Note that though this * object is "JSON-like," it is not strictly JSON, as it directly * and indirectly includes LatLng objects. */ export interface DirectionsRoute { /** * The bounds for this route. */ bounds: google.maps.LatLngBounds; /** * Copyrights text to be displayed for this route. */ copyrights: string; /** * The total fare for the whole transit trip. Only applicable to transit * requests. */ fare?: google.maps.TransitFare; /** * An array of DirectionsLegs, each of which contains * information about the steps of which it is composed. There will be one * leg for each stopover waypoint or destination specified. So a route with * no stopover waypoints will contain one DirectionsLeg and a * route with one stopover waypoint will contain two. */ legs: google.maps.DirectionsLeg[]; /** * An array of LatLngs representing the entire course of this * route. The path is simplified in order to make it suitable in contexts * where a small number of vertices is required (such as Static Maps API * URLs). */ overview_path: google.maps.LatLng[]; /** * An encoded * polyline representation of the route in overview_path. This polyline * is an approximate (smoothed) path of the resulting directions. */ overview_polyline: string; /** * Contains a short textual description for the route, suitable for naming * and disambiguating the route from alternatives. */ summary: string; /** * Warnings to be displayed when showing these directions. */ warnings: string[]; /** * If optimizeWaypoints was set to true, this * field will contain the re-ordered permutation of the input waypoints. For * example, if the input was:
  Origin: Los Angeles
*   Waypoints: Dallas, Bangor, Phoenix
*   Destination: New York
and the optimized output was * ordered as follows:
  Origin: Los Angeles
*   Waypoints: Phoenix, Dallas, Bangor
*   Destination: New York
then this field will be an * Array containing the values [2, 0, 1]. Note that the * numbering of waypoints is zero-based.
If any of the input waypoints * has stopover set to false, this field will be * empty, since route optimization is not available for such queries. */ waypoint_order: number[]; } /** * A service for computing directions between two or more places. * * Access by calling `const {DirectionsService} = await * google.maps.importLibrary("routes")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class DirectionsService { /** * Issue a directions search request. */ route( request: google.maps.DirectionsRequest, callback?: ( a: google.maps.DirectionsResult | null, b: google.maps.DirectionsStatus, ) => void, ): Promise; } /** * The status returned by the DirectionsService on the completion * of a call to route(). Specify these by value, or by using the * constant's name. For example, 'OK' or * google.maps.DirectionsStatus.OK. * * Access by calling `const {DirectionsStatus} = await * google.maps.importLibrary("routes")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum DirectionsStatus { /** * The DirectionsRequest provided was invalid. */ INVALID_REQUEST = 'INVALID_REQUEST', /** * Too many DirectionsWaypoints were provided in the * DirectionsRequest. See the * developer's guide for the maximum number of waypoints allowed. */ MAX_WAYPOINTS_EXCEEDED = 'MAX_WAYPOINTS_EXCEEDED', /** * At least one of the origin, destination, or waypoints could not be * geocoded. */ NOT_FOUND = 'NOT_FOUND', /** * The response contains a valid DirectionsResult. */ OK = 'OK', /** * The webpage has gone over the requests limit in too short a period of * time. */ OVER_QUERY_LIMIT = 'OVER_QUERY_LIMIT', /** * The webpage is not allowed to use the directions service. */ REQUEST_DENIED = 'REQUEST_DENIED', /** * A directions request could not be processed due to a server error. The * request may succeed if you try again. */ UNKNOWN_ERROR = 'UNKNOWN_ERROR', /** * No route could be found between the origin and destination. */ ZERO_RESULTS = 'ZERO_RESULTS', } /** * A single DirectionsStep in a DirectionsResult. * Some fields may be undefined. Note that though this object is * "JSON-like," it is not strictly JSON, as it directly includes * LatLng objects. */ export interface DirectionsStep { /** * The distance covered by this step. This property may be * undefined as the distance may be unknown. */ distance?: google.maps.Distance; /** * The typical time required to perform this step in seconds and in text * form. This property may be undefined as the duration may be * unknown. */ duration?: google.maps.Duration; /** * An encoded * polyline representation of the step. This is an approximate * (smoothed) path of the step. */ encoded_lat_lngs: string; /** * The ending location of this step. */ end_location: google.maps.LatLng; /** * The ending location of this step. * @deprecated Please use {@link google.maps.DirectionsStep.end_location}. */ end_point: google.maps.LatLng; /** * Instructions for this step. */ instructions: string; /** * A sequence of LatLngs describing the course of this step. * This is an approximate (smoothed) path of the step. * @deprecated Please use {@link google.maps.DirectionsStep.path}. */ lat_lngs: google.maps.LatLng[]; /** * Contains the action to take for the current step (turn-left, * merge, straight, etc.). Values are subject to * change, and new values may be introduced without prior notice. */ maneuver: string; /** * A sequence of LatLngs describing the course of this step. * This is an approximate (smoothed) path of the step. */ path: google.maps.LatLng[]; /** * Contains an object with a single property, 'points', that holds * an encoded * polyline representation of the step. This polyline is an approximate * (smoothed) path of the step. * @deprecated Please use {@link * google.maps.DirectionsStep.encoded_lat_lngs}. */ polyline?: google.maps.DirectionsPolyline; /** * The starting location of this step. */ start_location: google.maps.LatLng; /** * The starting location of this step. * @deprecated Please use {@link google.maps.DirectionsStep.start_location}. */ start_point: google.maps.LatLng; /** * Sub-steps of this step. Specified for non-transit sections of transit * routes. */ steps?: google.maps.DirectionsStep[]; /** * Transit-specific details about this step. This property will be undefined * unless the travel mode of this step is TRANSIT. */ transit?: google.maps.TransitDetails; /** * Details pertaining to this step if the travel mode is * TRANSIT. */ transit_details?: google.maps.TransitDetails; /** * The mode of travel used in this step. */ travel_mode: google.maps.TravelMode; } /** * @deprecated Deprecated as of 2011. Use {@link google.maps.TravelMode} * instead. */ export enum DirectionsTravelMode {} /** * @deprecated Deprecated as of 2011. Use {@link google.maps.UnitSystem} * instead. */ export enum DirectionsUnitSystem {} /** * A DirectionsWaypoint represents a location between origin and * destination through which the trip should be routed. */ export interface DirectionsWaypoint { /** * Waypoint location. Can be an address string, a LatLng, or a * Place. Optional. */ location?: | string | google.maps.LatLng | google.maps.LatLngLiteral | google.maps.Place; /** * If true, indicates that this waypoint is a stop between the * origin and destination. This has the effect of splitting the route into * two legs. If false, indicates that the route should be * biased to go through this waypoint, but not split into two legs. This is * useful if you want to create a route in response to the user dragging * waypoints on a map. * @defaultValue true */ stopover?: boolean; } /** * A representation of distance as a numeric value and a display string. */ export interface Distance { /** * A string representation of the distance value, using the * UnitSystem specified in the request. */ text: string; /** * The distance in meters. */ value: number; } /** * The element-level status about a particular origin-destination pairing * returned by the DistanceMatrixService upon completion of a * distance matrix request. These values are specified as strings, for * example, 'OK'. * * Access by calling `const {DistanceMatrixElementStatus} = await * google.maps.importLibrary("routes")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum DistanceMatrixElementStatus { /** * The origin and/or destination of this pairing could not be geocoded. */ NOT_FOUND = 'NOT_FOUND', /** * The response contains a valid result. */ OK = 'OK', /** * No route could be found between the origin and destination. */ ZERO_RESULTS = 'ZERO_RESULTS', } /** * A distance matrix query sent by the DistanceMatrixService * containing arrays of origin and destination locations, and various options * for computing metrics. */ export interface DistanceMatrixRequest { /** * If true, instructs the Distance Matrix service to avoid * ferries where possible. Optional. */ avoidFerries?: boolean; /** * If true, instructs the Distance Matrix service to avoid * highways where possible. Optional. */ avoidHighways?: boolean; /** * If true, instructs the Distance Matrix service to avoid toll * roads where possible. Optional. */ avoidTolls?: boolean; /** * An array containing destination address strings, or LatLng, * or Place objects, to which to calculate distance and time. * Required. */ destinations: ( | string | google.maps.LatLng | google.maps.LatLngLiteral | google.maps.Place )[]; /** * Settings that apply only to requests where travelMode is * DRIVING. This object will have no effect for other travel * modes. */ drivingOptions?: google.maps.DrivingOptions; /** * A language identifier for the language in which results should be * returned, when possible. See the list of * supported languages. */ language?: string | null; /** * An array containing origin address strings, or LatLng, or * Place objects, from which to calculate distance and time. * Required. */ origins: ( | string | google.maps.LatLng | google.maps.LatLngLiteral | google.maps.Place )[]; /** * Region code used as a bias for geocoding requests. The region code * accepts a ccTLD * ("top-level domain") two-character value. Most ccTLD codes * are identical to ISO 3166-1 codes, with some notable exceptions. For * example, the United Kingdom's ccTLD is "uk" * (.co.uk) while its ISO 3166-1 code is "gb" * (technically for the entity of "The United Kingdom of Great Britain * and Northern Ireland"). */ region?: string | null; /** * Settings that apply only to requests where travelMode is * TRANSIT. This object will have no effect for other travel modes. */ transitOptions?: google.maps.TransitOptions; /** * Type of routing requested. Required. */ travelMode: google.maps.TravelMode; /** * Preferred unit system to use when displaying distance. Optional; defaults * to metric. */ unitSystem?: google.maps.UnitSystem; } /** * The response to a DistanceMatrixService request, consisting of * the formatted origin and destination addresses, and a sequence of * DistanceMatrixResponseRows, one for each corresponding origin * address. */ export interface DistanceMatrixResponse { /** * The formatted destination addresses. */ destinationAddresses: string[]; /** * The formatted origin addresses. */ originAddresses: string[]; /** * The rows of the matrix, corresponding to the origin addresses. */ rows: google.maps.DistanceMatrixResponseRow[]; } /** * A single element of a response to a DistanceMatrixService * request, which contains the duration and distance from one origin to one * destination. */ export interface DistanceMatrixResponseElement { /** * The distance for this origin-destination pairing. This property may be * undefined as the distance may be unknown. */ distance: google.maps.Distance; /** * The duration for this origin-destination pairing. This property may be * undefined as the duration may be unknown. */ duration: google.maps.Duration; /** * The duration for this origin-destination pairing, taking into account the * traffic conditions indicated by the trafficModel property. * This property may be undefined as the duration may be * unknown. Only available to Premium Plan customers when * drivingOptions is defined when making the request. */ duration_in_traffic: google.maps.Duration; /** * The total fare for this origin-destination pairing. Only applicable to * transit requests. */ fare: google.maps.TransitFare; /** * The status of this particular origin-destination pairing. */ status: google.maps.DistanceMatrixElementStatus; } /** * A row of the response to a DistanceMatrixService request, * consisting of a sequence of DistanceMatrixResponseElements, * one for each corresponding destination address. */ export interface DistanceMatrixResponseRow { /** * The row's elements, corresponding to the destination addresses. */ elements: google.maps.DistanceMatrixResponseElement[]; } /** * A service for computing distances between multiple origins and * destinations. * * Access by calling `const {DistanceMatrixService} = await * google.maps.importLibrary("routes")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class DistanceMatrixService { /** * Issues a distance matrix request. */ getDistanceMatrix( request: google.maps.DistanceMatrixRequest, callback?: ( a: google.maps.DistanceMatrixResponse | null, b: google.maps.DistanceMatrixStatus, ) => void, ): Promise; } /** * The top-level status about the request in general returned by the * DistanceMatrixService upon completion of a distance matrix * request. Specify these by value, or by using the constant's name. For * example, 'OK' or * google.maps.DistanceMatrixStatus.OK. * * Access by calling `const {DistanceMatrixStatus} = await * google.maps.importLibrary("routes")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum DistanceMatrixStatus { /** * The provided request was invalid. */ INVALID_REQUEST = 'INVALID_REQUEST', /** * The request contains more than 25 origins, or more than 25 destinations. */ MAX_DIMENSIONS_EXCEEDED = 'MAX_DIMENSIONS_EXCEEDED', /** * The product of origins and destinations exceeds the per-query limit. */ MAX_ELEMENTS_EXCEEDED = 'MAX_ELEMENTS_EXCEEDED', /** * The response contains a valid result. */ OK = 'OK', /** * Too many elements have been requested within the allowed time period. The * request should succeed if you try again after some time. */ OVER_QUERY_LIMIT = 'OVER_QUERY_LIMIT', /** * The service denied use of the Distance Matrix service by your web page. */ REQUEST_DENIED = 'REQUEST_DENIED', /** * A Distance Matrix request could not be processed due to a server error. * The request may succeed if you try again. */ UNKNOWN_ERROR = 'UNKNOWN_ERROR', } export interface DrawingLibrary { DrawingManager: typeof google.maps.drawing.DrawingManager; OverlayType: typeof google.maps.drawing.OverlayType; } /** * Configures the DirectionsRequest when the travel mode * is set to DRIVING. */ export interface DrivingOptions { /** * The desired departure time for the route, specified as a * Date object. The Date object measures time in * milliseconds since 1 January 1970. This must be specified for a * DrivingOptions to be valid. The departure time must be set * to the current time or some time in the future. It cannot be in the past. */ departureTime: Date; /** * The preferred assumption to use when predicting duration in traffic. The * default is BEST_GUESS. */ trafficModel?: google.maps.TrafficModel; } /** * A representation of duration as a numeric value and a display string. */ export interface Duration { /** * A string representation of the duration value. */ text: string; /** * The duration in seconds. */ value: number; } export interface ElevationLibrary { ElevationService: typeof google.maps.ElevationService; ElevationStatus: typeof google.maps.ElevationStatus; } /** * The result of an ElevationService request, consisting of the * set of elevation coordinates and their elevation values. Note that a single * request may produce multiple ElevationResults. */ export interface ElevationResult { /** * The elevation of this point on Earth, in meters above sea level. */ elevation: number; /** * The location of this elevation result. */ location: google.maps.LatLng | null; /** * The distance, in meters, between sample points from which the elevation * was interpolated. This property will be missing if the resolution is not * known. Note that elevation data becomes more coarse (larger * resolution values) when multiple points are passed. To * obtain the most accurate elevation value for a point, it should be * queried independently. */ resolution: number; } /** * Defines a service class that talks directly to Google servers for * requesting elevation data. * * Access by calling `const {ElevationService} = await * google.maps.importLibrary("elevation")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class ElevationService { /** * Makes an elevation request along a path, where the elevation data are * returned as distance-based samples along that path. */ getElevationAlongPath( request: google.maps.PathElevationRequest, callback?: ( a: google.maps.ElevationResult[] | null, b: google.maps.ElevationStatus, ) => void, ): Promise; /** * Makes an elevation request for a list of discrete locations. */ getElevationForLocations( request: google.maps.LocationElevationRequest, callback?: ( a: google.maps.ElevationResult[] | null, b: google.maps.ElevationStatus, ) => void, ): Promise; } /** * The status returned by the ElevationService upon completion of * an elevation request. Specify these by value, or by using the * constant's name. For example, 'OK' or * google.maps.ElevationStatus.OK. * * Access by calling `const {ElevationStatus} = await * google.maps.importLibrary("elevation")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum ElevationStatus { /** * The request was invalid. */ INVALID_REQUEST = 'INVALID_REQUEST', /** * The request did not encounter any errors. */ OK = 'OK', /** * The webpage has gone over the requests limit in too short a period of * time. */ OVER_QUERY_LIMIT = 'OVER_QUERY_LIMIT', /** * The webpage is not allowed to use the elevation service. */ REQUEST_DENIED = 'REQUEST_DENIED', /** * The elevation request could not be successfully processed, yet the exact * reason for the failure is not known. */ UNKNOWN_ERROR = 'UNKNOWN_ERROR', } /** * An event with an associated Error. */ export interface ErrorEvent { /** * The Error related to the event. */ error: Error; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * Extra computations to perform while completing a geocoding request. * * Access by calling `const {ExtraGeocodeComputation} = await * google.maps.importLibrary("geocoding")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum ExtraGeocodeComputation { /** * Generate an address descriptor. */ ADDRESS_DESCRIPTORS = 'ADDRESS_DESCRIPTORS', } /** * An interface representing a vector map tile feature. These are inputs to * the FeatureStyleFunction. Do not save a reference to a * particular Feature object because the reference will not be * stable. */ export interface Feature { /** * FeatureType of this Feature. */ featureType: google.maps.FeatureType; } /** * An interface representing a map layer containing features of a * specific {@link google.maps.FeatureType} whose style can be overridden * client-side, or have events attached. */ export interface FeatureLayer { /** * Adds the given listener function to the given event name. Returns an * identifier for this listener that can be used with {@link * google.maps.event.removeListener}. * @param eventName Observed event. * @param handler Function to handle events. */ addListener( eventName: string, handler: Function, ): google.maps.MapsEventListener; /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * The Dataset ID for this FeatureLayer. Only present if the * featureType is FeatureType.DATASET. */ datasetId?: string; /** * The FeatureType associated with this * FeatureLayer. */ featureType: google.maps.FeatureType; /** * Whether this FeatureLayer is available, meaning whether * Data-driven styling is available for this map (there is a map ID using * vector tiles with this FeatureLayer enabled in the Google * Cloud Console map style.) If this is false (or becomes false), styling on * this FeatureLayer returns to default and events are not * triggered. */ isAvailable: boolean; /** * The style of Features in the FeatureLayer. The * style is applied when style is set. If your style function updates, you * must set the style property again. A FeatureStyleFunction * must return consistent results when it is applied over the map tiles, and * should be optimized for performance. Asynchronous functions are not * supported. If you use a FeatureStyleOptions, all features of * that layer will be styled with the same FeatureStyleOptions. * Set the style to null to remove the previously set style. If * this FeatureLayer is not available, setting style does * nothing and logs an error. */ style?: | google.maps.FeatureStyleOptions | null | google.maps.FeatureStyleFunction; } /** * This object is returned from a mouse event on a FeatureLayer. */ export interface FeatureMouseEvent extends google.maps.MapMouseEvent { /** * The Features at this mouse event. */ features: google.maps.Feature[]; } export type FeatureStyleFunction = ( a: google.maps.FeatureStyleFunctionOptions, ) => google.maps.FeatureStyleOptions | null | undefined; /** * Options passed to a FeatureStyleFunction. */ export interface FeatureStyleFunctionOptions { /** * Feature passed into the FeatureStyleFunction * for styling. */ feature: google.maps.Feature; } /** * These options specify the way the style of a Feature should be * modified on a map. */ export interface FeatureStyleOptions { /** * Hex RGB string (like "#00FF00" for green). Only applies to * polygon geometries. */ fillColor?: string; /** * The fill opacity between 0.0 and 1.0. Only applies to polygon geometries. */ fillOpacity?: number; /** * Hex RGB string (like "#00FF00" for green). */ strokeColor?: string; /** * The stroke opacity between 0.0 and 1.0. Only applies to line and polygon * geometries. */ strokeOpacity?: number; /** * The stroke width in pixels. Only applies to line and polygon geometries. */ strokeWeight?: number; } /** * Identifiers for feature types. * * Access by calling `const {FeatureType} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum FeatureType { /** * Indicates a first-order civil entity below the country level. */ ADMINISTRATIVE_AREA_LEVEL_1 = 'ADMINISTRATIVE_AREA_LEVEL_1', /** * Indicates a second-order civil entity below the country level. */ ADMINISTRATIVE_AREA_LEVEL_2 = 'ADMINISTRATIVE_AREA_LEVEL_2', /** * Indicates the national political entity. */ COUNTRY = 'COUNTRY', /** * Indicates a third-party dataset. */ DATASET = 'DATASET', /** * Indicates an incorporated city or town political entity. */ LOCALITY = 'LOCALITY', /** * Indicates a postal code as used to address postal mail within the * country. Includes zip codes. */ POSTAL_CODE = 'POSTAL_CODE', /** * Indicates a school district. */ SCHOOL_DISTRICT = 'SCHOOL_DISTRICT', } /** * Options for the rendering of the fullscreen control. */ export interface FullscreenControlOptions { /** * Position id. Used to specify the position of the control on the map. * @defaultValue {@link google.maps.ControlPosition.INLINE_END_BLOCK_START} */ position?: google.maps.ControlPosition | null; } /** * A service for converting between an address and a LatLng. * * Access by calling `const {Geocoder} = await * google.maps.importLibrary("geocoding")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class Geocoder { /** * Geocode a request. */ geocode( request: google.maps.GeocoderRequest, callback?: | (( a: google.maps.GeocoderResult[] | null, b: google.maps.GeocoderStatus, ) => void) | null, ): Promise; } /** * A single address component within a GeocoderResult. A full * address may consist of multiple address components. */ export interface GeocoderAddressComponent { /** * The full text of the address component */ long_name: string; /** * The abbreviated, short text of the given address component */ short_name: string; /** * An array of strings denoting the type of this address component. A list * of valid types can be found here */ types: string[]; } /** * GeocoderComponentRestrictions represents a set of filters that * resolve to a specific area. For details on how this works, see * Geocoding Component Filtering. */ export interface GeocoderComponentRestrictions { /** * Matches all the administrative_area levels. Optional. */ administrativeArea?: string; /** * Matches a country name or a two letter ISO 3166-1 country code. Optional. */ country?: string; /** * Matches against both locality and sublocality * types. Optional. */ locality?: string; /** * Matches postal_code and postal_code_prefix. * Optional. */ postalCode?: string; /** * Matches the long or short name of a route. Optional. */ route?: string; } /** * Geometry information about this GeocoderResult */ export interface GeocoderGeometry { /** * The precise bounds of this GeocoderResult, if applicable */ bounds?: google.maps.LatLngBounds; /** * The latitude/longitude coordinates of this result */ location: google.maps.LatLng; /** * The type of location returned in location */ location_type: google.maps.GeocoderLocationType; /** * The bounds of the recommended viewport for displaying this * GeocoderResult */ viewport: google.maps.LatLngBounds; } /** * Describes the type of location returned from a geocode. Specify these by * value, or by using the constant's name. For example, * 'ROOFTOP' or * google.maps.GeocoderLocationType.ROOFTOP. * * Access by calling `const {GeocoderLocationType} = await * google.maps.importLibrary("geocoding")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum GeocoderLocationType { /** * The returned result is approximate. */ APPROXIMATE = 'APPROXIMATE', /** * The returned result is the geometric center of a result such a line (e.g. * street) or polygon (region). */ GEOMETRIC_CENTER = 'GEOMETRIC_CENTER', /** * The returned result reflects an approximation (usually on a road) * interpolated between two precise points (such as intersections). * Interpolated results are generally returned when rooftop geocodes are * unavailable for a street address. */ RANGE_INTERPOLATED = 'RANGE_INTERPOLATED', /** * The returned result reflects a precise geocode. */ ROOFTOP = 'ROOFTOP', } /** * The specification for a geocoding request to be sent to the * Geocoder. */ export interface GeocoderRequest { /** * Address to geocode. One, and only one, of address, * location and placeId must be supplied. */ address?: string | null; /** * LatLngBounds within which to search. Optional. */ bounds?: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral | null; /** * Components are used to restrict results to a specific area. A filter * consists of one or more of: route, locality, * administrativeArea, postalCode, * country. Only the results that match all the filters will be * returned. Filter values support the same methods of spelling correction * and partial matching as other geocoding requests. Optional. */ componentRestrictions?: google.maps.GeocoderComponentRestrictions | null; /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * A list of extra computations which may be used to complete the request. * Note: These extra computations may return extra fields on the response. */ extraComputations?: google.maps.ExtraGeocodeComputation[]; /** * Fulfill the promise on a ZERO_RESULT status in the response. This may be * desired because even with zero geocoding results there may still be * additional response level fields returned. */ fulfillOnZeroResults?: boolean | null; /** * A language identifier for the language in which results should be * returned, when possible. See the list of * supported languages. */ language?: string | null; /** * LatLng (or LatLngLiteral) for which to search. * The geocoder performs a reverse geocode. See * Reverse Geocoding for more information. One, and only one, of * address, location and placeId must * be supplied. */ location?: google.maps.LatLng | google.maps.LatLngLiteral | null; /** * The place ID associated with the location. Place IDs uniquely identify a * place in the Google Places database and on Google Maps. Learn more about * place * IDs in the Places API developer guide. The geocoder performs a * reverse geocode. See Reverse * Geocoding for more information. One, and only one, of * address, location and placeId must * be supplied. */ placeId?: string | null; /** * Country code used to bias the search, specified as a two-character * (non-numeric) Unicode region subtag / CLDR identifier. Optional. See Google Maps Platform * Coverage Details for supported regions. */ region?: string | null; } /** * A Geocoder response returned by the {@link google.maps.Geocoder} containing * the list of {@link google.maps.GeocoderResult}s. */ export interface GeocoderResponse { /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * A relational description of a location. Includes a ranked set of nearby * landmarks and the areas containing the target location. It is only * populated for reverse geocoding requests and only when {@link * google.maps.ExtraGeocodeComputation.ADDRESS_DESCRIPTORS} is enabled. */ address_descriptor?: google.maps.AddressDescriptor | null; /** * The plus code associated with the location. */ plus_code?: google.maps.places.PlacePlusCode | null; /** * The list of {@link google.maps.GeocoderResult}s. */ results: google.maps.GeocoderResult[]; } /** * A single geocoder result retrieved from the geocode server. A geocode * request may return multiple result objects. Note that though this result is * "JSON-like," it is not strictly JSON, as it indirectly includes a * LatLng object. */ export interface GeocoderResult { /** * An array of GeocoderAddressComponents */ address_components: google.maps.GeocoderAddressComponent[]; /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * A relational description of the location associated with this geocode. * Includes a ranked set of nearby landmarks and the areas containing the * target location. This will only be populated for forward geocoding and * place ID lookup requests, only when {@link * google.maps.ExtraGeocodeComputation.ADDRESS_DESCRIPTORS} is enabled, and * only for certain localized places. */ address_descriptor?: google.maps.AddressDescriptor; /** * A string containing the human-readable address of this location. */ formatted_address: string; /** * A GeocoderGeometry object */ geometry: google.maps.GeocoderGeometry; /** * Whether the geocoder did not return an exact match for the original * request, though it was able to match part of the requested address. If an * exact match, the value will be undefined. */ partial_match?: boolean; /** * The place ID associated with the location. Place IDs uniquely identify a * place in the Google Places database and on Google Maps. Learn more about * Place * IDs in the Places API developer guide. */ place_id: string; /** * The plus code associated with the location. */ plus_code?: google.maps.places.PlacePlusCode; /** * An array of strings denoting all the localities contained in a postal * code. This is only present when the result is a postal code that contains * multiple localities. */ postcode_localities?: string[]; /** * An array of strings denoting the type of the returned geocoded element. * For a list of possible strings, refer to the * Address Component Types section of the Developer's Guide. */ types: string[]; } /** * The status returned by the Geocoder on the completion of a * call to geocode(). Specify these by value, or by using the * constant's name. For example, 'OK' or * google.maps.GeocoderStatus.OK. * * Access by calling `const {GeocoderStatus} = await * google.maps.importLibrary("geocoding")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum GeocoderStatus { /** * There was a problem contacting the Google servers. */ ERROR = 'ERROR', /** * This GeocoderRequest was invalid. */ INVALID_REQUEST = 'INVALID_REQUEST', /** * The response contains a valid GeocoderResponse. */ OK = 'OK', /** * The webpage has gone over the requests limit in too short a period of * time. */ OVER_QUERY_LIMIT = 'OVER_QUERY_LIMIT', /** * The webpage is not allowed to use the geocoder. */ REQUEST_DENIED = 'REQUEST_DENIED', /** * A geocoding request could not be processed due to a server error. The * request may succeed if you try again. */ UNKNOWN_ERROR = 'UNKNOWN_ERROR', /** * No result was found for this GeocoderRequest. */ ZERO_RESULTS = 'ZERO_RESULTS', } export interface GeocodingLibrary { Containment: typeof google.maps.Containment; ExtraGeocodeComputation: typeof google.maps.ExtraGeocodeComputation; Geocoder: typeof google.maps.Geocoder; GeocoderLocationType: typeof google.maps.GeocoderLocationType; GeocoderStatus: typeof google.maps.GeocoderStatus; SpatialRelationship: typeof google.maps.SpatialRelationship; } export interface GeometryLibrary { encoding: typeof google.maps.geometry.encoding; poly: typeof google.maps.geometry.poly; spherical: typeof google.maps.geometry.spherical; } /** * A rectangular image overlay on the map. * * Access by calling `const {GroundOverlay} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class GroundOverlay extends google.maps.MVCObject { /** * A rectangular image overlay on the map. * * Access by calling `const {GroundOverlay} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor( url: string, bounds: google.maps.LatLngBounds | null | google.maps.LatLngBoundsLiteral, opts?: google.maps.GroundOverlayOptions | null, ); /** * Gets the LatLngBounds of this overlay. */ getBounds(): google.maps.LatLngBounds | null; /** * Returns the map on which this ground overlay is displayed. */ getMap(): google.maps.Map | null; /** * Returns the opacity of this ground overlay. */ getOpacity(): number; /** * Gets the url of the projected image. */ getUrl(): string; /** * Renders the ground overlay on the specified map. If map is set to * null, the overlay is removed. */ setMap(map: google.maps.Map | null): void; /** * Sets the opacity of this ground overlay. */ setOpacity(opacity: number): void; } /** * This object defines the properties that can be set on a * GroundOverlay object. */ export interface GroundOverlayOptions { /** * If true, the ground overlay can receive mouse events. */ clickable?: boolean | null; /** * The map on which to display the overlay. */ map?: google.maps.Map | null; /** * The opacity of the overlay, expressed as a number between 0 and 1. * Optional. * @defaultValue 1.0 */ opacity?: number | null; } /** * A structure representing a Marker icon image. */ export interface Icon { /** * The position at which to anchor an image in correspondence to the * location of the marker on the map. By default, the anchor is located * along the center point of the bottom of the image. */ anchor?: google.maps.Point | null; /** * The origin of the label relative to the top-left corner of the icon * image, if a label is supplied by the marker. By default, the origin is * located in the center point of the image. */ labelOrigin?: google.maps.Point | null; /** * The position of the image within a sprite, if any. By default, the origin * is located at the top left corner of the image (0, 0). */ origin?: google.maps.Point | null; /** * The size of the entire image after scaling, if any. Use this property to * stretch/shrink an image or a sprite. */ scaledSize?: google.maps.Size | null; /** * The display size of the sprite or image. When using sprites, you must * specify the sprite size. If the size is not provided, it will be set when * the image loads. */ size?: google.maps.Size | null; /** * The URL of the image or sprite sheet. */ url: string; } /** * This object is sent in an event when a user clicks on an icon on the map. * The place ID of this place is stored in the placeId member. To prevent the * default info window from showing up, call the stop() method on this event * to prevent it being propagated. Learn more about place * IDs in the Places API developer guide. */ export interface IconMouseEvent extends google.maps.MapMouseEvent { /** * The place ID of the place that was clicked. This place ID can be used to * query more information about the feature that was clicked.

Learn more * about place * IDs in the Places API developer guide. */ placeId: string | null; } /** * Describes how icons are to be rendered on a line.

If your polyline * is geodesic, then the distances specified for both offset and repeat are * calculated in meters by default. Setting either offset or repeat to a pixel * value will cause the distances to be calculated in pixels on the screen. */ export interface IconSequence { /** * If true, each icon in the sequence has the same fixed * rotation regardless of the angle of the edge on which it lies. If * false, case each icon in the sequence is rotated to align * with its edge. * @defaultValue false */ fixedRotation?: boolean; /** * The icon to render on the line. */ icon?: google.maps.Symbol | null; /** * The distance from the start of the line at which an icon is to be * rendered. This distance may be expressed as a percentage of line's * length (e.g. * '50%') or in pixels (e.g. '50px'). * @defaultValue '100%' */ offset?: string; /** * The distance between consecutive icons on the line. This distance may be * expressed as a percentage of the line's length (e.g. '50%') * or in pixels (e.g. '50px'). To disable repeating of the icon, * specify * '0'. * @defaultValue 0 */ repeat?: string; } /** * This class implements the MapType interface and is provided for rendering * image tiles. * * Access by calling `const {ImageMapType} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class ImageMapType extends google.maps.MVCObject implements google.maps.MapType { /** * This class implements the MapType interface and is provided for rendering * image tiles. * * Access by calling `const {ImageMapType} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(opts: google.maps.ImageMapTypeOptions | null); alt: string | null; /** * Returns the opacity level (0 (transparent) to * 1.0) of the ImageMapType tiles. */ getOpacity(): number; /** * @param tileCoord Tile coordinates. * @param zoom Tile zoom. * @param ownerDocument The document which owns this tile. */ getTile( tileCoord: google.maps.Point | null, zoom: number, ownerDocument: Document | null, ): Element | null; maxZoom: number; minZoom: number; name: string | null; projection: google.maps.Projection | null; radius: number; /** * @param tileDiv Tile to release. */ releaseTile(tileDiv: Element | null): void; /** * Sets the opacity level (0 (transparent) to 1.0) * of the ImageMapType tiles. * @param opacity The new opacity. */ setOpacity(opacity: number): void; tileSize: google.maps.Size | null; } /** * This class is used to create a MapType that renders image tiles. */ export interface ImageMapTypeOptions { /** * Alt text to display when this MapType's button is hovered over in the * MapTypeControl. */ alt?: string | null; /** * Returns a string (URL) for given tile coordinate (x, y) and zoom level. */ getTileUrl?: ((a: google.maps.Point, b: number) => string | null) | null; /** * The maximum zoom level for the map when displaying this MapType. */ maxZoom?: number | null; /** * The minimum zoom level for the map when displaying this MapType. * Optional. */ minZoom?: number | null; /** * Name to display in the MapTypeControl. */ name?: string | null; /** * The opacity to apply to the tiles. The opacity should be specified as a * float value between 0 and 1.0, where 0 is fully transparent and 1 is * fully opaque. */ opacity?: number | null; /** * The tile size. */ tileSize?: google.maps.Size | null; } /** * An overlay that looks like a bubble and is often connected to a marker. * * Access by calling `const {InfoWindow} = await * google.maps.importLibrary("maps")` or `const {InfoWindow} = await * google.maps.importLibrary("streetView")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class InfoWindow extends google.maps.MVCObject { /** * An overlay that looks like a bubble and is often connected to a marker. * * Access by calling `const {InfoWindow} = await * google.maps.importLibrary("maps")` or `const {InfoWindow} = await * google.maps.importLibrary("streetView")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(opts?: google.maps.InfoWindowOptions | null); /** * Closes this InfoWindow by removing it from the DOM structure. */ close(): void; /** * Sets focus on this InfoWindow. You may wish to consider * using this method along with a visible event to make sure * that InfoWindow is visible before setting focus on it. An * InfoWindow that is not visible cannot be focused. */ focus(): void; getContent(): string | Element | null | Text | undefined; getHeaderContent(): string | Element | null | Text | undefined; getHeaderDisabled(): boolean | undefined; getPosition(): google.maps.LatLng | null | undefined; getZIndex(): number; /** * Checks if the InfoWindow is open. */ isOpen: boolean; /** * Opens this InfoWindow on the given map. Optionally, an InfoWindow can be * associated with an anchor. In the core API, the only anchor is the Marker * class. However, an anchor can be any MVCObject that exposes a LatLng * position property and optionally a Point * anchorPoint property for calculating the * pixelOffset (see InfoWindowOptions). The * anchorPoint is the offset from the anchor's position to * the tip of the InfoWindow. It is recommended to use the {@link * google.maps.InfoWindowOpenOptions} interface as the single argument for * this method. To prevent changing browser focus on open, set {@link * google.maps.InfoWindowOpenOptions.shouldFocus} to false. * @param options Either an InfoWindowOpenOptions object (recommended) or * the map|panorama on which to render this InfoWindow. * @param anchor The anchor to which this InfoWindow will be positioned. If * the anchor is non-null, the InfoWindow will be positioned at the * top-center of the anchor. The InfoWindow will be rendered on the same * map or panorama as the anchor (when available). */ open( options?: | google.maps.InfoWindowOpenOptions | null | google.maps.Map | google.maps.StreetViewPanorama, anchor?: | google.maps.MVCObject | null | google.maps.marker.AdvancedMarkerElement, ): void; /** * @param content The content to be displayed by this InfoWindow. */ setContent(content?: string | Element | null | Text): void; /** * @param headerContent The header content to be displayed by this * InfoWindow. See {@link google.maps.InfoWindowOptions.headerContent}. */ setHeaderContent(headerContent?: string | Element | null | Text): void; /** * @param headerDisabled Specifies whether to disable the whole header row. * See {@link google.maps.InfoWindowOptions.headerDisabled}. */ setHeaderDisabled(headerDisabled?: boolean | null): void; setOptions(options?: google.maps.InfoWindowOptions | null): void; /** * @param position The LatLng position at which to display this InfoWindow. */ setPosition( position?: google.maps.LatLng | null | google.maps.LatLngLiteral, ): void; /** * @param zIndex The z-index for this InfoWindow. An InfoWindow with a * greater z-index will be displayed in front of all other InfoWindows * with a lower z-index. */ setZIndex(zIndex: number): void; } /** * Options for opening an InfoWindow */ export interface InfoWindowOpenOptions { /** * The anchor to which this InfoWindow will be positioned. If the anchor is * non-null, the InfoWindow will be positioned at the top-center of the * anchor. The InfoWindow will be rendered on the same map or panorama as * the anchor (when available). */ anchor?: | google.maps.MVCObject | null | google.maps.marker.AdvancedMarkerElement; /** * The map or panorama on which to render this InfoWindow. */ map?: google.maps.Map | null | google.maps.StreetViewPanorama; /** * Whether or not focus should be moved inside the InfoWindow when it is * opened. When this property is unset or when it is set to * null or undefined, a heuristic is used to * decide whether or not focus should be moved. It is recommended to * explicitly set this property to fit your needs as the heuristic is * subject to change and may not work well for all use cases. */ shouldFocus?: boolean | null; } /** * InfoWindowOptions object used to define the properties that can be set on a * InfoWindow. */ export interface InfoWindowOptions { /** * AriaLabel to assign to the InfoWindow. */ ariaLabel?: string | null; /** * Content to display in the InfoWindow. This can be an HTML element, a * plain-text string, or a string containing HTML. The InfoWindow will be * sized according to the content. To set an explicit size for the content, * set content to be a HTML element with that size. */ content?: string | Element | Text | null; /** * Disable panning the map to make the InfoWindow fully visible when it * opens. * @defaultValue false */ disableAutoPan?: boolean | null; /** * The content to display in the InfoWindow header row. This can be an HTML * element, or a string of plain text. The InfoWindow will be sized * according to the content. To set an explicit size for the header content, * set headerContent to be a HTML element with that size. */ headerContent?: string | Element | Text | null; /** * Disables the whole header row in the InfoWindow. When set to true, the * header will be removed so that the header content and the close button * will be hidden. */ headerDisabled?: boolean | null; /** * Maximum width of the InfoWindow, regardless of content's width. This * value is only considered if it is set before a call to * open(). To change the maximum width when changing content, * call close(), setOptions(), and then * open(). */ maxWidth?: number | null; /** * Minimum width of the InfoWindow, regardless of the content's width. * When using this property, it is strongly recommended to set the * minWidth to a value less than the width of the map (in * pixels). This value is only considered if it is set before a call to * open(). To change the minimum width when changing content, * call close(), setOptions(), and then * open(). */ minWidth?: number | null; /** * The offset, in pixels, of the tip of the info window from the point on * the map at whose geographical coordinates the info window is anchored. If * an InfoWindow is opened with an anchor, the pixelOffset will * be calculated from the anchor's anchorPoint property. */ pixelOffset?: google.maps.Size | null; /** * The LatLng at which to display this InfoWindow. If the InfoWindow is * opened with an anchor, the anchor's position will be used instead. */ position?: google.maps.LatLng | google.maps.LatLngLiteral | null; /** * All InfoWindows are displayed on the map in order of their zIndex, with * higher values displaying in front of InfoWindows with lower values. By * default, InfoWindows are displayed according to their latitude, with * InfoWindows of lower latitudes appearing in front of InfoWindows at * higher latitudes. InfoWindows are always displayed in front of markers. */ zIndex?: number | null; } export interface JourneySharingLibrary { AutomaticViewportMode: typeof google.maps.journeySharing.AutomaticViewportMode; DeliveryVehicleStopState: typeof google.maps.journeySharing.DeliveryVehicleStopState; FleetEngineFleetLocationProvider: typeof google.maps.journeySharing.FleetEngineFleetLocationProvider; FleetEngineServiceType: typeof google.maps.journeySharing.FleetEngineServiceType; FleetEngineShipmentLocationProvider: typeof google.maps.journeySharing.FleetEngineShipmentLocationProvider; FleetEngineTripLocationProvider: typeof google.maps.journeySharing.FleetEngineTripLocationProvider; FleetEngineVehicleLocationProvider: typeof google.maps.journeySharing.FleetEngineVehicleLocationProvider; JourneySharingMapView: typeof google.maps.journeySharing.JourneySharingMapView; Speed: typeof google.maps.journeySharing.Speed; TripType: typeof google.maps.journeySharing.TripType; VehicleNavigationStatus: typeof google.maps.journeySharing.VehicleNavigationStatus; VehicleState: typeof google.maps.journeySharing.VehicleState; VehicleType: typeof google.maps.journeySharing.VehicleType; WaypointType: typeof google.maps.journeySharing.WaypointType; } /** * Contains details of the author of a KML document or feature. */ export interface KmlAuthor { /** * The author's e-mail address, or an empty string if not specified. */ email: string; /** * The author's name, or an empty string if not specified. */ name: string; /** * The author's home page, or an empty string if not specified. */ uri: string; } /** * Data for a single KML feature in JSON format, returned when a KML feature * is clicked. The data contained in this object mirrors that associated with * the feature in the KML or GeoRSS markup in which it is declared. */ export interface KmlFeatureData { /** * The feature's <atom:author>, extracted from the * layer markup (if specified). */ author: google.maps.KmlAuthor | null; /** * The feature's <description>, extracted from the * layer markup. */ description: string; /** * The feature's <id>, extracted from the layer * markup. If no <id> has been specified, a unique ID * will be generated for this feature. */ id: string; /** * The feature's balloon styled text, if set. */ infoWindowHtml: string; /** * The feature's <name>, extracted from the layer * markup. */ name: string; /** * The feature's <Snippet>, extracted from the layer * markup. */ snippet: string; } /** * A KmlLayer adds geographic markup to the map from a KML, KMZ * or GeoRSS file that is hosted on a publicly accessible web server. A * KmlFeatureData object is provided for each feature when * clicked. * * Access by calling `const {KmlLayer} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class KmlLayer extends google.maps.MVCObject { /** * A KmlLayer adds geographic markup to the map from a KML, KMZ * or GeoRSS file that is hosted on a publicly accessible web server. A * KmlFeatureData object is provided for each feature when * clicked. * * Access by calling `const {KmlLayer} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. * @param opts Options for this layer. */ constructor(opts?: google.maps.KmlLayerOptions | null); /** * Get the default viewport for the layer being displayed. */ getDefaultViewport(): google.maps.LatLngBounds | null; /** * Get the map on which the KML Layer is being rendered. */ getMap(): google.maps.Map | null; /** * Get the metadata associated with this layer, as specified in the layer * markup. */ getMetadata(): google.maps.KmlLayerMetadata | null; /** * Get the status of the layer, set once the requested document has loaded. */ getStatus(): google.maps.KmlLayerStatus; /** * Gets the URL of the KML file being displayed. */ getUrl(): string; /** * Gets the z-index of the KML Layer. */ getZIndex(): number; /** * Renders the KML Layer on the specified map. If map is set to * null, the layer is removed. */ setMap(map: google.maps.Map | null): void; setOptions(options: google.maps.KmlLayerOptions | null): void; /** * Sets the URL of the KML file to display. */ setUrl(url: string): void; /** * Sets the z-index of the KML Layer. * @param zIndex The z-index to set. */ setZIndex(zIndex: number): void; } /** * Metadata for a single KML layer, in JSON format. */ export interface KmlLayerMetadata { /** * The layer's <atom:author>, extracted from the * layer markup. */ author: google.maps.KmlAuthor | null; /** * The layer's <description>, extracted from the * layer markup. */ description: string; /** * Whether the layer has any screen overlays. */ hasScreenOverlays: boolean; /** * The layer's <name>, extracted from the layer * markup. */ name: string; /** * The layer's <Snippet>, extracted from the layer * markup */ snippet: string; } /** * This object defines the properties that can be set on a * KmlLayer object. */ export interface KmlLayerOptions { /** * If true, the layer receives mouse events. * @defaultValue true */ clickable?: boolean | null; /** * The map on which to display the layer. */ map?: google.maps.Map | null; /** * If this option is set to true or if the map's center and * zoom were never set, the input map is centered and zoomed to the bounding * box of the contents of the layer. * @defaultValue false */ preserveViewport?: boolean | null; /** * Whether to render the screen overlays. * @defaultValue true */ screenOverlays?: boolean | null; /** * Suppress the rendering of info windows when layer features are clicked. */ suppressInfoWindows?: boolean | null; /** * The URL of the KML document to display. */ url?: string | null; /** * The z-index of the layer. */ zIndex?: number | null; } /** * The status returned by KmlLayer on the completion of loading a * document. Specify these by value, or by using the constant's name. For * example, 'OK' or google.maps.KmlLayerStatus.OK. * * Access by calling `const {KmlLayerStatus} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum KmlLayerStatus { /** * The document could not be found. Most likely it is an invalid URL, or the * document is not publicly available. */ DOCUMENT_NOT_FOUND = 'DOCUMENT_NOT_FOUND', /** * The document exceeds the file size limits of KmlLayer. */ DOCUMENT_TOO_LARGE = 'DOCUMENT_TOO_LARGE', /** * The document could not be fetched. */ FETCH_ERROR = 'FETCH_ERROR', /** * The document is not a valid KML, KMZ or GeoRSS document. */ INVALID_DOCUMENT = 'INVALID_DOCUMENT', /** * The KmlLayer is invalid. */ INVALID_REQUEST = 'INVALID_REQUEST', /** * The document exceeds the feature limits of KmlLayer. */ LIMITS_EXCEEDED = 'LIMITS_EXCEEDED', /** * The layer loaded successfully. */ OK = 'OK', /** * The document could not be loaded within a reasonable amount of time. */ TIMED_OUT = 'TIMED_OUT', /** * The document failed to load for an unknown reason. */ UNKNOWN = 'UNKNOWN', } /** * The properties of a click event on a KML/KMZ or GeoRSS document. */ export interface KmlMouseEvent { /** * A KmlFeatureData object, containing information about the * clicked feature. */ featureData: google.maps.KmlFeatureData | null; /** * The position at which to anchor an infowindow on the clicked feature. */ latLng: google.maps.LatLng | null; /** * The offset to apply to an infowindow anchored on the clicked feature. */ pixelOffset: google.maps.Size | null; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * A place that represents a point of reference for the address. */ export interface Landmark { /** * The name for the landmark. */ display_name: string; /** * The language of the name for the landmark. */ display_name_language_code: string; /** * The Place ID of the underlying establishment serving as the landmark. Can * be used to resolve more information about the landmark through Place * Details or Place Id Lookup. */ place_id: string; /** * Defines the spatial relationship between the target location and the * landmark. */ spatial_relationship: google.maps.SpatialRelationship; /** * The straight line distance between the target location and the landmark. */ straight_line_distance_meters: number; /** * The travel distance along the road network between the target location * and the landmark. This can be unpopulated if the landmark is disconnected * from the part of the road network the target is closest to OR if the * target location was not actually considered to be on the road network. */ travel_distance_meters?: number; /** * One or more values indicating the type of the returned result. Please see * Types * for more detail. */ types: string[]; } /** * A LatLng is a point in geographical coordinates: latitude and * longitude.

Although the default map projection * associates longitude with the x-coordinate of the map, and latitude with * the y-coordinate, the latitude coordinate is always written first, * followed by the longitude.
Notice that you cannot modify the * coordinates of a LatLng. If you want to compute another point, * you have to create a new one.

Most methods that accept * LatLng objects also accept a {@link google.maps.LatLngLiteral} * object, so that the following are equivalent:

 map.setCenter(new
   * google.maps.LatLng(-34, 151));
map.setCenter({lat: -34, lng: 151}); *

The constructor also accepts {@link google.maps.LatLngLiteral} * and LatLng objects. If a LatLng instance is * passed to the constructor, a copy is created.

The possible calls to the * constructor are below:

 new google.maps.LatLng(-34, 151);
new * google.maps.LatLng(-34, 151, true);
new google.maps.LatLng({lat: -34, * lng: 151});
new google.maps.LatLng({lat: -34, lng: 151}, true);
new * google.maps.LatLng(new google.maps.LatLng(-34, 151));
new * google.maps.LatLng(new google.maps.LatLng(-34, 151), true);
* * Access by calling `const {LatLng} = await * google.maps.importLibrary("core")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class LatLng { /** * A LatLng is a point in geographical coordinates: latitude * and longitude.
Although the default map projection * associates longitude with the x-coordinate of the map, and latitude with * the y-coordinate, the latitude coordinate is always written * first, followed by the longitude.
Notice that you cannot * modify the coordinates of a LatLng. If you want to compute * another point, you have to create a new one.

Most methods that * accept LatLng objects also accept a {@link * google.maps.LatLngLiteral} object, so that the following are equivalent: *

 map.setCenter(new google.maps.LatLng(-34, 151));
* map.setCenter({lat: -34, lng: 151});

The constructor also * accepts {@link google.maps.LatLngLiteral} and LatLng * objects. If a LatLng instance is passed to the constructor, * a copy is created.

The possible calls to the constructor are below: *

 new google.maps.LatLng(-34, 151);
new google.maps.LatLng(-34, * 151, true);
new google.maps.LatLng({lat: -34, lng: 151});
new * google.maps.LatLng({lat: -34, lng: 151}, true);
new * google.maps.LatLng(new google.maps.LatLng(-34, 151));
new * google.maps.LatLng(new google.maps.LatLng(-34, 151), true);
* * Access by calling `const {LatLng} = await * google.maps.importLibrary("core")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor( latOrLatLngOrLatLngLiteral: | number | google.maps.LatLngLiteral | google.maps.LatLng, lngOrNoClampNoWrap?: number | boolean | null, noClampNoWrap?: boolean, ); /** * Comparison function. */ equals(other: google.maps.LatLng | null): boolean; /** * Returns the latitude in degrees. */ lat(): number; /** * Returns the longitude in degrees. */ lng(): number; /** * Converts to JSON representation. This function is intended to be used via * JSON.stringify. */ toJSON(): google.maps.LatLngLiteral; /** * Converts to string representation. */ toString(): string; /** * Returns a string of the form "lat,lng" for this LatLng. We * round the lat/lng values to 6 decimal places by default. */ toUrlValue(precision?: number): string; } /** * A LatLngAltitude is a 3D point in geographical coordinates: * latitude, longitude, and altitude.
* * Access by calling `const {LatLngAltitude} = await * google.maps.importLibrary("core")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class LatLngAltitude implements google.maps.LatLngAltitudeLiteral, google.maps.LatLngLiteral { /** * A LatLngAltitude is a 3D point in geographical coordinates: * latitude, longitude, and altitude.
* * Access by calling `const {LatLngAltitude} = await * google.maps.importLibrary("core")`. See * https://developers.google.com/maps/documentation/javascript/libraries. * @param value The initializing value. * @param noClampNoWrap Whether to preserve the initialization values, even * if they may not necessarily be valid latitude values in the range of * [-90, 90] or valid longitude values in the range of [-180, 180]. The * default is false which enables latitude clamping and * longitude wrapping. */ constructor( value: | google.maps.LatLngAltitudeLiteral | google.maps.LatLng | google.maps.LatLngLiteral, noClampNoWrap?: boolean, ); /** * Returns the altitude. */ altitude: number; /** * Comparison function. * @param other Another LatLngAltitude object. */ equals(other: google.maps.LatLngAltitude | null): boolean; /** * Returns the latitude. */ lat: number; /** * Returns the longitude. */ lng: number; toJSON(): google.maps.LatLngAltitudeLiteral; } /** * Object literals are accepted in place of LatLngAltitude * objects, as a convenience, in many places. These are converted to * LatLngAltitude objects when the Maps API encounters them. */ export interface LatLngAltitudeLiteral extends google.maps.LatLngLiteral { /** * Distance (in meters) above the ground surface. Negative value means * underneath the ground surface. * @defaultValue 0 */ altitude: number; /** * Latitude in degrees. Values will be clamped to the range [-90, 90]. This * means that if the value specified is less than -90, it will be set to * -90. And if the value is greater than 90, it will be set to 90. */ lat: number; /** * Longitude in degrees. Values outside the range [-180, 180] will be * wrapped so that they fall within the range. For example, a value of -190 * will be converted to 170. A value of 190 will be converted to -170. This * reflects the fact that longitudes wrap around the globe. */ lng: number; } /** * A LatLngBounds instance represents * a rectangle in geographical coordinates, including one that crosses the 180 * degrees longitudinal meridian. * * Access by calling `const {LatLngBounds} = await * google.maps.importLibrary("core")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class LatLngBounds { /** * A LatLngBounds instance * represents a rectangle in geographical coordinates, including one that * crosses the 180 degrees longitudinal meridian. * * Access by calling `const {LatLngBounds} = await * google.maps.importLibrary("core")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor( swOrLatLngBounds?: | google.maps.LatLng | null | google.maps.LatLngLiteral | google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral, ne?: google.maps.LatLng | null | google.maps.LatLngLiteral, ); /** * Returns true if the given lat/lng is in this bounds. */ contains(latLng: google.maps.LatLng | google.maps.LatLngLiteral): boolean; /** * Returns true if this bounds approximately equals the given * bounds. */ equals( other: google.maps.LatLngBounds | null | google.maps.LatLngBoundsLiteral, ): boolean; /** * Extends this bounds to contain the given point. */ extend( point: google.maps.LatLng | google.maps.LatLngLiteral, ): google.maps.LatLngBounds; /** * Computes the center of this LatLngBounds */ getCenter(): google.maps.LatLng; /** * Returns the north-east corner of this bounds. */ getNorthEast(): google.maps.LatLng; /** * Returns the south-west corner of this bounds. */ getSouthWest(): google.maps.LatLng; /** * Returns true if this bounds shares any points with the other * bounds. */ intersects( other: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral, ): boolean; /** * Returns if the bounds are empty. */ isEmpty(): boolean; /** * Converts to JSON representation. This function is intended to be used via * JSON.stringify. */ toJSON(): google.maps.LatLngBoundsLiteral; /** * Converts the given map bounds to a lat/lng span. */ toSpan(): google.maps.LatLng; /** * Converts to string. */ toString(): string; /** * Returns a string of the form "lat_lo,lng_lo,lat_hi,lng_hi" for * this bounds, where "lo" corresponds to the southwest corner of * the bounding box, while "hi" corresponds to the northeast * corner of that box. */ toUrlValue(precision?: number): string; /** * Extends this bounds to contain the union of this and the given bounds. */ union( other: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral, ): google.maps.LatLngBounds; /** * LatLngBounds for the max bounds of the Earth. These bounds will encompass * the entire globe. */ static readonly MAX_BOUNDS: google.maps.LatLngBounds; } /** * Object literals are accepted in place of LatLngBounds objects * throughout the API. These are automatically converted to * LatLngBounds objects. All south, * west, north and east must be set, * otherwise an exception is thrown. */ export interface LatLngBoundsLiteral { /** * East longitude in degrees. Values outside the range [-180, 180] will be * wrapped to the range [-180, 180). For example, a value of -190 will be * converted to 170. A value of 190 will be converted to -170. This reflects * the fact that longitudes wrap around the globe. */ east: number; /** * North latitude in degrees. Values will be clamped to the range [-90, 90]. * This means that if the value specified is less than -90, it will be set * to -90. And if the value is greater than 90, it will be set to 90. */ north: number; /** * South latitude in degrees. Values will be clamped to the range [-90, 90]. * This means that if the value specified is less than -90, it will be set * to -90. And if the value is greater than 90, it will be set to 90. */ south: number; /** * West longitude in degrees. Values outside the range [-180, 180] will be * wrapped to the range [-180, 180). For example, a value of -190 will be * converted to 170. A value of 190 will be converted to -170. This reflects * the fact that longitudes wrap around the globe. */ west: number; } /** * Object literals are accepted in place of LatLng objects, as a * convenience, in many places. These are converted to LatLng * objects when the Maps API encounters them.

Examples:

   * map.setCenter({lat: -34, lng: 151});
new * google.maps.Marker({position: {lat: -34, lng: 151}, map: map});

LatLng object literals are not supported in the Geometry * library.

*/ export interface LatLngLiteral { /** * Latitude in degrees. Values will be clamped to the range [-90, 90]. This * means that if the value specified is less than -90, it will be set to * -90. And if the value is greater than 90, it will be set to 90. */ lat: number; /** * Longitude in degrees. Values outside the range [-180, 180] will be * wrapped so that they fall within the range. For example, a value of -190 * will be converted to 170. A value of 190 will be converted to -170. This * reflects the fact that longitudes wrap around the globe. */ lng: number; } /** * An elevation request sent by the ElevationService containing * the list of discrete coordinates (LatLngs) for which to return * elevation data. */ export interface LocationElevationRequest { /** * The discrete locations for which to retrieve elevations. */ locations?: (google.maps.LatLng | google.maps.LatLngLiteral)[] | null; } /** * An elevation response returned by the {@link google.maps.ElevationService} * containing the list of {@link google.maps.ElevationResult}s matching the * locations of the {@link google.maps.LocationElevationRequest}. */ export interface LocationElevationResponse { /** * The list of {@link google.maps.ElevationResult}s matching the locations * of the {@link google.maps.LocationElevationRequest}. */ results: google.maps.ElevationResult[]; } /** * Access by calling `const {MVCArray} = await * google.maps.importLibrary("core")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class MVCArray extends google.maps.MVCObject { /** * Access by calling `const {MVCArray} = await * google.maps.importLibrary("core")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(array?: T[] | null); /** * Removes all elements from the array. */ clear(): void; /** * Iterate over each element, calling the provided callback. The callback is * called for each element like: callback(element, index). */ forEach(callback: (a: T, b: number) => void): void; /** * Returns a reference to the underlying Array. Warning: if the Array is * mutated, no events will be fired by this object. */ getArray(): T[]; /** * Returns the element at the specified index. */ getAt(i: number): T; /** * Returns the number of elements in this array. */ getLength(): number; /** * Inserts an element at the specified index. */ insertAt(i: number, elem: T): void; /** * Removes the last element of the array and returns that element. */ pop(): T; /** * Adds one element to the end of the array and returns the new length of * the array. */ push(elem: T): number; /** * Removes an element from the specified index. */ removeAt(i: number): T; /** * Sets an element at the specified index. */ setAt(i: number, elem: T): void; } /** * Base class implementing KVO.

The MVCObject constructor * is guaranteed to be an empty function, and so you may inherit from * MVCObject by writing MySubclass.prototype = new * google.maps.MVCObject();. Unless otherwise noted, this is not true * of other classes in the API, and inheriting from other classes in the API * is not supported. * * Access by calling `const {MVCObject} = await * google.maps.importLibrary("core")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class MVCObject { /** * Adds the given listener function to the given event name. Returns an * identifier for this listener that can be used with * google.maps.event.removeListener. */ addListener( eventName: string, handler: Function, ): google.maps.MapsEventListener; /** * Binds a View to a Model. */ bindTo( key: string, target: google.maps.MVCObject, targetKey?: string | null, noNotify?: boolean, ): void; /** * Gets a value. */ get(key: string): any; /** * Notify all observers of a change on this property. This notifies both * objects that are bound to the object's property as well as the object * that it is bound to. */ notify(key: string): void; /** * Sets a value. */ set(key: string, value: unknown): void; /** * Sets a collection of key-value pairs. */ setValues(values?: object | null): void; /** * Removes a binding. Unbinding will set the unbound property to the current * value. The object will not be notified, as the value has not changed. */ unbind(key: string): void; /** * Removes all bindings. */ unbindAll(): void; } /** * Access by calling `const {Map} = await google.maps.importLibrary("maps")`. * See https://developers.google.com/maps/documentation/javascript/libraries. */ export class Map extends google.maps.MVCObject { /** * Access by calling `const {Map} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. * @param mapDiv The map will render to fill this element. * @param opts Options */ constructor(mapDiv: HTMLElement, opts?: google.maps.MapOptions); /** * Additional controls to attach to the map. To add a control to the map, * add the control's <div> to the * MVCArray corresponding to the ControlPosition * where it should be rendered. */ controls: google.maps.MVCArray[]; /** * An instance of Data, bound to the map. Add features to this * Data object to conveniently display them on this map. */ data: google.maps.Data; /** * Sets the viewport to contain the given bounds.
* Note: When the map is set to display: none, * the fitBounds function reads the map's size as 0x0, and * therefore does not do anything. To change the viewport while the map is * hidden, set the map to visibility: hidden, thereby ensuring * the map div has an actual size. For vector maps, this method sets the * map's tilt and heading to their default zero values. Calling this * method may cause a smooth animation as the map pans and zooms to fit the * bounds. Whether or not this method animates depends on an internal * heuristic. * @param bounds Bounds to show. * @param padding Padding in pixels. The bounds will be fit in the part of * the map that remains after padding is removed. A number value will * yield the same padding on all 4 sides. Supply 0 here to make a * fitBounds idempotent on the result of getBounds. */ fitBounds( bounds: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral, padding?: number | google.maps.Padding, ): void; /** * Returns the lat/lng bounds of the current viewport. If more than one copy * of the world is visible, the bounds range in longitude from -180 to 180 * degrees inclusive. If the map is not yet initialized or center and zoom * have not been set then the result is undefined. For vector * maps with non-zero tilt or heading, the returned lat/lng bounds * represents the smallest bounding box that includes the visible region of * the map's viewport. See {@link * google.maps.MapCanvasProjection.getVisibleRegion} for getting the exact * visible region of the map's viewport. */ getBounds(): google.maps.LatLngBounds | undefined; /** * Returns the position displayed at the center of the map. Note that * this {@link google.maps.LatLng} object is not wrapped. See * LatLng for more information. If the * center or bounds have not been set then the result is * undefined. */ getCenter(): google.maps.LatLng | undefined; /** * Returns the clickability of the map icons. A map icon represents a point * of interest, also known as a POI. If the returned value is * true, then the icons are clickable on the map. */ getClickableIcons(): boolean | undefined; /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * Returns the FeatureLayer for the specified * datasetId. Dataset IDs must be configured in the Google * Cloud Console. If the dataset ID is not associated with the map's map * style, or if Data-driven styling is not available (no map ID, no vector * tiles, no Data-Driven Styling feature layers or Datasets configured in * the Map Style), this logs an error, and the resulting * FeatureLayer.isAvailable will be false. */ getDatasetFeatureLayer(datasetId: string): google.maps.FeatureLayer; getDiv(): HTMLElement; /** * Returns the FeatureLayer of the specific * FeatureType. A FeatureLayer must be enabled in * the Google Cloud Console. If a FeatureLayer of the specified * FeatureType does not exist on this map, or if Data-driven * styling is not available (no map ID, no vector tiles, and no * FeatureLayer enabled in the map style), this logs an error, * and the resulting FeatureLayer.isAvailable will be false. */ getFeatureLayer( featureType: google.maps.FeatureType, ): google.maps.FeatureLayer; /** * Returns the compass heading of the map. The heading value is measured in * degrees (clockwise) from cardinal direction North. If the map is not yet * initialized then the result is undefined. */ getHeading(): number | undefined; /** * Returns whether heading interactions are enabled. This option is only in * effect when the map is a vector map. If not set in code, then the cloud * configuration for the map ID will be used (if available). */ getHeadingInteractionEnabled(): boolean | null; /** * Informs the caller of the current capabilities available to the map based * on the Map ID that was provided. */ getMapCapabilities(): google.maps.MapCapabilities; getMapTypeId(): string | undefined; /** * Returns the current Projection. If the map is not yet * initialized then the result is undefined. Listen to the * projection_changed event and check its value to ensure it is * not undefined. */ getProjection(): google.maps.Projection | undefined; /** * Returns the current RenderingType of the map. */ getRenderingType(): google.maps.RenderingType; /** * Returns the default StreetViewPanorama bound to the map, * which may be a default panorama embedded within the map, or the panorama * set using setStreetView(). Changes to the map's * streetViewControl will be reflected in the display of such a * bound panorama. */ getStreetView(): google.maps.StreetViewPanorama; /** * Returns the current angle of incidence of the map, in degrees from the * viewport plane to the map plane. For raster maps, the result will be * 0 for imagery taken directly overhead or 45 for * 45° imagery. This method does not return the value set by * setTilt. See setTilt for details. */ getTilt(): number | undefined; /** * Returns whether tilt interactions are enabled. This option is only in * effect when the map is a vector map. If not set in code, then the cloud * configuration for the map ID will be used (if available). */ getTiltInteractionEnabled(): boolean | null; /** * Returns the zoom of the map. If the zoom has not been set then the result * is undefined. */ getZoom(): number | undefined; /** * A registry of MapType instances by string ID. */ mapTypes: google.maps.MapTypeRegistry; /** * Immediately sets the map's camera to the target camera options, * without animation. */ moveCamera(cameraOptions: google.maps.CameraOptions): void; /** * Additional map types to overlay. Overlay map types will display on top of * the base map they are attached to, in the order in which they appear in * the overlayMapTypes array (overlays with higher index values * are displayed in front of overlays with lower index values). */ overlayMapTypes: google.maps.MVCArray; /** * Changes the center of the map by the given distance in pixels. If the * distance is less than both the width and height of the map, the * transition will be smoothly animated. Note that the map coordinate system * increases from west to east (for x values) and north to south (for y * values). * @param x Number of pixels to move the map in the x direction. * @param y Number of pixels to move the map in the y direction. */ panBy(x: number, y: number): void; /** * Changes the center of the map to the given LatLng. If the * change is less than both the width and height of the map, the transition * will be smoothly animated. * @param latLng The new center latitude/longitude of the map. */ panTo(latLng: google.maps.LatLng | google.maps.LatLngLiteral): void; /** * Pans the map by the minimum amount necessary to contain the given * LatLngBounds. It makes no guarantee where on the map the * bounds will be, except that the map will be panned to show as much of the * bounds as possible inside {currentMapSizeInPx} - {padding}. * For both raster and vector maps, the map's zoom, tilt, and heading * will not be changed. * @param latLngBounds The bounds to pan the map to. * @param padding Padding in pixels. A number value will yield the same * padding on all 4 sides. The default value is 0. */ panToBounds( latLngBounds: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral, padding?: number | google.maps.Padding, ): void; setCenter(latlng: google.maps.LatLng | google.maps.LatLngLiteral): void; /** * Controls whether the map icons are clickable or not. A map icon * represents a point of interest, also known as a POI. To disable the * clickability of map icons, pass a value of false to this * method. */ setClickableIcons(value: boolean): void; /** * Sets the compass heading for map measured in degrees from cardinal * direction North. For raster maps, this method only applies to aerial * imagery. */ setHeading(heading: number): void; /** * Sets whether heading interactions are enabled. This option is only in * effect when the map is a vector map. If not set in code, then the cloud * configuration for the map ID will be used (if available). */ setHeadingInteractionEnabled(headingInteractionEnabled: boolean): void; setMapTypeId(mapTypeId: string): void; setOptions(options: google.maps.MapOptions | null): void; /** * Sets the current RenderingType of the map. */ setRenderingType(renderingType: google.maps.RenderingType): void; /** * Binds a StreetViewPanorama to the map. This panorama * overrides the default StreetViewPanorama, allowing the map * to bind to an external panorama outside of the map. Setting the panorama * to null binds the default embedded panorama back to the map. * @param panorama The panorama to bind to the map. */ setStreetView(panorama: google.maps.StreetViewPanorama | null): void; /** * For vector maps, sets the angle of incidence of the map. The allowed * values are restricted depending on the zoom level of the map.

* For raster maps, controls the automatic switching behavior for the angle * of incidence of the map. The only allowed values are 0 and * 45. setTilt(0) causes the map to always use a * 0° overhead view regardless of the zoom level and viewport. * setTilt(45) causes the tilt angle to automatically switch to * 45 whenever 45° imagery is available for the current zoom level and * viewport, and switch back to 0 whenever 45° imagery is not available * (this is the default behavior). 45° imagery is only available for * satellite and hybrid map types, within some * locations, and at some zoom levels. Note: getTilt * returns the current tilt angle, not the value set by * setTilt. Because getTilt and * setTilt refer to different things, do not * bind() the tilt property; doing so may yield * unpredictable effects. */ setTilt(tilt: number): void; /** * Sets whether tilt interactions are enabled. This option is only in effect * when the map is a vector map. If not set in code, then the cloud * configuration for the map ID will be used (if available). */ setTiltInteractionEnabled(tiltInteractionEnabled: boolean): void; /** * Sets the zoom of the map. * @param zoom Larger zoom values correspond to a higher resolution. */ setZoom(zoom: number): void; /** * Map ID which can be used for code samples which require a Map ID. This * Map ID is not intended for use in production applications and cannot be * used for features which require cloud configuration (such as Cloud * Styling). */ static readonly DEMO_MAP_ID: string; } /** * This object is made available to the OverlayView from within * the draw method. It is not guaranteed to be initialized until draw is * called. */ export interface MapCanvasProjection { /** * Computes the geographical coordinates from pixel coordinates in the * map's container. */ fromContainerPixelToLatLng( pixel: google.maps.Point | null, noClampNoWrap?: boolean, ): google.maps.LatLng | null; /** * Computes the geographical coordinates from pixel coordinates in the div * that holds the draggable map. */ fromDivPixelToLatLng( pixel: google.maps.Point | null, noClampNoWrap?: boolean, ): google.maps.LatLng | null; /** * Computes the pixel coordinates of the given geographical location in the * map's container element. */ fromLatLngToContainerPixel( latLng: google.maps.LatLng | google.maps.LatLngLiteral, ): google.maps.Point | null; /** * Computes the pixel coordinates of the given geographical location in the * DOM element that holds the draggable map. */ fromLatLngToDivPixel( latLng: google.maps.LatLng | null | google.maps.LatLngLiteral, ): google.maps.Point | null; /** * The visible region of the map. Returns null if the map has * no size. Returns null if the OverlayView is on a * StreetViewPanorama. */ getVisibleRegion(): google.maps.VisibleRegion | null; /** * The width of the world in pixels in the current zoom level. For * projections with a heading angle of either 90 or 270 degrees, this * corresponds to the pixel span in the Y-axis. */ getWorldWidth(): number; } /** * Object containing a snapshot of what capabilities are currently available * for the Map. Note that this does not necessarily mean that relevant modules * are loaded or initialized, but rather that the current map has permission * to use these APIs. See the properties for a list of possible capabilities. */ export interface MapCapabilities { /** * If true, this map is configured properly to allow for the use of advanced * markers. Note that you must still import the marker library * in order to use advanced markers. See https://goo.gle/gmp-isAdvancedMarkersAvailable * for more information. */ isAdvancedMarkersAvailable?: boolean; /** * If true, this map is configured properly to allow for the use of * data-driven styling for at least one FeatureLayer. See https://goo.gle/gmp-data-driven-styling * and https://goo.gle/gmp-FeatureLayerIsAvailable * for more information. */ isDataDrivenStylingAvailable?: boolean; /** * If true, this map is configured properly to allow for the use of {@link * google.maps.WebGLOverlayView}. */ isWebGLOverlayViewAvailable?: boolean; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * MapElement is an HTMLElement subclass for rendering maps. * After loading the maps library, a map can be created in HTML. * For example:
<gmp-map
   * center="37.4220656,-122.0840897" zoom="10"
   * map-id="DEMO_MAP_ID">
  <button * slot="control-block-start-inline-end">Custom * Control</button>
</gmp-map>

Internally, it * uses {@link google.maps.Map}, which can be accessed with the * innerMap property. * * Access by calling `const {MapElement} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class MapElement extends HTMLElement implements google.maps.MapElementOptions { /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * MapElement is an HTMLElement subclass for rendering maps. * After loading the maps library, a map can be created in * HTML. For example:
<gmp-map
     * center="37.4220656,-122.0840897" zoom="10"
     * map-id="DEMO_MAP_ID">
  <button * slot="control-block-start-inline-end">Custom * Control</button>
</gmp-map>

Internally, * it uses {@link google.maps.Map}, which can be accessed with the * innerMap property. * * Access by calling `const {MapElement} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(options?: google.maps.MapElementOptions); /** * The center latitude/longitude of the map. */ center: google.maps.LatLng | google.maps.LatLngLiteral | null; /** * Whether the map should allow user control of the camera heading * (rotation). This option is only in effect when the map is a vector map. * If not set in code, then the cloud configuration for the map ID will be * used (if available). * @defaultValue false */ headingInteractionDisabled: boolean | null; /** * A reference to the {@link google.maps.Map} that the MapElement uses * internally. */ innerMap: google.maps.Map; /** * The Map * ID of the map. This parameter cannot be set or changed after a map is * instantiated. {@link google.maps.Map.DEMO_MAP_ID} can be used to try out * features that require a map ID but which do not require cloud enablement. */ mapId: string | null; /** * Whether the map should be a raster or vector map. This parameter cannot * be set or changed after a map is instantiated. If not set, then the cloud * configuration for the map ID will determine the rendering type (if * available). Please note that vector maps may not be available for all * devices and browsers and the map will fall back to a raster map as * needed. * @defaultValue {@link google.maps.RenderingType.VECTOR} */ renderingType: google.maps.RenderingType | null; /** * Whether the map should allow user control of the camera tilt. This option * is only in effect when the map is a vector map. If not set in code, then * the cloud configuration for the map ID will be used (if available). * @defaultValue false */ tiltInteractionDisabled: boolean | null; /** * The zoom level of the map. Valid zoom values are numbers from zero up to * the supported maximum * zoom level. Larger zoom values correspond to a higher resolution. */ zoom: number | null; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * MapElementOptions object used to define the properties that can be set on a * MapElement. */ export interface MapElementOptions { /** * See {@link google.maps.MapElement.center}. */ center?: google.maps.LatLng | google.maps.LatLngLiteral | null; /** * See {@link google.maps.MapElement.headingInteractionDisabled}. */ headingInteractionDisabled?: boolean | null; /** * See {@link google.maps.MapElement.mapId}. */ mapId?: string | null; /** * See {@link google.maps.MapElement.renderingType}. */ renderingType?: google.maps.RenderingType | null; /** * See {@link google.maps.MapElement.tiltInteractionDisabled}. */ tiltInteractionDisabled?: boolean | null; /** * See {@link google.maps.MapElement.zoom}. */ zoom?: number | null; } /** * This object is returned from various mouse events on the map and overlays, * and contains all the fields shown below. */ export interface MapMouseEvent { /** * The corresponding native DOM event. Developers should not rely on * target, currentTarget, * relatedTarget and path properties being defined * and consistent. Developers should not also rely on the DOM structure of * the internal implementation of the Maps API. Due to internal event * mapping, the domEvent may have different semantics from * the {@link google.maps.MapMouseEvent} (e.g. a {@link * google.maps.MapMouseEvent} "click" may have a * domEvent of type KeyboardEvent). */ domEvent: MouseEvent | TouchEvent | PointerEvent | KeyboardEvent | Event; /** * The latitude/longitude that was below the cursor when the event occurred. */ latLng: google.maps.LatLng | null; /** * Prevents this event from propagating further. */ stop(): void; } /** * MapOptions object used to define the properties that can be set on a Map. */ export interface MapOptions { /** * Color used for the background of the Map div. This color will be visible * when tiles have not yet loaded as the user pans. This option can only be * set when the map is initialized. */ backgroundColor?: string | null; /** * The enabled/disabled state of the Camera control. */ cameraControl?: boolean | null; /** * The display options for the Camera control. */ cameraControlOptions?: google.maps.CameraControlOptions | null; /** * The initial Map center. */ center?: google.maps.LatLng | null | google.maps.LatLngLiteral; /** * When false, map icons are not clickable. A map icon * represents a point of interest, also known as a POI. * @defaultValue true */ clickableIcons?: boolean | null; /** * The initial Map color scheme. This option can only be set when the map is * initialized. * @defaultValue {@link google.maps.ColorScheme.LIGHT} */ colorScheme?: string | null; /** * Size in pixels of the controls appearing on the map. This value must be * supplied directly when creating the Map, updating this value later may * bring the controls into an undefined state. Only governs the * controls made by the Maps API itself. Does not scale developer created * custom controls. */ controlSize?: number | null; /** * Enables/disables all default UI buttons. May be overridden individually. * Does not disable the keyboard controls, which are separately controlled * by the {@link google.maps.MapOptions.keyboardShortcuts} option. Does not * disable gesture controls, which are separately controlled by the {@link * google.maps.MapOptions.gestureHandling} option. */ disableDefaultUI?: boolean | null; /** * Enables/disables zoom and center on double click. Enabled by default. *

Note: This property is not * recommended. To disable zooming on double click, you can use the * gestureHandling property, and set it to "none". */ disableDoubleClickZoom?: boolean | null; /** * If false, prevents the map from being dragged. Dragging is * enabled by default. * @deprecated Deprecated in 2017. To disable dragging on the map, you can * use the gestureHandling property, and set it to * "none". */ draggable?: boolean | null; /** * The name or url of the cursor to display when mousing over a draggable * map. This property uses the css cursor attribute to change * the icon. As with the css property, you must specify at least one * fallback cursor that is not a URL. For example: draggableCursor: * 'url(http://www.example.com/icon.png), * auto;'. */ draggableCursor?: string | null; /** * The name or url of the cursor to display when the map is being dragged. * This property uses the css cursor attribute to change the * icon. As with the css property, you must specify at least one fallback * cursor that is not a URL. For example: draggingCursor: 'url(http://www.example.com/icon.png), * auto;'. */ draggingCursor?: string | null; /** * The enabled/disabled state of the Fullscreen control. */ fullscreenControl?: boolean | null; /** * The display options for the Fullscreen control. */ fullscreenControlOptions?: google.maps.FullscreenControlOptions | null; /** * This setting controls how the API handles gestures on the map. Allowed * values:

  • "cooperative": Scroll events and * one-finger touch gestures scroll the page, and do not zoom or pan the * map. Two-finger touch gestures pan and zoom the map. Scroll events with a * ctrl key or ⌘ key pressed zoom the map.
    In this mode the map * cooperates with the page.
  • "greedy": All touch * gestures and scroll events pan or zoom the map.
  • "none": * The map cannot be panned or zoomed by user gestures.
  • * "auto": (default) Gesture handling is either cooperative or * greedy, depending on whether the page is scrollable or in an iframe. *
*/ gestureHandling?: string | null; /** * The heading for aerial imagery in degrees measured clockwise from * cardinal direction North. Headings are snapped to the nearest available * angle for which imagery is available. */ heading?: number | null; /** * Whether the map should allow user control of the camera heading * (rotation). This option is only in effect when the map is a vector map. * If not set in code, then the cloud configuration for the map ID will be * used (if available). * @defaultValue false */ headingInteractionEnabled?: boolean | null; /** * Whether the map should allow fractional zoom levels. Listen to * isfractionalzoomenabled_changed to know when the default has * been set. * @defaultValue true for vector maps and false * for raster maps */ isFractionalZoomEnabled?: boolean | null; /** * If false, prevents the map from being controlled by the * keyboard. Keyboard shortcuts are enabled by default. */ keyboardShortcuts?: boolean | null; /** * The Map * ID of the map. This parameter cannot be set or changed after a map is * instantiated. {@link google.maps.Map.DEMO_MAP_ID} can be used to try out * features that require a map ID but which do not require cloud enablement. */ mapId?: string | null; /** * The initial enabled/disabled state of the Map type control. */ mapTypeControl?: boolean | null; /** * The initial display options for the Map type control. */ mapTypeControlOptions?: google.maps.MapTypeControlOptions | null; /** * The initial Map mapTypeId. Defaults to ROADMAP. */ mapTypeId?: string | null; /** * The maximum zoom level which will be displayed on the map. If omitted, or * set to null, the maximum zoom from the current map type is * used instead. Valid zoom values are numbers from zero up to the supported * maximum * zoom level. */ maxZoom?: number | null; /** * The minimum zoom level which will be displayed on the map. If omitted, or * set to null, the minimum zoom from the current map type is * used instead. Valid zoom values are numbers from zero up to the supported * maximum * zoom level. */ minZoom?: number | null; /** * If true, do not clear the contents of the Map div. */ noClear?: boolean | null; /** * The enabled/disabled state of the Pan control.

* @deprecated The Pan control is deprecated as of September 2015. */ panControl?: boolean | null; /** * The display options for the Pan control.

* @deprecated The Pan control is deprecated as of September 2015. */ panControlOptions?: google.maps.PanControlOptions | null; /** * Whether the map should be a raster or vector map. This parameter cannot * be set or changed after a map is instantiated. If not set, then the cloud * configuration for the map ID will determine the rendering type (if * available). Please note that vector maps may not be available for all * devices and browsers and the map will fall back to a raster map as * needed. * @defaultValue {@link google.maps.RenderingType.RASTER} */ renderingType?: google.maps.RenderingType | null; /** * Defines a boundary that restricts the area of the map accessible to * users. When set, a user can only pan and zoom while the camera view stays * inside the limits of the boundary. */ restriction?: google.maps.MapRestriction | null; /** * The enabled/disabled state of the Rotate control. */ rotateControl?: boolean | null; /** * The display options for the Rotate control. */ rotateControlOptions?: google.maps.RotateControlOptions | null; /** * The initial enabled/disabled state of the Scale control. */ scaleControl?: boolean | null; /** * The initial display options for the Scale control. */ scaleControlOptions?: google.maps.ScaleControlOptions | null; /** * If false, disables zooming on the map using a mouse scroll * wheel. The scrollwheel is enabled by default.

Note: * This property is not recommended. To disable zooming * using scrollwheel, you can use the gestureHandling property, * and set it to either "cooperative" or "none". */ scrollwheel?: boolean | null; /** * A StreetViewPanorama to display when the Street View pegman * is dropped on the map. If no panorama is specified, a default * StreetViewPanorama will be displayed in the map's * div when the pegman is dropped. */ streetView?: google.maps.StreetViewPanorama | null; /** * The initial enabled/disabled state of the Street View Pegman control. * This control is part of the default UI, and should be set to * false when displaying a map type on which the Street View * road overlay should not appear (e.g. a non-Earth map type). */ streetViewControl?: boolean | null; /** * The initial display options for the Street View Pegman control. */ streetViewControlOptions?: google.maps.StreetViewControlOptions | null; /** * Styles to apply to each of the default map types. Note that for * satellite/hybrid and terrain * modes, these styles will only apply to labels and geometry. This feature * is not available when using a map ID, or when using vector maps (use cloud-based * maps styling instead). */ styles?: google.maps.MapTypeStyle[] | null; /** * For vector maps, sets the angle of incidence of the map. The allowed * values are restricted depending on the zoom level of the map. For raster * maps, controls the automatic switching behavior for the angle of * incidence of the map. The only allowed values are 0 and * 45. The value 0 causes the map to always use a * 0° overhead view regardless of the zoom level and viewport. The value * 45 causes the tilt angle to automatically switch to 45 * whenever 45° imagery is available for the current zoom level and * viewport, and switch back to 0 whenever 45° imagery is not available * (this is the default behavior). 45° imagery is only available for * satellite and hybrid map types, within some * locations, and at some zoom levels. Note: getTilt * returns the current tilt angle, not the value specified by this option. * Because getTilt and this option refer to different things, * do not bind() the tilt property; doing so may * yield unpredictable effects. */ tilt?: number | null; /** * Whether the map should allow user control of the camera tilt. This option * is only in effect when the map is a vector map. If not set in code, then * the cloud configuration for the map ID will be used (if available). * @defaultValue false */ tiltInteractionEnabled?: boolean | null; /** * The initial Map zoom level. Valid zoom values are numbers from zero up to * the supported maximum * zoom level. Larger zoom values correspond to a higher resolution. */ zoom?: number | null; /** * The enabled/disabled state of the Zoom control. */ zoomControl?: boolean | null; /** * The display options for the Zoom control. */ zoomControlOptions?: google.maps.ZoomControlOptions | null; } export interface MapPanes { /** * This pane contains the info window. It is above all map overlays. (Pane * 4). */ floatPane: Element; /** * This pane is the lowest pane and is above the tiles. It does not receive * DOM events. (Pane 0). */ mapPane: Element; /** * This pane contains markers. It does not receive DOM events. (Pane 2). */ markerLayer: Element; /** * This pane contains polylines, polygons, ground overlays and tile layer * overlays. It does not receive DOM events. (Pane 1). */ overlayLayer: Element; /** * This pane contains elements that receive DOM events. (Pane 3). */ overlayMouseTarget: Element; } /** * A restriction that can be applied to the Map. The map's viewport will * not exceed these restrictions. */ export interface MapRestriction { /** * When set, a user can only pan and zoom inside the given bounds. Bounds * can restrict both longitude and latitude, or can restrict latitude only. * For latitude-only bounds use west and east longitudes of -180 and 180, * respectively, for example, latLngBounds: {north: northLat, south: * southLat, west: -180, east: 180}. */ latLngBounds: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral; /** * Bounds can be made more restrictive by setting the * strictBounds flag to true. This reduces how far * a user can zoom out, ensuring that everything outside of the restricted * bounds stays hidden. The default is false, meaning that a * user can zoom out until the entire bounded area is in view, possibly * including areas outside the bounded area. */ strictBounds?: boolean; } /** * This interface defines the map type, and is typically used for custom map * types. Immutable. */ export interface MapType { /** * Alt text to display when this MapType's button is hovered over in the * MapTypeControl. Optional. */ alt: string | null; /** * Returns a tile for the given tile coordinate (x, y) and zoom level. This * tile will be appended to the given ownerDocument. Not available for base * map types. * @param tileCoord Tile coordinates. * @param zoom Tile zoom. * @param ownerDocument The document which owns this tile. */ getTile( tileCoord: google.maps.Point | null, zoom: number, ownerDocument: Document | null, ): Element | null; /** * The maximum zoom level for the map when displaying this MapType. Required * for base MapTypes, ignored for overlay MapTypes. */ maxZoom: number; /** * The minimum zoom level for the map when displaying this MapType. * Optional; defaults to 0. */ minZoom: number; /** * Name to display in the MapTypeControl. Optional. */ name: string | null; /** * The Projection used to render this MapType. Optional; defaults to * Mercator. */ projection: google.maps.Projection | null; /** * Radius of the planet for the map, in meters. Optional; defaults to * Earth's equatorial radius of 6378137 meters. */ radius: number; /** * Releases the given tile, performing any necessary cleanup. The provided * tile will have already been removed from the document. Optional. * @param tile Tile to release. */ releaseTile(tile: Element | null): void; /** * The dimensions of each tile. Required. */ tileSize: google.maps.Size | null; } /** * Options for the rendering of the map type control. */ export interface MapTypeControlOptions { /** * IDs of map types to show in the control. */ mapTypeIds?: string[] | null; /** * Position id. Used to specify the position of the control on the map. * @defaultValue {@link * google.maps.ControlPosition.BLOCK_START_INLINE_START} */ position?: google.maps.ControlPosition | null; /** * Style id. Used to select what style of map type control to display. */ style?: google.maps.MapTypeControlStyle | null; } /** * Identifiers for common MapTypesControls. * * Access by calling `const {MapTypeControlStyle} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum MapTypeControlStyle { /** * Uses the default map type control. When the DEFAULT control * is shown, it will vary according to window size and other factors. The * DEFAULT control may change in future versions of the API. */ DEFAULT = 0.0, /** * A dropdown menu for the screen realestate conscious. */ DROPDOWN_MENU = 1.0, /** * The standard horizontal radio buttons bar. */ HORIZONTAL_BAR = 2.0, } /** * Identifiers for common MapTypes. Specify these by value, or by using the * constant's name. For example, 'satellite' or * google.maps.MapTypeId.SATELLITE. * * Access by calling `const {MapTypeId} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum MapTypeId { /** * This map type displays a transparent layer of major streets on satellite * images. */ HYBRID = 'hybrid', /** * This map type displays a normal street map. */ ROADMAP = 'roadmap', /** * This map type displays satellite images. */ SATELLITE = 'satellite', /** * This map type displays maps with physical features such as terrain and * vegetation. */ TERRAIN = 'terrain', } /** * A registry for MapType instances, keyed by MapType id. * * Access by calling `const {MapTypeRegistry} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class MapTypeRegistry extends google.maps.MVCObject { /** * Sets the registry to associate the passed string identifier with the * passed MapType. * @param id Identifier of the MapType to add to the registry. * @param mapType MapType object to add to the registry. */ set(id: string, mapType: any): void; } /** * The MapTypeStyle is a collection of selectors and stylers that * define how the map should be styled. Selectors specify the map features * and/or elements that should be affected, and stylers specify how those * features and elements should be modified. For details, see the style * reference. */ export interface MapTypeStyle { /** * The element to which a styler should be applied. An element is a visual * aspect of a feature on the map. Example: a label, an icon, the stroke or * fill applied to the geometry, and more. Optional. If * elementType is not specified, the value is assumed to be * 'all'. For details of usage and allowed values, see the style * reference. */ elementType?: string | null; /** * The feature, or group of features, to which a styler should be applied. * Optional. If featureType is not specified, the value is * assumed to be 'all'. For details of usage and allowed * values, see the style * reference. */ featureType?: string | null; /** * The style rules to apply to the selected map features and elements. The * rules are applied in the order that you specify in this array. For * guidelines on usage and allowed values, see the style * reference. */ stylers: object[]; } /** * Available only in the v=alpha channel: https://goo.gle/js-alpha-channel. */ export interface Maps3DLibrary { AltitudeMode: typeof google.maps.maps3d.AltitudeMode; CenterChangeEvent: typeof google.maps.maps3d.CenterChangeEvent; HeadingChangeEvent: typeof google.maps.maps3d.HeadingChangeEvent; LocationClickEvent: typeof google.maps.maps3d.LocationClickEvent; Map3DElement: typeof google.maps.maps3d.Map3DElement; Polygon3DElement: typeof google.maps.maps3d.Polygon3DElement; Polyline3DElement: typeof google.maps.maps3d.Polyline3DElement; RangeChangeEvent: typeof google.maps.maps3d.RangeChangeEvent; RollChangeEvent: typeof google.maps.maps3d.RollChangeEvent; SteadyChangeEvent: typeof google.maps.maps3d.SteadyChangeEvent; TiltChangeEvent: typeof google.maps.maps3d.TiltChangeEvent; } /** * An event listener, created by google.maps.event.addListener() and friends. */ export interface MapsEventListener { /** * Removes the listener.

Calling listener.remove() is * equivalent to google.maps.event.removeListener(listener). */ remove(): void; } export interface MapsLibrary { BicyclingLayer: typeof google.maps.BicyclingLayer; Circle: typeof google.maps.Circle; Data: typeof google.maps.Data; FeatureType: typeof google.maps.FeatureType; GroundOverlay: typeof google.maps.GroundOverlay; ImageMapType: typeof google.maps.ImageMapType; InfoWindow: typeof google.maps.InfoWindow; KmlLayer: typeof google.maps.KmlLayer; KmlLayerStatus: typeof google.maps.KmlLayerStatus; Map: typeof google.maps.Map; MapTypeControlStyle: typeof google.maps.MapTypeControlStyle; MapTypeId: typeof google.maps.MapTypeId; MapTypeRegistry: typeof google.maps.MapTypeRegistry; MaxZoomService: typeof google.maps.MaxZoomService; MaxZoomStatus: typeof google.maps.MaxZoomStatus; OverlayView: typeof google.maps.OverlayView; Polygon: typeof google.maps.Polygon; Polyline: typeof google.maps.Polyline; Rectangle: typeof google.maps.Rectangle; RenderingType: typeof google.maps.RenderingType; StrokePosition: typeof google.maps.StrokePosition; StyledMapType: typeof google.maps.StyledMapType; TrafficLayer: typeof google.maps.TrafficLayer; TransitLayer: typeof google.maps.TransitLayer; WebGLOverlayView: typeof google.maps.WebGLOverlayView; ZoomChangeEvent: typeof google.maps.ZoomChangeEvent; } /** * Base class for managing network errors in Maps. * * Access by calling `const {MapsNetworkError} = await * google.maps.importLibrary("core")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class MapsNetworkError extends Error { /** * Base class for managing network errors in Maps. * * Access by calling `const {MapsNetworkError} = await * google.maps.importLibrary("core")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(); /** * Identifies the type of error produced by the API. */ code: | google.maps.DirectionsStatus | google.maps.DistanceMatrixStatus | google.maps.ElevationStatus | google.maps.GeocoderStatus | google.maps.MaxZoomStatus | google.maps.places.PlacesServiceStatus | google.maps.StreetViewStatus; /** * Represents the network service that responded with the error. */ endpoint: google.maps.MapsNetworkErrorEndpoint; } /** * Identifiers for API endpoints used by {@link google.maps.MapsNetworkError} * instances. * * Access by calling `const {MapsNetworkErrorEndpoint} = await * google.maps.importLibrary("core")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum MapsNetworkErrorEndpoint { /** * Identifies the Routes API within the Directions API. */ DIRECTIONS_ROUTE = 'DIRECTIONS_ROUTE', /** * Identifies the DistanceMatrix API. */ DISTANCE_MATRIX = 'DISTANCE_MATRIX', /** * Identifies the getElevationsAlongPath API within the Elevation API. */ ELEVATION_ALONG_PATH = 'ELEVATION_ALONG_PATH', /** * Identifies the getElevationForLocations API within the Elevation API. */ ELEVATION_LOCATIONS = 'ELEVATION_LOCATIONS', /** * Identifies the Get DeliveryVehicle API within Fleet Engine. */ FLEET_ENGINE_GET_DELIVERY_VEHICLE = 'FLEET_ENGINE_GET_DELIVERY_VEHICLE', /** * Identifies the Get Trip API within Fleet Engine. */ FLEET_ENGINE_GET_TRIP = 'FLEET_ENGINE_GET_TRIP', /** * Identifies the Get Vehicle API within Fleet Engine. */ FLEET_ENGINE_GET_VEHICLE = 'FLEET_ENGINE_GET_VEHICLE', /** * Identifies the List DeliveryVehicles API within Fleet Engine. */ FLEET_ENGINE_LIST_DELIVERY_VEHICLES = 'FLEET_ENGINE_LIST_DELIVERY_VEHICLES', /** * Identifies the List Tasks API within Fleet Engine. */ FLEET_ENGINE_LIST_TASKS = 'FLEET_ENGINE_LIST_TASKS', /** * Identifies the List Vehicles API within Fleet Engine. */ FLEET_ENGINE_LIST_VEHICLES = 'FLEET_ENGINE_LIST_VEHICLES', /** * Identifies the Search Tasks API within Fleet Engine. */ FLEET_ENGINE_SEARCH_TASKS = 'FLEET_ENGINE_SEARCH_TASKS', /** * Identifies the geocode API within the Geocoder. */ GEOCODER_GEOCODE = 'GEOCODER_GEOCODE', /** * Identifies the MaximumZoomImageryService API within the Maps API. */ MAPS_MAX_ZOOM = 'MAPS_MAX_ZOOM', /** * Identifies the Autocomplete API within the Places API. */ PLACES_AUTOCOMPLETE = 'PLACES_AUTOCOMPLETE', /** * Identifies the Details API within the Places API. */ PLACES_DETAILS = 'PLACES_DETAILS', /** * Identifies the findPlaceFromPhoneNumber API within the Places API. */ PLACES_FIND_PLACE_FROM_PHONE_NUMBER = 'PLACES_FIND_PLACE_FROM_PHONE_NUMBER', /** * Identifies the findPlaceFromQuery API within the Places API. */ PLACES_FIND_PLACE_FROM_QUERY = 'PLACES_FIND_PLACE_FROM_QUERY', /** * Identifies the Gateway API within the Places API. */ PLACES_GATEWAY = 'PLACES_GATEWAY', /** * Identifies the Get Place API within the Places API. */ PLACES_GET_PLACE = 'PLACES_GET_PLACE', /** * Identifies the LocalContextSearch API within the Places API. */ PLACES_LOCAL_CONTEXT_SEARCH = 'PLACES_LOCAL_CONTEXT_SEARCH', /** * Identifies the NearbySearch API within the Places API. */ PLACES_NEARBY_SEARCH = 'PLACES_NEARBY_SEARCH', /** * Identifies the Search Text API within the Places API. */ PLACES_SEARCH_TEXT = 'PLACES_SEARCH_TEXT', /** * Identifies the getPanorama method within the Streetview service. */ STREETVIEW_GET_PANORAMA = 'STREETVIEW_GET_PANORAMA', } /** * Represents a request error from a web service (i.e. the equivalent of a 4xx * code in HTTP). * * Access by calling `const {MapsRequestError} = await * google.maps.importLibrary("core")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class MapsRequestError extends google.maps.MapsNetworkError { /** * Represents a request error from a web service (i.e. the equivalent of a * 4xx code in HTTP). * * Access by calling `const {MapsRequestError} = await * google.maps.importLibrary("core")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(); } /** * Represents a server-side error from a web service (i.e. the equivalent of a * 5xx code in HTTP). * * Access by calling `const {MapsServerError} = await * google.maps.importLibrary("core")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class MapsServerError extends google.maps.MapsNetworkError { /** * Represents a server-side error from a web service (i.e. the equivalent of * a 5xx code in HTTP). * * Access by calling `const {MapsServerError} = await * google.maps.importLibrary("core")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(); } /** * Access by calling `const {Marker} = await * google.maps.importLibrary("marker")`. See * https://developers.google.com/maps/documentation/javascript/libraries. * @deprecated As of February 21st, 2024, google.maps.Marker is deprecated. * Please use {@link google.maps.marker.AdvancedMarkerElement} instead. At * this time, google.maps.Marker is not scheduled to be discontinued, * but {@link google.maps.marker.AdvancedMarkerElement} is recommended * over google.maps.Marker. While google.maps.Marker will continue to * receive bug fixes for any major regressions, existing bugs in * google.maps.Marker will not be addressed. At least 12 months notice * will be given before support is discontinued. Please see https://developers.google.com/maps/deprecations * for additional details and https://developers.google.com/maps/documentation/javascript/advanced-markers/migration * for the migration guide. */ export class Marker extends google.maps.MVCObject { /** * Access by calling `const {Marker} = await * google.maps.importLibrary("marker")`. See * https://developers.google.com/maps/documentation/javascript/libraries. * @param opts Named optional arguments * @deprecated As of February 21st, 2024, google.maps.Marker is deprecated. * Please use {@link google.maps.marker.AdvancedMarkerElement} instead. * At this time, google.maps.Marker is not scheduled to be discontinued, * but {@link google.maps.marker.AdvancedMarkerElement} is recommended * over google.maps.Marker. While google.maps.Marker will continue to * receive bug fixes for any major regressions, existing bugs in * google.maps.Marker will not be addressed. At least 12 months notice * will be given before support is discontinued. Please see https://developers.google.com/maps/deprecations * for additional details and https://developers.google.com/maps/documentation/javascript/advanced-markers/migration * for the migration guide. */ constructor(opts?: google.maps.MarkerOptions | null); /** * Get the currently running animation. */ getAnimation(): google.maps.Animation | null | undefined; /** * Get the clickable status of the {@link google.maps.Marker}. */ getClickable(): boolean; /** * Get the mouse cursor type shown on hover. */ getCursor(): string | null | undefined; /** * Get the draggable status of the {@link google.maps.Marker}. */ getDraggable(): boolean; /** * Get the icon of the {@link google.maps.Marker}. See {@link * google.maps.MarkerOptions.icon}. */ getIcon(): | string | google.maps.Icon | null | google.maps.Symbol | undefined; /** * Get the label of the {@link google.maps.Marker}. See {@link * google.maps.MarkerOptions.label}. */ getLabel(): google.maps.MarkerLabel | null | string | undefined; /** * Get the map or panaroama the {@link google.maps.Marker} is rendered on. */ getMap(): google.maps.Map | null | google.maps.StreetViewPanorama; /** * Get the opacity of the {@link google.maps.Marker}. */ getOpacity(): number | null | undefined; /** * Get the position of the {@link google.maps.Marker}. */ getPosition(): google.maps.LatLng | null | undefined; /** * Get the shape of the {@link google.maps.Marker} used for interaction. * See {@link google.maps.MarkerOptions.shape} and {@link * google.maps.MarkerShape}. */ getShape(): google.maps.MarkerShape | null | undefined; /** * Get the title of the {@link google.maps.Marker} tooltip. See {@link * google.maps.MarkerOptions.title}. */ getTitle(): string | null | undefined; /** * Get the visibility of the {@link google.maps.Marker}. */ getVisible(): boolean; /** * Get the zIndex of the {@link google.maps.Marker}. See {@link * google.maps.MarkerOptions.zIndex}. */ getZIndex(): number | null | undefined; /** * Start an animation. Any ongoing animation will be cancelled. Currently * supported animations are: {@link google.maps.Animation.BOUNCE}, {@link * google.maps.Animation.DROP}. Passing in null will cause any * animation to stop. * @param animation The animation to play. */ setAnimation(animation?: google.maps.Animation | null): void; /** * Set if the {@link google.maps.Marker} is clickable. * @param flag If true, the Marker can be clicked. */ setClickable(flag: boolean): void; /** * Set the mouse cursor type shown on hover. * @param cursor Mouse cursor type. */ setCursor(cursor?: string | null): void; /** * Set if the {@link google.maps.Marker} is draggable. * @param flag If true, the Marker can be dragged. */ setDraggable(flag: boolean | null): void; /** * Set the icon for the {@link google.maps.Marker}. See {@link * google.maps.MarkerOptions.icon}. */ setIcon(icon?: string | google.maps.Icon | null | google.maps.Symbol): void; /** * Set the label for the {@link google.maps.Marker}. See {@link * google.maps.MarkerOptions.label}. * @param label The label can either be a character string or a {@link * google.maps.MarkerLabel} object. */ setLabel(label?: string | google.maps.MarkerLabel | null): void; /** * Renders the {@link google.maps.Marker} on the specified map or panorama. * If map is set to null, the marker will be removed. */ setMap(map: google.maps.Map | null | google.maps.StreetViewPanorama): void; /** * Set the opacity of the {@link google.maps.Marker}. * @param opacity A number between 0.0, transparent, and 1.0, opaque. */ setOpacity(opacity?: number | null): void; /** * Set the options for the {@link google.maps.Marker}. */ setOptions(options: google.maps.MarkerOptions | null): void; /** * Set the postition for the {@link google.maps.Marker}. * @param latlng The new position. */ setPosition( latlng?: google.maps.LatLng | null | google.maps.LatLngLiteral, ): void; /** * Set the shape of the {@link google.maps.Marker} used for interaction. * See {@link google.maps.MarkerOptions.shape} and {@link * google.maps.MarkerShape}. */ setShape(shape?: google.maps.MarkerShape | null): void; /** * Set the title of the {@link google.maps.Marker} tooltip. See {@link * google.maps.MarkerOptions.title}. */ setTitle(title?: string | null): void; /** * Set if the {@link google.maps.Marker} is visible. * @param visible If true, the Marker is visible */ setVisible(visible: boolean): void; /** * Set the zIndex of the {@link google.maps.Marker}. See {@link * google.maps.MarkerOptions.zIndex}. */ setZIndex(zIndex?: number | null): void; /** * The maximum default z-index that the API will assign to a marker. You may * set a higher z-index to bring a marker to the front. */ static readonly MAX_ZINDEX: number; } /** * These options specify the appearance of a marker label. A marker label is a * string (often a single character) which will appear inside the marker. If * you are using it with a custom marker, you can reposition it with the * labelOrigin property in the Icon class. */ export interface MarkerLabel { /** * The className property of the label's element (equivalent to the * element's class attribute). Multiple space-separated CSS classes can * be added. The font color, size, weight, and family can only be set via * the other properties of MarkerLabel. CSS classes should not * be used to change the position nor orientation of the label (e.g. using * translations and rotations) if also using marker * collision management. * @defaultValue '' (empty string) */ className?: string; /** * The color of the label text. * @defaultValue 'black' */ color?: string; /** * The font family of the label text (equivalent to the CSS font-family * property). */ fontFamily?: string; /** * The font size of the label text (equivalent to the CSS font-size * property). * @defaultValue '14px' */ fontSize?: string; /** * The font weight of the label text (equivalent to the CSS font-weight * property). */ fontWeight?: string; /** * The text to be displayed in the label. */ text: string; } export interface MarkerLibrary { AdvancedMarkerClickEvent: typeof google.maps.marker.AdvancedMarkerClickEvent; AdvancedMarkerElement: typeof google.maps.marker.AdvancedMarkerElement; Animation: typeof google.maps.Animation; CollisionBehavior: typeof google.maps.CollisionBehavior; Marker: typeof google.maps.Marker; PinElement: typeof google.maps.marker.PinElement; } /** * MarkerOptions object used to define the properties that can be set on a * Marker. * @deprecated As of February 21st, 2024, google.maps.Marker is deprecated. * Please use google.maps.marker.AdvancedMarkerElement instead. Please see * https://developers.google.com/maps/deprecations * for deprecation details and https://developers.google.com/maps/documentation/javascript/advanced-markers/migration * for the migration guide. */ export interface MarkerOptions { /** * The offset from the marker's position to the tip of an InfoWindow * that has been opened with the marker as anchor. */ anchorPoint?: google.maps.Point | null; /** * Which animation to play when marker is added to a map. * @defaultValue null */ animation?: google.maps.Animation | null; /** * If true, the marker receives mouse and touch events. * @defaultValue true */ clickable?: boolean | null; /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * Set a collision behavior for markers on vector maps. * @defaultValue null * @deprecated collisionBehavior is deprecated as of July 2023. * Use {@link * google.maps.marker.AdvancedMarkerElement.collisionBehavior} instead. */ collisionBehavior?: string | null; /** * If false, disables cross that appears beneath the marker * when dragging. * @defaultValue true */ crossOnDrag?: boolean | null; /** * Mouse cursor type to show on hover. * @defaultValue pointer */ cursor?: string | null; /** * If true, the marker can be dragged. * @defaultValue false */ draggable?: boolean | null; /** * Icon for the foreground. If a string is provided, it is treated as though * it were an Icon with the string as url. */ icon?: string | google.maps.Icon | null | google.maps.Symbol; /** * Adds a label to the marker. A marker label is a letter or number that * appears inside a marker. The label can either be a string, or a * MarkerLabel object. If provided and {@link * google.maps.MarkerOptions.title} is not provided, an accessibility text * (e.g. for use with screen readers) will be added to the marker with the * provided label's text. Please note that the label is * currently only used for accessibility text for non-optimized markers. * @defaultValue null */ label?: string | google.maps.MarkerLabel | null; /** * Map on which to display Marker. The map is required to display the marker * and can be provided with {@link google.maps.Marker.setMap} if not * provided at marker construction. */ map?: google.maps.Map | null | google.maps.StreetViewPanorama; /** * A number between 0.0, transparent, and 1.0, opaque. * @defaultValue 1.0 */ opacity?: number | null; /** * Optimization enhances performance by rendering many markers as a single * static element. This is useful in cases where a large number of markers * is required. Read more about marker * optimization. */ optimized?: boolean | null; /** * Sets the marker position. A marker may be constructed but not displayed * until its position is provided - for example, by a user's actions or * choices. A marker position can be provided with {@link * google.maps.Marker.setPosition} if not provided at marker construction. */ position?: google.maps.LatLng | null | google.maps.LatLngLiteral; /** * Image map region definition used for drag/click. */ shape?: google.maps.MarkerShape | null; /** * Rollover text. If provided, an accessibility text (e.g. for use with * screen readers) will be added to the marker with the provided value. * Please note that the title is currently only used for * accessibility text for non-optimized markers. * @defaultValue undefined */ title?: string | null; /** * If true, the marker is visible. * @defaultValue true */ visible?: boolean | null; /** * All markers are displayed on the map in order of their zIndex, with * higher values displaying in front of markers with lower values. By * default, markers are displayed according to their vertical position on * screen, with lower markers appearing in front of markers further up the * screen. */ zIndex?: number | null; } /** * This object defines the clickable region of a marker image. The shape * consists of two properties — type and coord * — which define the non-transparent region of an image. */ export interface MarkerShape { /** * The format of this attribute depends on the value of the * type and follows the w3 AREA coords * specification found at * http://www.w3.org/TR/REC-html40/struct/objects.html#adef-coords. *
The coords attribute is an array of integers that * specify the pixel position of the shape relative to the top-left corner * of the target image. The coordinates depend on the value of * type as follows:
  - circle: * coords is [x1,y1,r] where x1,y2 are the coordinates of the * center of the circle, and r is the radius of the circle. *
  - poly: coords is * [x1,y1,x2,y2...xn,yn] where each x,y pair contains the * coordinates of one vertex of the polygon.
  - * rect: coords is [x1,y1,x2,y2] where x1,y1 are * the coordinates of the upper-left corner of the rectangle and x2,y2 are * the coordinates of the lower-right coordinates of the rectangle. */ coords: number[] | null; /** * Describes the shape's type and can be circle, * poly or rect. */ type: string; } /** * A MaxZoom result in JSON format retrieved from the MaxZoomService. */ export interface MaxZoomResult { /** * Status of the request. This property is only defined when using callbacks * with {@link google.maps.MaxZoomService.getMaxZoomAtLatLng} (it is not * defined when using Promises). */ status: google.maps.MaxZoomStatus | null; /** * The maximum zoom level found at the given LatLng. */ zoom: number; } /** * A service for obtaining the highest zoom level at which satellite imagery * is available for a given location. * * Access by calling `const {MaxZoomService} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class MaxZoomService { /** * Returns the maximum zoom level for which detailed imagery is available at * a particular LatLng for the satellite map type. * As this request is asynchronous, you must pass a callback * function which will be executed upon completion of the request, being * passed a MaxZoomResult. */ getMaxZoomAtLatLng( latlng: google.maps.LatLng | google.maps.LatLngLiteral, callback?: (a: google.maps.MaxZoomResult) => void, ): Promise; } /** * The status returned by the MaxZoomService on the completion of * a call to getMaxZoomAtLatLng(). Specify these by value, or by * using the constant's name. For example, 'OK' or * google.maps.MaxZoomStatus.OK. * * Access by calling `const {MaxZoomStatus} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum MaxZoomStatus { /** * An unknown error occurred. */ ERROR = 'ERROR', /** * The response contains a valid MaxZoomResult. */ OK = 'OK', } /** * Options for the rendering of the motion tracking control. */ export interface MotionTrackingControlOptions { /** * Position id. This is used to specify the position of this control on the * panorama. * @defaultValue {@link google.maps.ControlPosition.INLINE_END_BLOCK_END} */ position?: google.maps.ControlPosition | null; } /** * You can implement this class if you want to display custom types of overlay * objects on the map.

Inherit from this class by setting your * overlay's prototype: MyOverlay.prototype = new * google.maps.OverlayView();. The OverlayView constructor * is guaranteed to be an empty function.

You must implement three * methods: onAdd(), draw(), and * onRemove().

  • In the onAdd() method, you * should create DOM objects and append them as children of the panes.
  • *
  • In the draw() method, you should position these * elements.
  • In the onRemove() method, you should remove * the objects from the DOM.
You must call setMap() * with a valid Map object to trigger the call to the * onAdd() method and setMap(null) in order to * trigger the onRemove() method. The setMap() * method can be called at the time of construction or at any point afterward * when the overlay should be re-shown after removing. The draw() * method will then be called whenever a map property changes that could * change the position of the element, such as zoom, center, or map type. * * Access by calling `const {OverlayView} = await * google.maps.importLibrary("maps")` or `const {OverlayView} = await * google.maps.importLibrary("streetView")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class OverlayView extends google.maps.MVCObject { /** * Implement this method to draw or update the overlay. Use the position * from projection.fromLatLngToDivPixel() to correctly position the overlay * relative to the MapPanes. This method is called after onAdd(), and is * called on change of zoom or center. It is not recommended to do * computationally expensive work in this method. */ draw(): void; getMap(): google.maps.Map | null | google.maps.StreetViewPanorama; /** * Returns the panes in which this OverlayView can be rendered. The panes * are not initialized until onAdd is called by the API. */ getPanes(): google.maps.MapPanes | null; /** * Returns the MapCanvasProjection object associated with this * OverlayView. The projection is not initialized until * onAdd is called by the API. */ getProjection(): google.maps.MapCanvasProjection; /** * Implement this method to initialize the overlay DOM elements. This method * is called once after setMap() is called with a valid map. At this point, * panes and projection will have been initialized. */ onAdd(): void; /** * Implement this method to remove your elements from the DOM. This method * is called once following a call to setMap(null). */ onRemove(): void; /** * Adds the overlay to the map or panorama. * @param map The map or panorama. If null, the layer will be * removed. */ setMap(map: google.maps.Map | null | google.maps.StreetViewPanorama): void; /** * Stops click, tap, drag, and wheel events on the element from bubbling up * to the map. Use this to prevent map dragging and zooming, as well as map * "click" events. */ static preventMapHitsAndGesturesFrom(this: any, element: Element): void; /** * Stops click or tap on the element from bubbling up to the map. Use this * to prevent the map from triggering "click" events. */ static preventMapHitsFrom(this: any, element: Element): void; } export interface Padding { /** * Padding for the bottom, in pixels. */ bottom?: number; /** * Padding for the left, in pixels. */ left?: number; /** * Padding for the right, in pixels. */ right?: number; /** * Padding for the top, in pixels. */ top?: number; } /** * Options for the rendering of the pan control. */ export interface PanControlOptions { /** * Position id. Used to specify the position of the control on the map. * @defaultValue {@link google.maps.ControlPosition.INLINE_END_BLOCK_END} */ position?: google.maps.ControlPosition | null; } /** * Options for the Custom Pano Provider. */ export interface PanoProviderOptions { /** * If set, the renderer will use technologies (like webgl) that only work * when cors headers are appropriately set on the provided images. It is the * developer's task to serve the images correctly in combination with * this flag, which might otherwise lead to SecurityErrors. */ cors?: boolean; } /** * An elevation query sent by the ElevationService containing the * path along which to return sampled data. This request defines a continuous * path along the earth along which elevation samples should be taken at * evenly-spaced distances. All paths from vertex to vertex use segments of * the great circle between those two points. */ export interface PathElevationRequest { /** * The path along which to collect elevation values. */ path?: (google.maps.LatLng | google.maps.LatLngLiteral)[] | null; /** * Required. The number of equidistant points along the given path for which * to retrieve elevation data, including the endpoints. The number of * samples must be a value between 2 and 512 inclusive. */ samples: number; } /** * An elevation response returned by the {@link google.maps.ElevationService} * containing the list of {@link google.maps.ElevationResult}s evenly-spaced * along the path of the {@link google.maps.PathElevationRequest}. */ export interface PathElevationResponse { /** * The list of {@link google.maps.ElevationResult}s matching the samples of * the {@link google.maps.PathElevationRequest}. */ results: google.maps.ElevationResult[]; } /** * Contains information needed to locate, identify, or describe a place for * a {@link google.maps.DirectionsRequest} or {@link * google.maps.DistanceMatrixRequest}. In this context, "place" * means a business, point of interest, or geographic location. For fetching * information about a place, see {@link google.maps.places.PlacesService}. */ export interface Place { /** * The LatLng of the entity described by this place. */ location?: google.maps.LatLng | null | google.maps.LatLngLiteral; /** * The place ID of the place (such as a business or point of interest). The * place ID is a unique identifier of a place in the Google Maps database. * Note that the placeId is the most accurate way of * identifying a place. If possible, you should specify the * placeId rather than a query. A place ID can be * retrieved from any request to the Places API, such as a TextSearch. * Place IDs can also be retrieved from requests to the Geocoding API. For * more information, see the overview * of place IDs. */ placeId?: string; /** * A search query describing the place (such as a business or point of * interest). An example query is "Quay, Upper Level, Overseas * Passenger Terminal 5 Hickson Road, The Rocks NSW". If possible, you * should specify the placeId rather than a query. * The API does not guarantee the accuracy of resolving the query string to * a place. If both the placeId and query are * provided, an error occurs. */ query?: string; } /** * An interface representing a feature with a place ID which includes features * of type {@link google.maps.FeatureType.ADMINISTRATIVE_AREA_LEVEL_1}, {@link * google.maps.FeatureType.ADMINISTRATIVE_AREA_LEVEL_2}, {@link * google.maps.FeatureType.COUNTRY}, {@link * google.maps.FeatureType.LOCALITY}, {@link * google.maps.FeatureType.POSTAL_CODE}, and {@link * google.maps.FeatureType.SCHOOL_DISTRICT}. */ export interface PlaceFeature extends google.maps.Feature { /** * Fetches a Place for this PlaceFeature. In the * resulting Place object, the id and the * displayName properties will be populated. The display name * will be in the language the end user sees on the map. (Additional fields * can be subsequently requested via Place.fetchFields() * subject to normal Places API enablement and billing.) Do not call this * from a FeatureStyleFunction since only synchronous * FeatureStyleFunctions are supported. The promise is rejected if there was * an error fetching the Place. */ fetchPlace(): Promise; /** * The {@link google.maps.places.PlaceResult.place_id}. */ placeId: string; } export interface PlacesLibrary { AccessibilityOptions: typeof google.maps.places.AccessibilityOptions; AddressComponent: typeof google.maps.places.AddressComponent; Attribution: typeof google.maps.places.Attribution; AuthorAttribution: typeof google.maps.places.AuthorAttribution; Autocomplete: typeof google.maps.places.Autocomplete; AutocompleteService: typeof google.maps.places.AutocompleteService; AutocompleteSessionToken: typeof google.maps.places.AutocompleteSessionToken; AutocompleteSuggestion: typeof google.maps.places.AutocompleteSuggestion; BusinessStatus: typeof google.maps.places.BusinessStatus; ConnectorAggregation: typeof google.maps.places.ConnectorAggregation; EVChargeOptions: typeof google.maps.places.EVChargeOptions; EVConnectorType: typeof google.maps.places.EVConnectorType; FormattableText: typeof google.maps.places.FormattableText; FuelOptions: typeof google.maps.places.FuelOptions; FuelPrice: typeof google.maps.places.FuelPrice; FuelType: typeof google.maps.places.FuelType; Money: typeof google.maps.places.Money; OpeningHours: typeof google.maps.places.OpeningHours; OpeningHoursPeriod: typeof google.maps.places.OpeningHoursPeriod; OpeningHoursPoint: typeof google.maps.places.OpeningHoursPoint; ParkingOptions: typeof google.maps.places.ParkingOptions; PaymentOptions: typeof google.maps.places.PaymentOptions; Photo: typeof google.maps.places.Photo; Place: typeof google.maps.places.Place; PlacePrediction: typeof google.maps.places.PlacePrediction; PlacesService: typeof google.maps.places.PlacesService; PlacesServiceStatus: typeof google.maps.places.PlacesServiceStatus; PlusCode: typeof google.maps.places.PlusCode; PriceLevel: typeof google.maps.places.PriceLevel; RankBy: typeof google.maps.places.RankBy; Review: typeof google.maps.places.Review; SearchBox: typeof google.maps.places.SearchBox; SearchByTextRankPreference: typeof google.maps.places.SearchByTextRankPreference; SearchNearbyRankPreference: typeof google.maps.places.SearchNearbyRankPreference; StringRange: typeof google.maps.places.StringRange; } /** * Access by calling `const {Point} = await * google.maps.importLibrary("core")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class Point { /** * Access by calling `const {Point} = await * google.maps.importLibrary("core")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(x: number, y: number); /** * Compares two Points */ equals(other: google.maps.Point | null): boolean; /** * Returns a string representation of this Point. */ toString(): string; /** * The X coordinate */ x: number; /** * The Y coordinate */ y: number; } /** * This object is returned from mouse events on polylines and polygons. */ export interface PolyMouseEvent extends google.maps.MapMouseEvent { /** * The index of the edge within the path beneath the cursor when the event * occurred, if the event occurred on a mid-point on an editable polygon. */ edge?: number; /** * The index of the path beneath the cursor when the event occurred, if the * event occurred on a vertex and the polygon is editable. Otherwise * undefined. */ path?: number; /** * The index of the vertex beneath the cursor when the event occurred, if * the event occurred on a vertex and the polyline or polygon is editable. * If the event does not occur on a vertex, the value is * undefined. */ vertex?: number; } /** * A polygon (like a polyline) defines a series of connected coordinates in an * ordered sequence. Additionally, polygons form a closed loop and define a * filled region. See the samples in the developer's guide, starting with * a simple * polygon, a polygon * with a hole, and more. Note that you can also use the Data layer to create a polygon. The Data layer * offers a simpler way of creating holes because it handles the order of the * inner and outer paths for you. * * Access by calling `const {Polygon} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class Polygon extends google.maps.MVCObject { /** * A polygon (like a polyline) defines a series of connected coordinates in * an ordered sequence. Additionally, polygons form a closed loop and define * a filled region. See the samples in the developer's guide, starting * with a simple * polygon, a polygon * with a hole, and more. Note that you can also use the Data layer to create a polygon. The Data layer * offers a simpler way of creating holes because it handles the order of * the inner and outer paths for you. * * Access by calling `const {Polygon} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(opts?: google.maps.PolygonOptions | null); /** * Returns whether this shape can be dragged by the user. */ getDraggable(): boolean; /** * Returns whether this shape can be edited by the user. */ getEditable(): boolean; /** * Returns the map on which this shape is attached. */ getMap(): google.maps.Map | null; /** * Retrieves the first path. */ getPath(): google.maps.MVCArray; /** * Retrieves the paths for this polygon. */ getPaths(): google.maps.MVCArray>; /** * Returns whether this poly is visible on the map. */ getVisible(): boolean; /** * If set to true, the user can drag this shape over the map. * The geodesic property defines the mode of dragging. */ setDraggable(draggable: boolean): void; /** * If set to true, the user can edit this shape by dragging the * control points shown at the vertices and on each segment. */ setEditable(editable: boolean): void; /** * Renders this shape on the specified map. If map is set to * null, the shape will be removed. */ setMap(map: google.maps.Map | null): void; setOptions(options: google.maps.PolygonOptions | null): void; /** * Sets the first path. See PolygonOptions for more details. */ setPath( path: | google.maps.MVCArray | (google.maps.LatLng | google.maps.LatLngLiteral)[], ): void; /** * Sets the path for this polygon. */ setPaths(paths: google.maps.MVCArray | any[]): void; /** * Hides this poly if set to false. */ setVisible(visible: boolean): void; } /** * PolygonOptions object used to define the properties that can be set on a * Polygon. */ export interface PolygonOptions { /** * Indicates whether this Polygon handles mouse events. * @defaultValue true */ clickable?: boolean | null; /** * If set to true, the user can drag this shape over the map. * The geodesic property defines the mode of dragging. * @defaultValue false */ draggable?: boolean | null; /** * If set to true, the user can edit this shape by dragging the * control points shown at the vertices and on each segment. * @defaultValue false */ editable?: boolean | null; /** * The fill color. All CSS3 colors are supported except for extended named * colors. */ fillColor?: string | null; /** * The fill opacity between 0.0 and 1.0 */ fillOpacity?: number | null; /** * When true, edges of the polygon are interpreted as geodesic * and will follow the curvature of the Earth. When false, * edges of the polygon are rendered as straight lines in screen space. Note * that the shape of a geodesic polygon may appear to change when dragged, * as the dimensions are maintained relative to the surface of the earth. * @defaultValue false */ geodesic?: boolean | null; /** * Map on which to display Polygon. */ map?: google.maps.Map | null; /** * The ordered sequence of coordinates that designates a closed loop. Unlike * polylines, a polygon may consist of one or more paths. As a result, the * paths property may specify one or more arrays of LatLng * coordinates. Paths are closed automatically; do not repeat the first * vertex of the path as the last vertex. Simple polygons may be defined * using a single array of LatLngs. More complex polygons may * specify an array of arrays. Any simple arrays are converted into MVCArrays. Inserting or removing * LatLngs from the MVCArray will automatically * update the polygon on the map. */ paths?: google.maps.MVCArray | any[] | null; /** * The stroke color. All CSS3 colors are supported except for extended named * colors. */ strokeColor?: string | null; /** * The stroke opacity between 0.0 and 1.0 */ strokeOpacity?: number | null; /** * The stroke position. * @defaultValue {@link google.maps.StrokePosition.CENTER} */ strokePosition?: google.maps.StrokePosition | null; /** * The stroke width in pixels. */ strokeWeight?: number | null; /** * Whether this polygon is visible on the map. * @defaultValue true */ visible?: boolean | null; /** * The zIndex compared to other polys. */ zIndex?: number | null; } /** * A polyline is a linear overlay of connected line segments on the map. * * Access by calling `const {Polyline} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class Polyline extends google.maps.MVCObject { /** * A polyline is a linear overlay of connected line segments on the map. * * Access by calling `const {Polyline} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(opts?: google.maps.PolylineOptions | null); /** * Returns whether this shape can be dragged by the user. */ getDraggable(): boolean; /** * Returns whether this shape can be edited by the user. */ getEditable(): boolean; /** * Returns the map on which this shape is attached. */ getMap(): google.maps.Map | null; /** * Retrieves the path. */ getPath(): google.maps.MVCArray; /** * Returns whether this poly is visible on the map. */ getVisible(): boolean; /** * If set to true, the user can drag this shape over the map. * The geodesic property defines the mode of dragging. */ setDraggable(draggable: boolean): void; /** * If set to true, the user can edit this shape by dragging the * control points shown at the vertices and on each segment. */ setEditable(editable: boolean): void; /** * Renders this shape on the specified map. If map is set to * null, the shape will be removed. */ setMap(map: google.maps.Map | null): void; setOptions(options: google.maps.PolylineOptions | null): void; /** * Sets the path. See PolylineOptions for more details. */ setPath( path: | google.maps.MVCArray | (google.maps.LatLng | google.maps.LatLngLiteral)[], ): void; /** * Hides this poly if set to false. */ setVisible(visible: boolean): void; } /** * PolylineOptions object used to define the properties that can be set on a * Polyline. */ export interface PolylineOptions { /** * Indicates whether this Polyline handles mouse events. * @defaultValue true */ clickable?: boolean | null; /** * If set to true, the user can drag this shape over the map. * The geodesic property defines the mode of dragging. * @defaultValue false */ draggable?: boolean | null; /** * If set to true, the user can edit this shape by dragging the * control points shown at the vertices and on each segment. * @defaultValue false */ editable?: boolean | null; /** * When true, edges of the polygon are interpreted as geodesic * and will follow the curvature of the Earth. When false, * edges of the polygon are rendered as straight lines in screen space. Note * that the shape of a geodesic polygon may appear to change when dragged, * as the dimensions are maintained relative to the surface of the earth. * @defaultValue false */ geodesic?: boolean | null; /** * The icons to be rendered along the polyline. */ icons?: google.maps.IconSequence[] | null; /** * Map on which to display Polyline. */ map?: google.maps.Map | null; /** * The ordered sequence of coordinates of the Polyline. This path may be * specified using either a simple array of LatLngs, or an * MVCArray of LatLngs. Note that if you pass a * simple array, it will be converted to an MVCArray Inserting * or removing LatLngs in the MVCArray will automatically * update the polyline on the map. */ path?: | google.maps.MVCArray | (google.maps.LatLng | google.maps.LatLngLiteral)[] | null; /** * The stroke color. All CSS3 colors are supported except for extended named * colors. */ strokeColor?: string | null; /** * The stroke opacity between 0.0 and 1.0. */ strokeOpacity?: number | null; /** * The stroke width in pixels. */ strokeWeight?: number | null; /** * Whether this polyline is visible on the map. * @defaultValue true */ visible?: boolean | null; /** * The zIndex compared to other polys. */ zIndex?: number | null; } export interface Projection { /** * Translates from the LatLng cylinder to the Point plane. This interface * specifies a function which implements translation from given * LatLng values to world coordinates on the map projection. * The Maps API calls this method when it needs to plot locations on screen. * Projection objects must implement this method, but may * return null if the projection cannot calculate the * Point. */ fromLatLngToPoint( latLng: google.maps.LatLng | google.maps.LatLngLiteral, point?: google.maps.Point, ): google.maps.Point | null; /** * This interface specifies a function which implements translation from * world coordinates on a map projection to LatLng values. The * Maps API calls this method when it needs to translate actions on screen * to positions on the map. Projection objects must implement * this method, but may return null if the projection cannot * calculate the LatLng. */ fromPointToLatLng( pixel: google.maps.Point, noClampNoWrap?: boolean, ): google.maps.LatLng | null; } /** * A rectangle overlay. * * Access by calling `const {Rectangle} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class Rectangle extends google.maps.MVCObject { /** * A rectangle overlay. * * Access by calling `const {Rectangle} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(opts?: google.maps.RectangleOptions | null); /** * Returns the bounds of this rectangle. */ getBounds(): google.maps.LatLngBounds | null; /** * Returns whether this rectangle can be dragged by the user. */ getDraggable(): boolean; /** * Returns whether this rectangle can be edited by the user. */ getEditable(): boolean; /** * Returns the map on which this rectangle is displayed. */ getMap(): google.maps.Map | null; /** * Returns whether this rectangle is visible on the map. */ getVisible(): boolean; /** * Sets the bounds of this rectangle. */ setBounds( bounds: google.maps.LatLngBounds | null | google.maps.LatLngBoundsLiteral, ): void; /** * If set to true, the user can drag this rectangle over the * map. */ setDraggable(draggable: boolean): void; /** * If set to true, the user can edit this rectangle by dragging * the control points shown at the corners and on each edge. */ setEditable(editable: boolean): void; /** * Renders the rectangle on the specified map. If map is set to * null, the rectangle will be removed. */ setMap(map: google.maps.Map | null): void; setOptions(options: google.maps.RectangleOptions | null): void; /** * Hides this rectangle if set to false. */ setVisible(visible: boolean): void; } /** * RectangleOptions object used to define the properties that can be set on a * Rectangle. */ export interface RectangleOptions { /** * The bounds. */ bounds?: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral | null; /** * Indicates whether this Rectangle handles mouse events. * @defaultValue true */ clickable?: boolean | null; /** * If set to true, the user can drag this rectangle over the * map. * @defaultValue false */ draggable?: boolean | null; /** * If set to true, the user can edit this rectangle by dragging * the control points shown at the corners and on each edge. * @defaultValue false */ editable?: boolean | null; /** * The fill color. All CSS3 colors are supported except for extended named * colors. */ fillColor?: string | null; /** * The fill opacity between 0.0 and 1.0 */ fillOpacity?: number | null; /** * Map on which to display Rectangle. */ map?: google.maps.Map | null; /** * The stroke color. All CSS3 colors are supported except for extended named * colors. */ strokeColor?: string | null; /** * The stroke opacity between 0.0 and 1.0 */ strokeOpacity?: number | null; /** * The stroke position. * @defaultValue {@link google.maps.StrokePosition.CENTER} */ strokePosition?: google.maps.StrokePosition | null; /** * The stroke width in pixels. */ strokeWeight?: number | null; /** * Whether this rectangle is visible on the map. * @defaultValue true */ visible?: boolean | null; /** * The zIndex compared to other polys. */ zIndex?: number | null; } /** * Access by calling `const {RenderingType} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum RenderingType { /** * Indicates that the map is a raster map. */ RASTER = 'RASTER', /** * Indicates that it is unknown yet whether the map is vector or raster, * because the map has not finished initializing yet. */ UNINITIALIZED = 'UNINITIALIZED', /** * Indicates that the map is a vector map. */ VECTOR = 'VECTOR', } /** * Options for the rendering of the rotate control. */ export interface RotateControlOptions { /** * Position id. Used to specify the position of the control on the map. * @defaultValue {@link google.maps.ControlPosition.INLINE_END_BLOCK_END} */ position?: google.maps.ControlPosition | null; } export interface RoutesLibrary { DirectionsRenderer: typeof google.maps.DirectionsRenderer; DirectionsService: typeof google.maps.DirectionsService; DirectionsStatus: typeof google.maps.DirectionsStatus; DistanceMatrixElementStatus: typeof google.maps.DistanceMatrixElementStatus; DistanceMatrixService: typeof google.maps.DistanceMatrixService; DistanceMatrixStatus: typeof google.maps.DistanceMatrixStatus; TrafficModel: typeof google.maps.TrafficModel; TransitMode: typeof google.maps.TransitMode; TransitRoutePreference: typeof google.maps.TransitRoutePreference; TravelMode: typeof google.maps.TravelMode; VehicleType: typeof google.maps.VehicleType; } /** * Options for the rendering of the scale control. */ export interface ScaleControlOptions { /** * Style id. Used to select what style of scale control to display. */ style?: google.maps.ScaleControlStyle | null; } /** * Identifiers for scale control ids. */ export enum ScaleControlStyle { /** * The standard scale control. */ DEFAULT = 0.0, } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * Settings which control the behavior of the Maps JavaScript API as a whole. * * Access by calling `const {Settings} = await * google.maps.importLibrary("core")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class Settings { /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * A collection of unique experience IDs to which to attribute Maps JS API * calls. The returned value is a copy of the internal value that is stored * in the Settings class singleton instance. Operations on * google.maps.Settings.getInstance().experienceIds will * therefore only modify the copy and not the internal value.

To * update the internal value, set the property equal to the new value on the * singleton instance (ex: * google.maps.Settings.getInstance().experienceIds = * [experienceId];). */ experienceIds: Iterable; /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * Returns the singleton instance of google.maps.Settings. */ static getInstance(this: any): google.maps.Settings; } /** * Access by calling `const {Size} = await google.maps.importLibrary("core")`. * See https://developers.google.com/maps/documentation/javascript/libraries. */ export class Size { /** * Access by calling `const {Size} = await * google.maps.importLibrary("core")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor( width: number, height: number, widthUnit?: string, heightUnit?: string, ); /** * Compares two Sizes. */ equals(other: google.maps.Size | null): boolean; /** * The height along the y-axis, in pixels. */ height: number; /** * Returns a string representation of this Size. */ toString(): string; /** * The width along the x-axis, in pixels. */ width: number; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * An enum representing the relationship in space between the landmark and the * target. * * Access by calling `const {SpatialRelationship} = await * google.maps.importLibrary("geocoding")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum SpatialRelationship { /** * The target is directly opposite the landmark on the other side of the * road. */ ACROSS_THE_ROAD = 'ACROSS_THE_ROAD', /** * Not on the same route as the landmark but a single turn away. */ AROUND_THE_CORNER = 'AROUND_THE_CORNER', /** * Close to the landmark's structure but further away from its access * point. */ BEHIND = 'BEHIND', /** * The target is directly adjacent to the landmark. */ BESIDE = 'BESIDE', /** * On the same route as the landmark but not besides or across. */ DOWN_THE_ROAD = 'DOWN_THE_ROAD', /** * This is the default relationship when nothing more specific below * applies. */ NEAR = 'NEAR', /** * The landmark has a spatial geometry and the target is within its bounds. */ WITHIN = 'WITHIN', } /** * Options for the rendering of the Street View address control. */ export interface StreetViewAddressControlOptions { /** * Position id. This id is used to specify the position of the control on * the map. The default position is TOP_LEFT. */ position?: google.maps.ControlPosition | null; } /** * Options for the rendering of the Street View pegman control on the map. */ export interface StreetViewControlOptions { /** * Position id. Used to specify the position of the control on the map. The * default position is embedded within the navigation (zoom and pan) * controls. If this position is empty or the same as that specified in the * zoomControlOptions or panControlOptions, the * Street View control will be displayed as part of the navigation controls. * Otherwise, it will be displayed separately. */ position?: google.maps.ControlPosition | null; /** * Specifies the sources of panoramas to search. This allows a restriction * to search for just official Google panoramas for example. Setting * multiple sources will be evaluated as the intersection of those sources. * Note: the {@link google.maps.StreetViewSource.OUTDOOR} source is not * supported at this time. * @defaultValue [{@link google.maps.StreetViewSource.DEFAULT}] */ sources?: Iterable | null; } /** * A layer that illustrates the locations where Street View is available. * * Access by calling `const {StreetViewCoverageLayer} = await * google.maps.importLibrary("streetView")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class StreetViewCoverageLayer extends google.maps.MVCObject { /** * Returns the map on which this layer is displayed. */ getMap(): google.maps.Map | null; /** * Renders the layer on the specified map. If the map is set to null, the * layer will be removed. */ setMap(map: google.maps.Map | null): void; } export interface StreetViewLibrary { InfoWindow: typeof google.maps.InfoWindow; OverlayView: typeof google.maps.OverlayView; StreetViewCoverageLayer: typeof google.maps.StreetViewCoverageLayer; StreetViewPanorama: typeof google.maps.StreetViewPanorama; StreetViewPreference: typeof google.maps.StreetViewPreference; StreetViewService: typeof google.maps.StreetViewService; StreetViewSource: typeof google.maps.StreetViewSource; StreetViewStatus: typeof google.maps.StreetViewStatus; } /** * A collection of references to adjacent Street View panos. */ export interface StreetViewLink { /** * A localized string describing the link. */ description: string | null; /** * The heading of the link. */ heading: number | null; /** * A unique identifier for the panorama. This id is stable within a session * but unstable across sessions. */ pano: string | null; } /** * A representation of a location in the Street View panorama. */ export interface StreetViewLocation { /** * A localized string describing the location. */ description?: string | null; /** * The latlng of the panorama. */ latLng?: google.maps.LatLng | null; /** * A unique identifier for the panorama. This is stable within a session but * unstable across sessions. */ pano: string; /** * Short description of the location. */ shortDescription?: string | null; } /** * A Street View request to be sent with getPanorama. * StreetViewLocationRequest lets you search for a Street View * panoroma at a specified location. */ export interface StreetViewLocationRequest { /** * Specifies the location where to search for a Street View panorama. */ location?: google.maps.LatLng | google.maps.LatLngLiteral | null; /** * Sets a preference for which panorama should be found within the radius: * the one nearest to the provided location, or the best one within the * radius. */ preference?: google.maps.StreetViewPreference | null; /** * Sets a radius in meters in which to search for a panorama. * @defaultValue 50 */ radius?: number | null; /** * Specifies the source of panoramas to search. This allows a restriction to * search for just outdoor panoramas for example. * @defaultValue {@link google.maps.StreetViewSource.DEFAULT} * @deprecated Use sources instead. */ source?: google.maps.StreetViewSource | null; /** * Specifies the sources of panoramas to search. This allows a restriction * to search for just outdoor panoramas for example. Setting multiple * sources will be evaluated as the intersection of those sources. * @defaultValue [{@link google.maps.StreetViewSource.DEFAULT}] */ sources?: Iterable | null; } /** * A StreetViewPanoRequest is used with the * getPanorama to find a panorama with a specified ID. */ export interface StreetViewPanoRequest { /** * Specifies the pano ID to search for. */ pano?: string | null; } /** * Displays the panorama for a given LatLng or panorama ID. A * StreetViewPanorama object provides a Street View * "viewer" which can be stand-alone within a separate * <div> or bound to a Map. * * Access by calling `const {StreetViewPanorama} = await * google.maps.importLibrary("streetView")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class StreetViewPanorama extends google.maps.MVCObject { /** * Displays the panorama for a given LatLng or panorama ID. A * StreetViewPanorama object provides a Street View * "viewer" which can be stand-alone within a separate * <div> or bound to a Map. * * Access by calling `const {StreetViewPanorama} = await * google.maps.importLibrary("streetView")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor( container: HTMLElement, opts?: google.maps.StreetViewPanoramaOptions | null, ); /** * Additional controls to attach to the panorama. To add a control to the * panorama, add the control's <div> to the * MVCArray corresponding to the {@link * google.maps.ControlPosition} where it should be rendered. */ controls: google.maps.MVCArray[]; /** * Sets focus on this StreetViewPanorama. You may wish to * consider using this method along with a visible_changed * event to make sure that StreetViewPanorama is visible before * setting focus on it. A StreetViewPanorama that is not * visible cannot be focused. */ focus(): void; /** * Returns the set of navigation links for the Street View panorama. */ getLinks(): (google.maps.StreetViewLink | null)[] | null; /** * Returns the StreetViewLocation of the current panorama. */ getLocation(): google.maps.StreetViewLocation; /** * Returns the state of motion tracker. If true when the user * physically moves the device and the browser supports it, the Street View * Panorama tracks the physical movements. */ getMotionTracking(): boolean; /** * Returns the current panorama ID for the Street View panorama. This id is * stable within the browser's current session only. */ getPano(): string; /** * Returns the heading and pitch of the photographer when this panorama was * taken. For Street View panoramas on the road, this also reveals in which * direction the car was travelling. This data is available after the * pano_changed event. */ getPhotographerPov(): google.maps.StreetViewPov; /** * Returns the current LatLng position for the Street View * panorama. */ getPosition(): google.maps.LatLng | null; /** * Returns the current point of view for the Street View panorama. */ getPov(): google.maps.StreetViewPov; /** * Returns the status of the panorama on completion of the * setPosition() or setPano() request. */ getStatus(): google.maps.StreetViewStatus; /** * Returns true if the panorama is visible. It does not specify * whether Street View imagery is available at the specified position. */ getVisible(): boolean; /** * Returns the zoom level of the panorama. Fully zoomed-out is level 0, * where the field of view is 180 degrees. Zooming in increases the zoom * level. */ getZoom(): number; /** * Set the custom panorama provider called on pano change to load custom * panoramas. */ registerPanoProvider( provider: (a: string) => google.maps.StreetViewPanoramaData | null, opt_options?: google.maps.PanoProviderOptions, ): void; /** * Sets the set of navigation links for the Street View panorama. */ setLinks(links: (google.maps.StreetViewLink | null)[] | null): void; /** * Sets the state of motion tracker. If true when the user * physically moves the device and the browser supports it, the Street View * Panorama tracks the physical movements. */ setMotionTracking(motionTracking: boolean): void; /** * Sets a collection of key-value pairs. */ setOptions(options: google.maps.StreetViewPanoramaOptions | null): void; /** * Sets the current panorama ID for the Street View panorama. */ setPano(pano: string): void; /** * Sets the current LatLng position for the Street View * panorama. */ setPosition( latLng: google.maps.LatLng | null | google.maps.LatLngLiteral, ): void; /** * Sets the point of view for the Street View panorama. */ setPov(pov: google.maps.StreetViewPov): void; /** * Sets to true to make the panorama visible. If set to * false, the panorama will be hidden whether it is embedded in * the map or in its own <div>. */ setVisible(flag: boolean): void; /** * Sets the zoom level of the panorama. Fully zoomed-out is level 0, where * the field of view is 180 degrees. Zooming in increases the zoom level. */ setZoom(zoom: number): void; } /** * The representation of a panorama returned from the provider defined using * registerPanoProvider. */ export interface StreetViewPanoramaData { /** * Specifies the copyright text for this panorama. */ copyright?: string; /** * Specifies the year and month in which the imagery in this panorama was * acquired. The date string is in the form YYYY-MM. */ imageDate?: string; /** * Specifies the navigational links to adjacent panoramas. */ links?: google.maps.StreetViewLink[]; /** * Specifies the location meta-data for this panorama. */ location?: google.maps.StreetViewLocation; /** * Specifies the custom tiles for this panorama. */ tiles: google.maps.StreetViewTileData; } /** * Options defining the properties of a StreetViewPanorama * object. */ export interface StreetViewPanoramaOptions { /** * The enabled/disabled state of the address control. */ addressControl?: boolean | null; /** * The display options for the address control. */ addressControlOptions?: google.maps.StreetViewAddressControlOptions | null; /** * The enabled/disabled state of click-to-go. Not applicable to custom * panoramas. * @defaultValue true */ clickToGo?: boolean | null; /** * Size in pixels of the controls appearing on the panorama. This value must * be supplied directly when creating the Panorama, updating this value * later may bring the controls into an undefined state. Only governs the * controls made by the Maps API itself. Does not scale developer created * custom controls. */ controlSize?: number | null; /** * Enables/disables all default UI. May be overridden individually. */ disableDefaultUI?: boolean | null; /** * Enables/disables zoom on double click. * @defaultValue true */ disableDoubleClickZoom?: boolean | null; /** * If true, the close button is displayed. * @defaultValue false */ enableCloseButton?: boolean | null; /** * The enabled/disabled state of the fullscreen control. */ fullscreenControl?: boolean | null; /** * The display options for the fullscreen control. */ fullscreenControlOptions?: google.maps.FullscreenControlOptions | null; /** * The enabled/disabled state of the imagery acquisition date control. * Disabled by default. */ imageDateControl?: boolean | null; /** * The enabled/disabled state of the links control. */ linksControl?: boolean | null; /** * Whether motion tracking is on or off. Enabled by default when the motion * tracking control is present and permission is granted by a user or not * required, so that the POV (point of view) follows the orientation of the * device. This is primarily applicable to mobile devices. If * motionTracking is set to false while * motionTrackingControl is enabled, the motion tracking * control appears but tracking is off. The user can tap the motion tracking * control to toggle this option. If motionTracking is set to * true while permission is required but not yet requested, the * motion tracking control appears but tracking is off. The user can tap the * motion tracking control to request permission. If * motionTracking is set to true while permission * is denied by a user, the motion tracking control appears disabled with * tracking turned off. */ motionTracking?: boolean | null; /** * The enabled/disabled state of the motion tracking control. Enabled by * default when the device has motion data, so that the control appears on * the map. This is primarily applicable to mobile devices. */ motionTrackingControl?: boolean | null; /** * The display options for the motion tracking control. */ motionTrackingControlOptions?: google.maps.MotionTrackingControlOptions | null; /** * The enabled/disabled state of the pan control. */ panControl?: boolean | null; /** * The display options for the pan control. */ panControlOptions?: google.maps.PanControlOptions | null; /** * The panorama ID, which should be set when specifying a custom panorama. */ pano?: string | null; /** * The LatLng position of the Street View panorama. */ position?: google.maps.LatLng | null | google.maps.LatLngLiteral; /** * The camera orientation, specified as heading and pitch, for the panorama. */ pov?: google.maps.StreetViewPov | null; /** * If false, disables scrollwheel zooming in Street View. * @defaultValue true */ scrollwheel?: boolean | null; /** * The display of street names on the panorama. If this value is not * specified, or is set to true, street names are displayed on * the panorama. If set to false, street names are not * displayed. * @defaultValue true */ showRoadLabels?: boolean | null; /** * If true, the Street View panorama is visible on load. */ visible?: boolean | null; /** * The zoom of the panorama, specified as a number. A zoom of 0 gives a 180 * degrees Field of View. */ zoom?: number | null; /** * The enabled/disabled state of the zoom control. */ zoomControl?: boolean | null; /** * The display options for the zoom control. */ zoomControlOptions?: google.maps.ZoomControlOptions | null; } /** * A point of view object which specifies the camera's orientation at the * Street View panorama's position. The point of view is defined as * heading and pitch. */ export interface StreetViewPov { /** * The camera heading in degrees relative to true north. True * north is 0°, east is 90°, south is 180°, west is 270°. */ heading: number; /** * The camera pitch in degrees, relative to the street view vehicle. Ranges * from 90° (directly upwards) to -90° (directly downwards). */ pitch: number; } /** * Options that bias a search result towards returning a Street View panorama * that is nearest to the request location, or a panorama that is considered * most likely to be what the user wants to see. Specify these by value, or by * using the constant's name. For example, 'best' or * google.maps.StreetViewPreference.BEST. * * Access by calling `const {StreetViewPreference} = await * google.maps.importLibrary("streetView")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum StreetViewPreference { /** * Return the Street View panorama that is considered most likely to be what * the user wants to see. The best result is determined by algorithms based * on user research and parameters such as recognised points of interest, * image quality, and distance from the given location. */ BEST = 'best', /** * Return the Street View panorama that is the shortest distance from the * provided location. This works well only within a limited radius. The * recommended radius is 1km or less. */ NEAREST = 'nearest', } /** * The response resolved for a Promise from {@link * google.maps.StreetViewService.getPanorama}. */ export interface StreetViewResponse { /** * The representation of a panorama. */ data: google.maps.StreetViewPanoramaData; } /** * A StreetViewService object performs searches for Street View * data. * * Access by calling `const {StreetViewService} = await * google.maps.importLibrary("streetView")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class StreetViewService { /** * Retrieves the StreetViewPanoramaData for a panorama that * matches the supplied Street View query request. The * StreetViewPanoramaData is passed to the provided callback. */ getPanorama( request: | google.maps.StreetViewLocationRequest | google.maps.StreetViewPanoRequest, callback?: ( a: google.maps.StreetViewPanoramaData | null, b: google.maps.StreetViewStatus, ) => void, ): Promise; } /** * Identifiers to limit Street View searches to selected sources. These values * are specified as strings. For example, 'outdoor'. * * Access by calling `const {StreetViewSource} = await * google.maps.importLibrary("streetView")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum StreetViewSource { /** * Uses the default sources of Street View, searches will not be limited to * specific sources. */ DEFAULT = 'default', /** * Limits Street View searches to official Google collections. */ GOOGLE = 'google', /** * Limits Street View searches to outdoor collections. Indoor collections * are not included in search results. Note also that the search only * returns panoramas where it's possible to determine whether * they're indoors or outdoors. For example, PhotoSpheres are not * returned because it's unknown whether they are indoors or outdoors. */ OUTDOOR = 'outdoor', } /** * The status returned by the StreetViewService on completion of * a Street View request. These can be specified by value, or by using the * constant's name. For example, 'OK' or * google.maps.StreetViewStatus.OK. * * Access by calling `const {StreetViewStatus} = await * google.maps.importLibrary("streetView")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum StreetViewStatus { /** * The request was successful. */ OK = 'OK', /** * The request could not be successfully processed, yet the exact reason for * failure is unknown. */ UNKNOWN_ERROR = 'UNKNOWN_ERROR', /** * There are no panoramas found that match the search criteria. */ ZERO_RESULTS = 'ZERO_RESULTS', } /** * The properties of the tile set used in a Street View panorama. */ export interface StreetViewTileData { /** * The heading (in degrees) at the center of the panoramic tiles. */ centerHeading: number; /** * Gets the tile image URL for the specified tile.
This is a custom * method which you must implement, to supply your custom tiles. The API * calls this method, supplying the following parameters:
* pano is the panorama ID of the Street View tile.
* tileZoom is the zoom level of the tile.
* tileX is the x-coordinate of the tile.
* tileY is the y-coordinate of the tile.
Your custom * method must return the URL for the tile image.
*/ getTileUrl( pano: string, tileZoom: number, tileX: number, tileY: number, ): string; /** * The size (in pixels) at which tiles will be rendered. */ tileSize: google.maps.Size; /** * The size (in pixels) of the whole panorama's "world". */ worldSize: google.maps.Size; } /** * The possible positions of the stroke on a polygon. * * Access by calling `const {StrokePosition} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum StrokePosition { /** * The stroke is centered on the polygon's path, with half the stroke * inside the polygon and half the stroke outside the polygon. */ CENTER = 0.0, /** * The stroke lies inside the polygon. */ INSIDE = 1.0, /** * The stroke lies outside the polygon. */ OUTSIDE = 2.0, } /** * Creates a MapType with a custom style. * * Access by calling `const {StyledMapType} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class StyledMapType extends google.maps.MVCObject implements google.maps.MapType { /** * Creates a MapType with a custom style. * * Access by calling `const {StyledMapType} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor( styles: (google.maps.MapTypeStyle | null)[] | null, options?: google.maps.StyledMapTypeOptions | null, ); alt: string; /** * @param tileCoord Tile coordinates. * @param zoom Tile zoom. * @param ownerDocument The document which owns this tile. */ getTile( tileCoord: google.maps.Point | null, zoom: number, ownerDocument: Document | null, ): Element | null; maxZoom: number; minZoom: number; name: string; projection: google.maps.Projection | null; radius: number; /** * @param tile Tile to release. */ releaseTile(tile: Element | null): void; tileSize: google.maps.Size | null; } /** * This class is used to specify options when creating a * StyledMapType. These options cannot be changed after the * StyledMapType is instantiated. */ export interface StyledMapTypeOptions { /** * Text to display when this MapType's button is hovered * over in the map type control. */ alt?: string | null; /** * The maximum zoom level for the map when displaying this * MapType. Optional. */ maxZoom?: number | null; /** * The minimum zoom level for the map when displaying this * MapType. Optional. */ minZoom?: number | null; /** * The name to display in the map type control. */ name?: string | null; } /** * Describes a symbol, which consists of a vector path with styling. A symbol * can be used as the icon of a marker, or placed on a polyline. */ export interface Symbol { /** * The position of the symbol relative to the marker or polyline. The * coordinates of the symbol's path are translated left and up by the * anchor's x and y coordinates respectively. The position is expressed * in the same coordinate system as the symbol's path. * @defaultValue google.maps.Point(0,0) */ anchor?: google.maps.Point | null; /** * The symbol's fill color. All CSS3 colors are supported except for * extended named colors. For symbol markers, this defaults to * 'black'. For symbols on polylines, this defaults to the stroke * color of the corresponding polyline. */ fillColor?: string | null; /** * The symbol's fill opacity. * @defaultValue 0 */ fillOpacity?: number | null; /** * The origin of the label relative to the origin of the path, if label is * supplied by the marker. The origin is expressed in the same coordinate * system as the symbol's path. This property is unused for symbols on * polylines. * @defaultValue google.maps.Point(0,0) */ labelOrigin?: google.maps.Point | null; /** * The symbol's path, which is a built-in symbol path, or a custom path * expressed using SVG path * notation. Required. */ path: google.maps.SymbolPath | string; /** * The angle by which to rotate the symbol, expressed clockwise in degrees. * A symbol in an IconSequence where fixedRotation * is false is rotated relative to the angle of the edge on * which it lies. * @defaultValue 0 */ rotation?: number | null; /** * The amount by which the symbol is scaled in size. For symbol markers, * this defaults to 1; after scaling, the symbol may be of any size. For * symbols on a polyline, this defaults to the stroke weight of the * polyline; after scaling, the symbol must lie inside a square 22 pixels in * size centered at the symbol's anchor. */ scale?: number | null; /** * The symbol's stroke color. All CSS3 colors are supported except for * extended named colors. For symbol markers, this defaults to * 'black'. For symbols on a polyline, this defaults to the stroke * color of the polyline. */ strokeColor?: string | null; /** * The symbol's stroke opacity. For symbol markers, this defaults to 1. * For symbols on a polyline, this defaults to the stroke opacity of the * polyline. */ strokeOpacity?: number | null; /** * The symbol's stroke weight. * @defaultValue The {@link google.maps.Symbol.scale} of the symbol. */ strokeWeight?: number | null; } /** * Built-in symbol paths. * * Access by calling `const {SymbolPath} = await * google.maps.importLibrary("core")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum SymbolPath { /** * A backward-pointing closed arrow. */ BACKWARD_CLOSED_ARROW = 0.0, /** * A backward-pointing open arrow. */ BACKWARD_OPEN_ARROW = 1.0, /** * A circle. */ CIRCLE = 2.0, /** * A forward-pointing closed arrow. */ FORWARD_CLOSED_ARROW = 3.0, /** * A forward-pointing open arrow. */ FORWARD_OPEN_ARROW = 4.0, } /** * A representation of time as a Date object, a localized string, and a time * zone. */ export interface Time { /** * A string representing the time's value. The time is displayed in the * time zone of the transit stop. */ text: string; /** * The time zone in which this stop lies. The value is the name of the time * zone as defined in the IANA Time Zone Database, e.g. * "America/New_York". */ time_zone: string; /** * The time of this departure or arrival, specified as a JavaScript Date * object. */ value: Date; } /** * A traffic layer. * * Access by calling `const {TrafficLayer} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class TrafficLayer extends google.maps.MVCObject { /** * A traffic layer. * * Access by calling `const {TrafficLayer} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(opts?: google.maps.TrafficLayerOptions | null); /** * Returns the map on which this layer is displayed. */ getMap(): google.maps.Map | null; /** * Renders the layer on the specified map. If map is set to * null, the layer will be removed. */ setMap(map: google.maps.Map | null): void; setOptions(options: google.maps.TrafficLayerOptions | null): void; } /** * TrafficLayerOptions object used to define the properties that can be set on * a TrafficLayer. */ export interface TrafficLayerOptions { /** * Whether the traffic layer refreshes with updated information * automatically. * @defaultValue true */ autoRefresh?: boolean | null; /** * Map on which to display the traffic layer. */ map?: google.maps.Map | null; } /** * The assumptions to use when predicting duration in traffic. Specified as * part of a DirectionsRequest * or DistanceMatrixRequest. * Specify these by value, or by using the constant's name. For example, * 'bestguess' or * google.maps.TrafficModel.BEST_GUESS. * * Access by calling `const {TrafficModel} = await * google.maps.importLibrary("routes")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum TrafficModel { /** * Use historical traffic data to best estimate the time spent in traffic. */ BEST_GUESS = 'bestguess', /** * Use historical traffic data to make an optimistic estimate of what the * duration in traffic will be. */ OPTIMISTIC = 'optimistic', /** * Use historical traffic data to make a pessimistic estimate of what the * duration in traffic will be. */ PESSIMISTIC = 'pessimistic', } /** * Information about an agency that operates a transit line. */ export interface TransitAgency { /** * The name of this transit agency. */ name: string; /** * The transit agency's phone number. */ phone: string; /** * The transit agency's URL. */ url: string; } /** * Details about the departure, arrival, and mode of transit used in this * step. */ export interface TransitDetails { /** * The arrival stop of this transit step. */ arrival_stop: google.maps.TransitStop; /** * The arrival time of this step, specified as a Time object. */ arrival_time: google.maps.Time; /** * The departure stop of this transit step. */ departure_stop: google.maps.TransitStop; /** * The departure time of this step, specified as a Time object. */ departure_time: google.maps.Time; /** * The direction in which to travel on this line, as it is marked on the * vehicle or at the departure stop. */ headsign: string; /** * The expected number of seconds between equivalent vehicles at this stop. */ headway: number; /** * Details about the transit line used in this step. */ line: google.maps.TransitLine; /** * The number of stops on this step. Includes the arrival stop, but not the * departure stop. */ num_stops: number; /** * The text that appears in schedules and sign boards to identify a transit * trip to passengers, for example, to identify train numbers for commuter * rail trips. The text uniquely identifies a trip within a service day. */ trip_short_name: string; } /** * A fare of a DirectionsRoute * consisting of value and currency. */ export interface TransitFare { /** * An ISO 4217 currency * code indicating the currency in which the fare is expressed. */ currency: string; /** * The numerical value of the fare, expressed in the given * currency. */ value: number; } /** * A transit layer. * * Access by calling `const {TransitLayer} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class TransitLayer extends google.maps.MVCObject { /** * Returns the map on which this layer is displayed. */ getMap(): google.maps.Map | null; /** * Renders the layer on the specified map. If map is set to * null, the layer will be removed. */ setMap(map: google.maps.Map | null): void; } /** * Information about the transit line that operates this transit step. */ export interface TransitLine { /** * The transit agency that operates this transit line. */ agencies: (google.maps.TransitAgency | null)[] | null; /** * The color commonly used in signage for this transit line, represented as * a hex string. */ color: string; /** * The URL for an icon associated with this line. */ icon: string; /** * The full name of this transit line, e.g. "8 Avenue Local". */ name: string; /** * The short name of this transit line, e.g. "E". */ short_name: string; /** * The text color commonly used in signage for this transit line, * represented as a hex string. */ text_color: string; /** * The agency's URL which is specific to this transit line. */ url: string; /** * The type of vehicle used, e.g. train or bus. */ vehicle: google.maps.TransitVehicle; } /** * The valid transit mode e.g. bus that can be specified in a TransitOptions. Specify these by * value, or by using the constant's name. For example, 'BUS' * or google.maps.TransitMode.BUS. * * Access by calling `const {TransitMode} = await * google.maps.importLibrary("routes")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum TransitMode { /** * Specifies bus as a preferred mode of transit. */ BUS = 'BUS', /** * Specifies rail as a preferred mode of transit. */ RAIL = 'RAIL', /** * Specifies subway as a preferred mode of transit. */ SUBWAY = 'SUBWAY', /** * Specifies train as a preferred mode of transit. */ TRAIN = 'TRAIN', /** * Specifies tram as a preferred mode of transit. */ TRAM = 'TRAM', } /** * The TransitOptions object to be included in a DirectionsRequest when the travel mode * is set to TRANSIT. */ export interface TransitOptions { /** * The desired arrival time for the route, specified as a Date object. The * Date object measures time in milliseconds since 1 January 1970. If * arrival time is specified, departure time is ignored. */ arrivalTime?: Date | null; /** * The desired departure time for the route, specified as a Date object. The * Date object measures time in milliseconds since 1 January 1970. If * neither departure time nor arrival time is specified, the time is assumed * to be "now". */ departureTime?: Date | null; /** * One or more preferred modes of transit, such as bus or train. If no * preference is given, the API returns the default best route. */ modes?: google.maps.TransitMode[] | null; /** * A preference that can bias the choice of transit route, such as less * walking. If no preference is given, the API returns the default best * route. */ routingPreference?: google.maps.TransitRoutePreference | null; } /** * The valid transit route type that can be specified in a TransitOptions. Specify these by * value, or by using the constant's name. For example, * 'LESS_WALKING' or * google.maps.TransitRoutePreference.LESS_WALKING. * * Access by calling `const {TransitRoutePreference} = await * google.maps.importLibrary("routes")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum TransitRoutePreference { /** * Specifies that the calculated route should prefer a limited number of * transfers. */ FEWER_TRANSFERS = 'FEWER_TRANSFERS', /** * Specifies that the calculated route should prefer limited amounts of * walking. */ LESS_WALKING = 'LESS_WALKING', } /** * Details about a transit stop or station. */ export interface TransitStop { /** * The location of this stop. */ location: google.maps.LatLng; /** * The name of this transit stop. */ name: string; } /** * Information about the vehicle that operates on a transit line. */ export interface TransitVehicle { /** * A URL for an icon that corresponds to the type of vehicle used on this * line. */ icon: string; /** * A URL for an icon that corresponds to the type of vehicle used in this * region instead of the more general icon. */ local_icon: string; /** * A name for this type of TransitVehicle, e.g. "Train" or * "Bus". */ name: string; /** * The type of vehicle used, e.g. train, bus, or ferry. */ type: google.maps.VehicleType; } /** * The valid travel modes that can be specified in a * DirectionsRequest as well as the travel modes returned in a * DirectionsStep. Specify these by value, or by using the * constant's name. For example, 'BICYCLING' or * google.maps.TravelMode.BICYCLING. * * Access by calling `const {TravelMode} = await * google.maps.importLibrary("routes")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum TravelMode { /** * Specifies a bicycling directions request. */ BICYCLING = 'BICYCLING', /** * Specifies a driving directions request. */ DRIVING = 'DRIVING', /** * Specifies a transit directions request. */ TRANSIT = 'TRANSIT', /** * Specifies a walking directions request. */ WALKING = 'WALKING', } /** * The valid unit systems that can be specified in a DirectionsRequest. * * Access by calling `const {UnitSystem} = await * google.maps.importLibrary("core")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum UnitSystem { /** * Specifies that distances in the DirectionsResult should be * expressed in imperial units. */ IMPERIAL = 0.0, /** * Specifies that distances in the DirectionsResult should be * expressed in metric units. */ METRIC = 1.0, } /** * Possible values for vehicle types. * * Access by calling `const {VehicleType} = await * google.maps.importLibrary("routes")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum VehicleType { /** * Bus. */ BUS = 'BUS', /** * A vehicle that operates on a cable, usually on the ground. Aerial cable * cars may be of the type GONDOLA_LIFT. */ CABLE_CAR = 'CABLE_CAR', /** * Commuter rail. */ COMMUTER_TRAIN = 'COMMUTER_TRAIN', /** * Ferry. */ FERRY = 'FERRY', /** * A vehicle that is pulled up a steep incline by a cable. */ FUNICULAR = 'FUNICULAR', /** * An aerial cable car. */ GONDOLA_LIFT = 'GONDOLA_LIFT', /** * Heavy rail. */ HEAVY_RAIL = 'HEAVY_RAIL', /** * High speed train. */ HIGH_SPEED_TRAIN = 'HIGH_SPEED_TRAIN', /** * Intercity bus. */ INTERCITY_BUS = 'INTERCITY_BUS', /** * Light rail. */ METRO_RAIL = 'METRO_RAIL', /** * Monorail. */ MONORAIL = 'MONORAIL', /** * Other vehicles. */ OTHER = 'OTHER', /** * Rail. */ RAIL = 'RAIL', /** * Share taxi is a sort of bus transport with ability to drop off and pick * up passengers anywhere on its route. Generally share taxi uses minibus * vehicles. */ SHARE_TAXI = 'SHARE_TAXI', /** * Underground light rail. */ SUBWAY = 'SUBWAY', /** * Above ground light rail. */ TRAM = 'TRAM', /** * Trolleybus. */ TROLLEYBUS = 'TROLLEYBUS', } /** * Contains the four points defining the four-sided polygon that is the * visible region of the map. On a vector map this polygon can be a trapezoid * instead of a rectangle, when a vector map has tilt. */ export interface VisibleRegion { farLeft: google.maps.LatLng; farRight: google.maps.LatLng; /** * The smallest bounding box that includes the visible region. */ latLngBounds: google.maps.LatLngBounds; nearLeft: google.maps.LatLng; nearRight: google.maps.LatLng; } export interface VisualizationLibrary { HeatmapLayer: typeof google.maps.visualization.HeatmapLayer; } /** * Drawing options. */ export interface WebGLDrawOptions { /** * The WebGLRenderingContext on which to render this WebGLOverlayView. */ gl: WebGLRenderingContext; /** * The matrix transformation from camera space to latitude/longitude * coordinates. */ transformer: google.maps.CoordinateTransformer; } /** * The WebGL Overlay View provides direct access to the same WebGL rendering * context Google Maps Platform uses to render the vector basemap. This use of * a shared rendering context provides benefits such as depth occlusion with * 3D building geometry, and the ability to sync 2D/3D content with basemap * rendering.

With WebGL Overlay View you can add content to your maps * using WebGL directly, or popular Graphics libraries like Three.js or * deck.gl. To use the overlay, you can extend * google.maps.WebGLOverlayView and provide an implementation for * each of the following lifecycle hooks: {@link * google.maps.WebGLOverlayView.onAdd}, {@link * google.maps.WebGLOverlayView.onContextRestored}, {@link * google.maps.WebGLOverlayView.onDraw}, {@link * google.maps.WebGLOverlayView.onContextLost} and {@link * google.maps.WebGLOverlayView.onRemove}.

You must call {@link * google.maps.WebGLOverlayView.setMap} with a valid {@link google.maps.Map} * object to trigger the call to the onAdd() method and * setMap(null) in order to trigger the onRemove() * method. The setMap() method can be called at the time of * construction or at any point afterward when the overlay should be re-shown * after removing. The onDraw() method will then be called * whenever a map property changes that could change the position of the * element, such as zoom, center, or map type. WebGLOverlayView may only be * added to a vector map having a {@link google.maps.MapOptions.mapId} * (including maps set to the {@link google.maps.RenderingType.VECTOR} {@link * google.maps.MapOptions.renderingType} and using {@link * google.maps.Map.DEMO_MAP_ID} as the {@link google.maps.MapOptions.mapId}). * * Access by calling `const {WebGLOverlayView} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class WebGLOverlayView extends google.maps.MVCObject { getMap(): google.maps.Map | null | undefined; /** * Implement this method to fetch or create intermediate data structures * before the overlay is drawn that don’t require immediate access to the * WebGL rendering context. This method must be implemented to render. */ onAdd(): void; /** * This method is called when the rendering context is lost for any reason, * and is where you should clean up any pre-existing GL state, since it is * no longer needed. */ onContextLost(): void; /** * This method is called once the rendering context is available. Use it to * initialize or bind any WebGL state such as shaders or buffer objects. * @param options that allow developers to restore the GL context. */ onContextRestored(options: google.maps.WebGLStateOptions): void; /** * Implement this method to draw WebGL content directly on the map. Note * that if the overlay needs a new frame drawn then call {@link * google.maps.WebGLOverlayView.requestRedraw}. * @param options that allow developers to render content to an associated * Google basemap. */ onDraw(options: google.maps.WebGLDrawOptions): void; /** * This method is called when the overlay is removed from the map with * WebGLOverlayView.setMap(null), and is where you should * remove all intermediate objects. This method must be implemented to * render. */ onRemove(): void; /** * Implement this method to handle any GL state updates outside of the * render animation frame. * @param options that allow developerse to restore the GL context. */ onStateUpdate(options: google.maps.WebGLStateOptions): void; /** * Triggers the map to redraw a frame. */ requestRedraw(): void; /** * Triggers the map to update GL state. */ requestStateUpdate(): void; /** * Adds the overlay to the map. * @param map The map to access the div, model and view state. */ setMap(map?: google.maps.Map | null): void; } /** * GL state options. */ export interface WebGLStateOptions { /** * The WebGLRenderingContext on which to render this WebGLOverlayView. */ gl: WebGLRenderingContext; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * This event is created from monitoring zoom change. * * Access by calling `const {ZoomChangeEvent} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class ZoomChangeEvent extends Event { /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * This event is created from monitoring zoom change. * * Access by calling `const {ZoomChangeEvent} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(); } /** * Options for the rendering of the zoom control. */ export interface ZoomControlOptions { /** * Position id. Used to specify the position of the control on the map. * @defaultValue {@link google.maps.ControlPosition.INLINE_END_BLOCK_END} */ position?: google.maps.ControlPosition | null; } /** * Namespace for all public event functions * * Access by calling `const {event} = await * google.maps.importLibrary("core")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class event { /** * Cross browser event handler registration. This listener is removed by * calling removeListener(handle) for the handle that is returned by this * function. * @deprecated google.maps.event.addDomListener() is * deprecated, use the standard addEventListener() * method instead. The feature will continue to work and there is no * plan to decommission it. */ static addDomListener( this: any, instance: object, eventName: string, handler: Function, capture?: boolean, ): google.maps.MapsEventListener; /** * Wrapper around addDomListener that removes the listener after the first * event. * @deprecated google.maps.event.addDomListenerOnce() is * deprecated, use the standard addEventListener() * method instead. The feature will continue to work and there is no * plan to decommission it. */ static addDomListenerOnce( this: any, instance: object, eventName: string, handler: Function, capture?: boolean, ): google.maps.MapsEventListener; /** * Adds the given listener function to the given event name for the given * object instance. Returns an identifier for this listener that can be used * with removeListener(). */ static addListener( this: any, instance: object, eventName: string, handler: Function, ): google.maps.MapsEventListener; /** * Like addListener, but the handler removes itself after handling the first * event. */ static addListenerOnce( this: any, instance: object, eventName: string, handler: Function, ): google.maps.MapsEventListener; /** * Removes all listeners for all events for the given instance. */ static clearInstanceListeners(this: any, instance: object): void; /** * Removes all listeners for the given event for the given instance. */ static clearListeners(this: any, instance: object, eventName: string): void; /** * Returns if there are listeners for the given event on the given instance. * Can be used to save the computation of expensive event details. */ static hasListeners( this: any, instance: object, eventName: string, ): boolean; /** * Removes the given listener, which should have been returned by * addListener above. Equivalent to calling listener.remove(). */ static removeListener( this: any, listener: google.maps.MapsEventListener, ): void; /** * Triggers the given event. All arguments after eventName are passed as * arguments to the listeners. */ static trigger( this: any, instance: object, eventName: string, ...eventArgs: any[] ): void; } /** * Loads a library * of the Maps JavaScript API, resolving with the direct members of that API * (without namespacing). (When loaded, libraries also add themselves to the * global google.maps namespace, though using the global * namespace is not generally recommended.) */ export function importLibrary( libraryName: string, ): Promise< | google.maps.CoreLibrary | google.maps.MapsLibrary | google.maps.Maps3DLibrary | google.maps.PlacesLibrary | google.maps.GeocodingLibrary | google.maps.RoutesLibrary | google.maps.MarkerLibrary | google.maps.GeometryLibrary | google.maps.ElevationLibrary | google.maps.StreetViewLibrary | google.maps.JourneySharingLibrary | google.maps.DrawingLibrary | google.maps.VisualizationLibrary >; /** * Google Maps JavaScript API version loaded by the browser. See https://developers.google.com/maps/documentation/javascript/versions */ export let version: string; } declare namespace google.maps.Data { /** * The properties of a addfeature event. */ export interface AddFeatureEvent { /** * The feature that was added to the FeatureCollection. */ feature: google.maps.Data.Feature; } /** * DataOptions object used to define the properties that a developer can set * on a Data object. */ export interface DataOptions { /** * The position of the drawing controls on the map. * @defaultValue {@link google.maps.ControlPosition.TOP_LEFT} */ controlPosition?: google.maps.ControlPosition; /** * Describes which drawing modes are available for the user to select, in * the order they are displayed. This should not include the * null drawing mode, which is added by default. If * null, drawing controls are disabled and not displayed. * Possible drawing modes are "Point", * "LineString" or "Polygon". * @defaultValue null */ controls?: string[] | null; /** * The current drawing mode of the given Data layer. A drawing mode of * null means that the user can interact with the map as * normal, and clicks do not draw anything. Possible drawing modes are * null, "Point", "LineString" or * "Polygon". * @defaultValue null */ drawingMode?: string | null; /** * When drawing is enabled and a user draws a Geometry (a Point, Line String * or Polygon), this function is called with that Geometry and should return * a Feature that is to be added to the Data layer. If a featureFactory is * not supplied, a Feature with no id and no properties will be created from * that Geometry instead. Defaults to null. */ featureFactory?: | ((a: google.maps.Data.Geometry) => google.maps.Data.Feature) | null; /** * Map on which to display the features in the collection. */ map: google.maps.Map; /** * Style for all features in the collection. For more details, see the * setStyle() method above. */ style?: google.maps.Data.StylingFunction | google.maps.Data.StyleOptions; } /** * A feature has a geometry, an id, and a set of properties. * * Access by calling `const {Data} = await google.maps.importLibrary("maps")`. * See https://developers.google.com/maps/documentation/javascript/libraries. */ export class Feature { /** * A feature has a geometry, an id, and a set of properties. * * Access by calling `const {Data} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(options?: google.maps.Data.FeatureOptions | null); /** * Repeatedly invokes the given function, passing a property value and name * on each invocation. The order of iteration through the properties is * undefined. */ forEachProperty(callback: (a: unknown, b: string) => void): void; /** * Returns the feature's geometry. */ getGeometry(): google.maps.Data.Geometry | null; /** * Returns the feature ID. */ getId(): number | string | undefined; /** * Returns the value of the requested property, or undefined if * the property does not exist. */ getProperty(name: string): unknown; /** * Removes the property with the given name. */ removeProperty(name: string): void; /** * Sets the feature's geometry. */ setGeometry( newGeometry: | google.maps.Data.Geometry | null | google.maps.LatLng | google.maps.LatLngLiteral, ): void; /** * Sets the value of the specified property. If newValue is * undefined this is equivalent to calling * removeProperty. */ setProperty(name: string, newValue: unknown): void; /** * Exports the feature to a GeoJSON object. */ toGeoJson(callback: (a: object) => void): void; } /** * Optional parameters for creating Data.Feature objects. */ export interface FeatureOptions { /** * The feature geometry. If none is specified when a feature is constructed, * the feature's geometry will be null. If a * LatLng object or LatLngLiteral is given, this * will be converted to a Data.Point geometry. */ geometry?: | google.maps.Data.Geometry | null | google.maps.LatLng | google.maps.LatLngLiteral; /** * Feature ID is optional. If provided, it can be used to look up the * feature in a Data object using the * getFeatureById() method. Note that a feature's ID cannot * be subsequently changed. */ id?: number | string; /** * The feature properties. This is an arbitrary mapping of property names to * values. */ properties?: object | null; } /** * Optional parameters for importing GeoJSON. */ export interface GeoJsonOptions { /** * The name of the Feature property to use as the feature ID. If not * specified, the GeoJSON Feature id will be used. */ idPropertyName?: string | null; } /** * A superclass for the various geometry objects. */ export interface Geometry { /** * Repeatedly invokes the given function, passing a point from the geometry * to the function on each invocation. */ forEachLatLng(callback: (a: google.maps.LatLng) => void): void; /** * Returns the type of the geometry object. Possibilities are * "Point", "MultiPoint", * "LineString", "MultiLineString", * "LinearRing", "Polygon", * "MultiPolygon", or "GeometryCollection". */ getType(): string; } /** * A GeometryCollection contains a number of geometry objects. Any * LatLng or LatLngLiteral objects are automatically * converted to Data.Point geometry objects. * * Access by calling `const {Data} = await google.maps.importLibrary("maps")`. * See https://developers.google.com/maps/documentation/javascript/libraries. */ export class GeometryCollection implements google.maps.Data.Geometry { /** * A GeometryCollection contains a number of geometry objects. Any * LatLng or LatLngLiteral objects are * automatically converted to Data.Point geometry objects. * * Access by calling `const {Data} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor( elements: ( | google.maps.Data.Geometry | google.maps.LatLng | google.maps.LatLngLiteral )[], ); forEachLatLng(callback: (a: google.maps.LatLng) => void): void; /** * Returns an array of the contained geometry objects. A new array is * returned each time getArray() is called. */ getArray(): google.maps.Data.Geometry[]; /** * Returns the n-th contained geometry object. */ getAt(n: number): google.maps.Data.Geometry; /** * Returns the number of contained geometry objects. */ getLength(): number; /** * Returns the string "GeometryCollection". */ getType(): string; } /** * A LineString geometry contains a number of LatLngs. * * Access by calling `const {Data} = await google.maps.importLibrary("maps")`. * See https://developers.google.com/maps/documentation/javascript/libraries. */ export class LineString implements google.maps.Data.Geometry { /** * A LineString geometry contains a number of LatLngs. * * Access by calling `const {Data} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(elements: (google.maps.LatLng | google.maps.LatLngLiteral)[]); forEachLatLng(callback: (a: google.maps.LatLng) => void): void; /** * Returns an array of the contained LatLngs. A new array is * returned each time getArray() is called. */ getArray(): google.maps.LatLng[]; /** * Returns the n-th contained LatLng. */ getAt(n: number): google.maps.LatLng; /** * Returns the number of contained LatLngs. */ getLength(): number; /** * Returns the string "LineString". */ getType(): string; } /** * A LinearRing geometry contains a number of LatLngs, * representing a closed LineString. There is no need to make the first * LatLng equal to the last LatLng. The LinearRing * is closed implicitly. * * Access by calling `const {Data} = await google.maps.importLibrary("maps")`. * See https://developers.google.com/maps/documentation/javascript/libraries. */ export class LinearRing implements google.maps.Data.Geometry { /** * A LinearRing geometry contains a number of LatLngs, * representing a closed LineString. There is no need to make the first * LatLng equal to the last LatLng. The LinearRing * is closed implicitly. * * Access by calling `const {Data} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(elements: (google.maps.LatLng | google.maps.LatLngLiteral)[]); forEachLatLng(callback: (a: google.maps.LatLng) => void): void; /** * Returns an array of the contained LatLngs. A new array is * returned each time getArray() is called. */ getArray(): google.maps.LatLng[]; /** * Returns the n-th contained LatLng. */ getAt(n: number): google.maps.LatLng; /** * Returns the number of contained LatLngs. */ getLength(): number; /** * Returns the string "LinearRing". */ getType(): string; } /** * This object is passed to mouse event handlers on a Data * object. */ export interface MouseEvent extends google.maps.MapMouseEvent { /** * The feature which generated the mouse event. */ feature: google.maps.Data.Feature; } /** * A MultiLineString geometry contains a number of LineStrings. * * Access by calling `const {Data} = await google.maps.importLibrary("maps")`. * See https://developers.google.com/maps/documentation/javascript/libraries. */ export class MultiLineString implements google.maps.Data.Geometry { /** * A MultiLineString geometry contains a number of LineStrings. * * Access by calling `const {Data} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor( elements: ( | google.maps.Data.LineString | (google.maps.LatLng | google.maps.LatLngLiteral)[] )[], ); forEachLatLng(callback: (a: google.maps.LatLng) => void): void; /** * Returns an array of the contained Data.LineStrings. A new * array is returned each time getArray() is called. */ getArray(): google.maps.Data.LineString[]; /** * Returns the n-th contained Data.LineString. */ getAt(n: number): google.maps.Data.LineString; /** * Returns the number of contained Data.LineStrings. */ getLength(): number; /** * Returns the string "MultiLineString". */ getType(): string; } /** * A MultiPoint geometry contains a number of LatLngs. * * Access by calling `const {Data} = await google.maps.importLibrary("maps")`. * See https://developers.google.com/maps/documentation/javascript/libraries. */ export class MultiPoint implements google.maps.Data.Geometry { /** * A MultiPoint geometry contains a number of LatLngs. * * Access by calling `const {Data} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(elements: (google.maps.LatLng | google.maps.LatLngLiteral)[]); forEachLatLng(callback: (a: google.maps.LatLng) => void): void; /** * Returns an array of the contained LatLngs. A new array is * returned each time getArray() is called. */ getArray(): google.maps.LatLng[]; /** * Returns the n-th contained LatLng. */ getAt(n: number): google.maps.LatLng; /** * Returns the number of contained LatLngs. */ getLength(): number; /** * Returns the string "MultiPoint". */ getType(): string; } /** * A MultiPolygon geometry contains a number of Data.Polygons. * * Access by calling `const {Data} = await google.maps.importLibrary("maps")`. * See https://developers.google.com/maps/documentation/javascript/libraries. */ export class MultiPolygon implements google.maps.Data.Geometry { /** * A MultiPolygon geometry contains a number of Data.Polygons. * * Access by calling `const {Data} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor( elements: ( | google.maps.Data.Polygon | ( | google.maps.Data.LinearRing | (google.maps.LatLng | google.maps.LatLngLiteral)[] )[] )[], ); forEachLatLng(callback: (a: google.maps.LatLng) => void): void; /** * Returns an array of the contained Data.Polygons. A new array * is returned each time getArray() is called. */ getArray(): google.maps.Data.Polygon[]; /** * Returns the n-th contained Data.Polygon. */ getAt(n: number): google.maps.Data.Polygon; /** * Returns the number of contained Data.Polygons. */ getLength(): number; /** * Returns the string "MultiPolygon". */ getType(): string; } /** * A Point geometry contains a single LatLng. * * Access by calling `const {Data} = await google.maps.importLibrary("maps")`. * See https://developers.google.com/maps/documentation/javascript/libraries. */ export class Point implements google.maps.Data.Geometry { /** * A Point geometry contains a single LatLng. * * Access by calling `const {Data} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(latLng: google.maps.LatLng | google.maps.LatLngLiteral); forEachLatLng(callback: (a: google.maps.LatLng) => void): void; /** * Returns the contained LatLng. */ get(): google.maps.LatLng; /** * Returns the string "Point". */ getType(): string; } /** * A Polygon geometry contains a number of Data.LinearRings. The * first linear-ring must be the polygon exterior boundary and subsequent * linear-rings must be interior boundaries, also known as holes. See the sample * polygon with a hole. * * Access by calling `const {Data} = await google.maps.importLibrary("maps")`. * See https://developers.google.com/maps/documentation/javascript/libraries. */ export class Polygon implements google.maps.Data.Geometry { /** * A Polygon geometry contains a number of Data.LinearRings. * The first linear-ring must be the polygon exterior boundary and * subsequent linear-rings must be interior boundaries, also known as holes. * See the sample * polygon with a hole. * * Access by calling `const {Data} = await * google.maps.importLibrary("maps")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor( elements: ( | google.maps.Data.LinearRing | (google.maps.LatLng | google.maps.LatLngLiteral)[] )[], ); forEachLatLng(callback: (a: google.maps.LatLng) => void): void; /** * Returns an array of the contained Data.LinearRings. A new * array is returned each time getArray() is called. */ getArray(): google.maps.Data.LinearRing[]; /** * Returns the n-th contained Data.LinearRing. */ getAt(n: number): google.maps.Data.LinearRing; /** * Returns the number of contained Data.LinearRings. */ getLength(): number; /** * Returns the string "Polygon". */ getType(): string; } /** * The properties of a removefeature event. */ export interface RemoveFeatureEvent { /** * The feature that was removed from the FeatureCollection. */ feature: google.maps.Data.Feature; } /** * The properties of a removeproperty event. */ export interface RemovePropertyEvent { /** * The feature whose property was removed. */ feature: google.maps.Data.Feature; /** * The property name. */ name: string; /** * The previous value. */ oldValue: unknown; } /** * The properties of a setgeometry event. */ export interface SetGeometryEvent { /** * The feature whose geometry was set. */ feature: google.maps.Data.Feature; /** * The new feature geometry. */ newGeometry?: google.maps.Data.Geometry; /** * The previous feature geometry. */ oldGeometry?: google.maps.Data.Geometry; } /** * The properties of a setproperty event. */ export interface SetPropertyEvent { /** * The feature whose property was set. */ feature: google.maps.Data.Feature; /** * The property name. */ name: string; /** * The new value. */ newValue: unknown; /** * The previous value. Will be undefined if the property was * added. */ oldValue: unknown; } /** * These options specify the way a Feature should appear when displayed on a * map. */ export interface StyleOptions { /** * The animation to play when marker is added to a map. Only applies to * point geometries. */ animation?: google.maps.Animation; /** * If true, the marker receives mouse and touch events. * @defaultValue true */ clickable?: boolean; /** * Mouse cursor to show on hover. Only applies to point geometries. */ cursor?: string; /** * If true, the object can be dragged across the map and the * underlying feature will have its geometry updated. * @defaultValue false */ draggable?: boolean; /** * If true, the object can be edited by dragging control points * and the underlying feature will have its geometry updated. Only applies * to LineString and Polygon geometries. * @defaultValue false */ editable?: boolean; /** * The fill color. All CSS3 colors are supported except for extended named * colors. Only applies to polygon geometries. */ fillColor?: string; /** * The fill opacity between 0.0 and 1.0. Only applies to polygon geometries. */ fillOpacity?: number; /** * Icon for the foreground. If a string is provided, it is treated as though * it were an Icon with the string as url. Only * applies to point geometries. */ icon?: string | google.maps.Icon | google.maps.Symbol; /** * The icons to be rendered along a polyline. Only applies to line * geometries. */ icons?: google.maps.IconSequence[]; /** * Adds a label to the marker. The label can either be a string, or a * MarkerLabel object. Only applies to point geometries. */ label?: string | google.maps.MarkerLabel; /** * The marker's opacity between 0.0 and 1.0. Only applies to point * geometries. */ opacity?: number; /** * Defines the image map used for hit detection. Only applies to point * geometries. */ shape?: google.maps.MarkerShape; /** * The stroke color. All CSS3 colors are supported except for extended named * colors. Only applies to line and polygon geometries. */ strokeColor?: string; /** * The stroke opacity between 0.0 and 1.0. Only applies to line and polygon * geometries. */ strokeOpacity?: number; /** * The stroke width in pixels. Only applies to line and polygon geometries. */ strokeWeight?: number; /** * Rollover text. Only applies to point geometries. */ title?: string; /** * Whether the feature is visible. * @defaultValue true */ visible?: boolean; /** * All features are displayed on the map in order of their zIndex, with * higher values displaying in front of features with lower values. Markers * are always displayed in front of line-strings and polygons. */ zIndex?: number; } export type StylingFunction = ( a: google.maps.Data.Feature, ) => google.maps.Data.StyleOptions; } declare namespace google.maps.drawing { /** * Options for the rendering of the drawing control. */ export interface DrawingControlOptions { /** * The drawing modes to display in the drawing control, in the order in * which they are to be displayed. The hand icon (which corresponds to the * null drawing mode) is always available and is not to be * specified in this array. * @defaultValue [{@link * google.maps.drawing.OverlayType.MARKER}, {@link * google.maps.drawing.OverlayType.POLYLINE}, {@link * google.maps.drawing.OverlayType.RECTANGLE}, {@link * google.maps.drawing.OverlayType.CIRCLE}, {@link * google.maps.drawing.OverlayType.POLYGON}] */ drawingModes?: google.maps.drawing.OverlayType[] | null; /** * Position id. Used to specify the position of the control on the map. * @defaultValue {@link google.maps.ControlPosition.TOP_LEFT} */ position?: google.maps.ControlPosition | null; } /** * Allows users to draw markers, polygons, polylines, rectangles, and circles * on the map. The DrawingManager's drawing mode defines the * type of overlay that will be created by the user. Adds a control to the * map, allowing the user to switch drawing mode. * * Access by calling `const {DrawingManager} = await * google.maps.importLibrary("drawing")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class DrawingManager extends google.maps.MVCObject { /** * Allows users to draw markers, polygons, polylines, rectangles, and * circles on the map. The DrawingManager's drawing mode * defines the type of overlay that will be created by the user. Adds a * control to the map, allowing the user to switch drawing mode. * * Access by calling `const {DrawingManager} = await * google.maps.importLibrary("drawing")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(options?: google.maps.drawing.DrawingManagerOptions | null); /** * Returns the DrawingManager's drawing mode. */ getDrawingMode(): google.maps.drawing.OverlayType | null; /** * Returns the Map to which the DrawingManager is * attached, which is the Map on which the overlays created * will be placed. */ getMap(): google.maps.Map | null; /** * Changes the DrawingManager's drawing mode, which defines * the type of overlay to be added on the map. Accepted values are * 'marker', 'polygon', 'polyline', * 'rectangle', 'circle', or null. A * drawing mode of null means that the user can interact with * the map as normal, and clicks do not draw anything. */ setDrawingMode(drawingMode: google.maps.drawing.OverlayType | null): void; /** * Attaches the DrawingManager object to the specified * Map. */ setMap(map: google.maps.Map | null): void; /** * Sets the DrawingManager's options. */ setOptions(options: google.maps.drawing.DrawingManagerOptions | null): void; } /** * Options for the drawing manager. */ export interface DrawingManagerOptions { /** * Options to apply to any new circles created with this * DrawingManager. The center and * radius properties are ignored, and the map * property of a new circle is always set to the * DrawingManager's map. */ circleOptions?: google.maps.CircleOptions | null; /** * The enabled/disabled state of the drawing control. * @defaultValue true */ drawingControl?: boolean | null; /** * The display options for the drawing control. */ drawingControlOptions?: google.maps.drawing.DrawingControlOptions | null; /** * The DrawingManager's drawing mode, which defines the * type of overlay to be added on the map. Accepted values are * 'marker', 'polygon', 'polyline', * 'rectangle', 'circle', or null. A * drawing mode of null means that the user can interact with * the map as normal, and clicks do not draw anything. */ drawingMode?: google.maps.drawing.OverlayType | null; /** * The Map to which the DrawingManager is * attached, which is the Map on which the overlays created * will be placed. */ map?: google.maps.Map | null; /** * Options to apply to any new markers created with this * DrawingManager. The position property is * ignored, and the map property of a new marker is always set * to the DrawingManager's map. */ markerOptions?: google.maps.MarkerOptions | null; /** * Options to apply to any new polygons created with this * DrawingManager. The paths property is ignored, * and the map property of a new polygon is always set to the * DrawingManager's map. */ polygonOptions?: google.maps.PolygonOptions | null; /** * Options to apply to any new polylines created with this * DrawingManager. The path property is ignored, * and the map property of a new polyline is always set to the * DrawingManager's map. */ polylineOptions?: google.maps.PolylineOptions | null; /** * Options to apply to any new rectangles created with this * DrawingManager. The bounds property is ignored, * and the map property of a new rectangle is always set to the * DrawingManager's map. */ rectangleOptions?: google.maps.RectangleOptions | null; } /** * The properties of an overlaycomplete event on a * DrawingManager. */ export interface OverlayCompleteEvent { /** * The completed overlay. */ overlay: | google.maps.Marker | google.maps.Polygon | google.maps.Polyline | google.maps.Rectangle | google.maps.Circle; /** * The completed overlay's type. */ type: google.maps.drawing.OverlayType; } /** * The types of overlay that may be created by the * DrawingManager. Specify these by value, or by using the * constant's name. For example, 'polygon' or * google.maps.drawing.OverlayType.POLYGON. * * Access by calling `const {OverlayType} = await * google.maps.importLibrary("drawing")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum OverlayType { /** * Specifies that the DrawingManager creates circles, and that * the overlay given in the overlaycomplete event is a circle. */ CIRCLE = 'circle', /** * Specifies that the DrawingManager creates markers, and that * the overlay given in the overlaycomplete event is a marker. */ MARKER = 'marker', /** * Specifies that the DrawingManager creates polygons, and that * the overlay given in the overlaycomplete event is a polygon. */ POLYGON = 'polygon', /** * Specifies that the DrawingManager creates polylines, and * that the overlay given in the overlaycomplete event is a * polyline. */ POLYLINE = 'polyline', /** * Specifies that the DrawingManager creates rectangles, and * that the overlay given in the overlaycomplete event is a * rectangle. */ RECTANGLE = 'rectangle', } } declare namespace google.maps.geometry.encoding { /** * Decodes an encoded path string into a sequence of LatLngs. */ export function decodePath(encodedPath: string): google.maps.LatLng[]; /** * Encodes a sequence of LatLngs into an encoded path string. */ export function encodePath( path: | (google.maps.LatLng | google.maps.LatLngLiteral)[] | google.maps.MVCArray, ): string; } declare namespace google.maps.geometry.poly { /** * Computes whether the given point lies inside the specified polygon. */ export function containsLocation( point: google.maps.LatLng | google.maps.LatLngLiteral, polygon: google.maps.Polygon, ): boolean; /** * Computes whether the given point lies on or near to a polyline, or the edge * of a polygon, within a specified tolerance. Returns true when * the difference between the latitude and longitude of the supplied point, * and the closest point on the edge, is less than the tolerance. The * tolerance defaults to 10-9 degrees. */ export function isLocationOnEdge( point: google.maps.LatLng | google.maps.LatLngLiteral, poly: google.maps.Polygon | google.maps.Polyline, tolerance?: number, ): boolean; } declare namespace google.maps.geometry.spherical { /** * Returns the unsigned area of a closed path, in the range [0, 2×pi×radius²]. * The computed area uses the same units as the radius. The * radiusOfSphere defaults to the Earth's radius in meters, * in which case the area is in square meters. Passing a Circle * requires the radius to be set to a non-negative value. * Additionally, the Circle must not cover more than 100% of the sphere. And * when passing a LatLngBounds, the southern LatLng cannot be * more north than the northern LatLng. */ export function computeArea( path: | (google.maps.LatLng | google.maps.LatLngLiteral)[] | google.maps.MVCArray | google.maps.Circle | google.maps.CircleLiteral | google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral, radiusOfSphere?: number, ): number; /** * Returns the distance, in meters, between two LatLngs. You can optionally * specify a custom radius. The radius defaults to the radius of the Earth. */ export function computeDistanceBetween( from: google.maps.LatLng | google.maps.LatLngLiteral, to: google.maps.LatLng | google.maps.LatLngLiteral, radius?: number, ): number; /** * Returns the heading from one LatLng to another LatLng. Headings are * expressed in degrees clockwise from North within the range [-180,180). */ export function computeHeading( from: google.maps.LatLng | google.maps.LatLngLiteral, to: google.maps.LatLng | google.maps.LatLngLiteral, ): number; /** * Returns the length of the given path. */ export function computeLength( path: | (google.maps.LatLng | google.maps.LatLngLiteral)[] | google.maps.MVCArray, radius?: number, ): number; /** * Returns the LatLng resulting from moving a distance from an origin in the * specified heading (expressed in degrees clockwise from north). */ export function computeOffset( from: google.maps.LatLng | google.maps.LatLngLiteral, distance: number, heading: number, radius?: number, ): google.maps.LatLng; /** * Returns the location of origin when provided with a LatLng destination, * meters travelled and original heading. Headings are expressed in degrees * clockwise from North. This function returns null when no * solution is available. */ export function computeOffsetOrigin( to: google.maps.LatLng | google.maps.LatLngLiteral, distance: number, heading: number, radius?: number, ): google.maps.LatLng | null; /** * Returns the signed area of a closed path, where counterclockwise is * positive, in the range [-2×pi×radius², 2×pi×radius²]. The computed area * uses the same units as the radius. The radius defaults to the Earth's * radius in meters, in which case the area is in square meters.

The * area is computed using the parallel transport * method; the parallel transport around a closed path on the unit sphere * twists by an angle that is equal to the area enclosed by the path. This is * simpler and more accurate and robust than triangulation using Girard, * l'Huilier, or Eriksson on each triangle. In particular, since it * doesn't triangulate, it suffers no instability except in the * unavoidable case when an edge (not a diagonal) of the polygon * spans 180 degrees. */ export function computeSignedArea( loop: | (google.maps.LatLng | google.maps.LatLngLiteral)[] | google.maps.MVCArray, radius?: number, ): number; /** * Returns the LatLng which lies the given fraction of the way between the * origin LatLng and the destination LatLng. */ export function interpolate( from: google.maps.LatLng | google.maps.LatLngLiteral, to: google.maps.LatLng | google.maps.LatLngLiteral, fraction: number, ): google.maps.LatLng; } declare namespace google.maps.journeySharing { /** * The auth token returned by the token fetcher. */ export interface AuthToken { /** * The expiration time in seconds. A token expires in this amount of time * after fetching. */ expiresInSeconds: number; /** * The token. */ token: string; } /** * Contains additional information needed to mint JSON Web Tokens. */ export interface AuthTokenContext { /** * When provided, the minted token should have a private * DeliveryVehicleId claim for the provided deliveryVehicleId. */ deliveryVehicleId?: string | null; /** * When provided, the minted token should have a private TaskId * claim for the provided taskId. */ taskId?: string | null; /** * When provided, the minted token should have a private * TrackingId claim for the provided trackingId. */ trackingId?: string | null; /** * When provided, the minted token should have a private TripId * claim for the provided tripId. */ tripId?: string | null; /** * When provided, the minted token should have a private * VehicleId claim for the provided vehicleId. */ vehicleId?: string | null; } export type AuthTokenFetcher = ( a: google.maps.journeySharing.AuthTokenFetcherOptions, ) => Promise; /** * Options for the auth token fetcher. */ export interface AuthTokenFetcherOptions { /** * The auth token context. IDs specified in the context should be added to * the request sent to the JSON Web Token minting endpoint. */ context: google.maps.journeySharing.AuthTokenContext; /** * The Fleet Engine service type. */ serviceType: google.maps.journeySharing.FleetEngineServiceType; } /** * Automatic viewport mode. * * Access by calling `const {AutomaticViewportMode} = await * google.maps.importLibrary("journeySharing")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum AutomaticViewportMode { /** * Automatically adjust the viewport to fit markers and any visible * anticipated route polylines. This is the default. */ FIT_ANTICIPATED_ROUTE = 'FIT_ANTICIPATED_ROUTE', /** * Do not automatically adjust the viewport. */ NONE = 'NONE', } /** * MarkerSetup default options. * @deprecated Marker setup is deprecated. Use the * MarkerCustomizationFunction methods for your location * provider instead. */ export interface DefaultMarkerSetupOptions { /** * Default marker options. */ defaultMarkerOptions: google.maps.MarkerOptions; } /** * PolylineSetup default options. * @deprecated Polyline setup is deprecated. Use the * PolylineCustomizationFunction methods for your location * provider instead. */ export interface DefaultPolylineSetupOptions { /** * Default polyline options. */ defaultPolylineOptions: google.maps.PolylineOptions; /** * Default polyline visibility. */ defaultVisible: boolean; } /** * The details for a delivery vehicle returned by Fleet Engine. */ export interface DeliveryVehicle { /** * Custom delivery vehicle attributes. */ attributes: {[key: string]: string | null}; /** * The location where the current route segment ends. */ currentRouteSegmentEndPoint: google.maps.LatLngLiteral | null; /** * The last reported location of the delivery vehicle. */ latestVehicleLocationUpdate: google.maps.journeySharing.VehicleLocationUpdate | null; /** * In the format * "providers/{provider_id}/deliveryVehicles/{delivery_vehicle_id}". * The delivery_vehicle_id must be a unique identifier. */ name: string; /** * The current navigation status of the vehicle. */ navigationStatus: string; /** * The remaining driving distance in the current route segment, in meters. */ remainingDistanceMeters: number; /** * The remaining driving duration in the current route segment, in * milliseconds. */ remainingDurationMillis: number | null; /** * The journey segments assigned to this delivery vehicle, starting from the * vehicle's most recently reported location. This is only populated * when the {@link google.maps.journeySharing.DeliveryVehicle} data object * is provided through {@link * google.maps.journeySharing.FleetEngineDeliveryVehicleLocationProvider}. */ remainingVehicleJourneySegments: google.maps.journeySharing.VehicleJourneySegment[]; } /** * Parameters specific to marker customization functions that apply options to * delivery vehicle markers. Used by {@link * google.maps.journeySharing.FleetEngineDeliveryVehicleLocationProviderOptions.deliveryVehicleMarkerCustomization} * and {@link * google.maps.journeySharing.FleetEngineDeliveryFleetLocationProviderOptions.deliveryVehicleMarkerCustomization}. */ export interface DeliveryVehicleMarkerCustomizationFunctionParams extends google.maps.journeySharing.MarkerCustomizationFunctionParams { /** * The delivery vehicle represented by this marker. */ vehicle: google.maps.journeySharing.DeliveryVehicle; } /** * Parameters specific to polyline customization functions for {@link * google.maps.journeySharing.FleetEngineDeliveryVehicleLocationProvider}. */ export interface DeliveryVehiclePolylineCustomizationFunctionParams extends google.maps.journeySharing.PolylineCustomizationFunctionParams { /** * The delivery vehicle traversing through this polyline. */ deliveryVehicle: google.maps.journeySharing.DeliveryVehicle; } /** * DeliveryVehicleStop type */ export interface DeliveryVehicleStop { /** * The location of the stop. */ plannedLocation: google.maps.LatLngLiteral | null; /** * The state of the stop. */ state: google.maps.journeySharing.DeliveryVehicleStopState | null; /** * The list of Tasks to be performed at this stop.
  • id: * the ID of the task.
  • extraDurationMillis: the extra time * it takes to perform the task, in milliseconds.
*/ tasks: google.maps.journeySharing.TaskInfo[]; } /** * The current state of a {@link * google.maps.journeySharing.DeliveryVehicleStop}. * * Access by calling `const {DeliveryVehicleStopState} = await * google.maps.importLibrary("journeySharing")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum DeliveryVehicleStopState { /** * Arrived at stop. Assumes that when the vehicle is routing to the next * stop, that all previous stops have been completed. */ ARRIVED = 'ARRIVED', /** * Assigned and actively routing. */ ENROUTE = 'ENROUTE', /** * Created, but not actively routing. */ NEW = 'NEW', /** * Unknown. */ UNSPECIFIED = 'UNSPECIFIED', } /** * Delivery Fleet Location Provider. * * Access by calling `const {FleetEngineDeliveryFleetLocationProvider} = await * google.maps.importLibrary("journeySharing")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class FleetEngineDeliveryFleetLocationProvider extends google.maps .journeySharing.PollingLocationProvider { /** * Delivery Fleet Location Provider. * * Access by calling `const {FleetEngineDeliveryFleetLocationProvider} = * await google.maps.importLibrary("journeySharing")`. See * https://developers.google.com/maps/documentation/javascript/libraries. * @param options Options to pass to the location provider. */ constructor( options: google.maps.journeySharing.FleetEngineDeliveryFleetLocationProviderOptions, ); /** * The filter applied when fetching the delivery vehicles. */ deliveryVehicleFilter?: string | null; /** * The bounds within which to track delivery vehicles. If no bounds are set, * no delivery vehicles will be tracked. To track all delivery vehicles * regardless of location, set bounds equivalent to the entire earth. */ locationRestriction?: | google.maps.LatLngBounds | null | google.maps.LatLngBoundsLiteral; /** * This Field is read-only. Threshold for stale vehicle location. If the * last updated location for the vehicle is older than this threshold, the * vehicle will not be displayed. */ staleLocationThresholdMillis: number; } /** * Options for delivery fleet location provider. */ export interface FleetEngineDeliveryFleetLocationProviderOptions { /** * Provides JSON Web Tokens for authenticating the client to Fleet Engine. */ authTokenFetcher( this: any, a: google.maps.journeySharing.AuthTokenFetcherOptions, ): Promise; /** * A filter query to apply when fetching delivery vehicles. This filter is * passed directly to Fleet Engine.

See ListDeliveryVehiclesRequest.filter for * supported formats.

Note that valid filters for attributes must * have the "attributes" prefix. For example, attributes.x = * "y" or attributes."x y" = * "z". */ deliveryVehicleFilter: string | null; /** * Customization applied to a delivery vehicle marker.

Use this * field to specify custom styling (such as marker icon) and interactivity * (such as click handling).
  • If a {@link google.maps.MarkerOptions} * object is specified, the changes specified in it are applied to the * marker after the marker has been created, overwriting its default options * if they exist.
  • If a function is specified, it is invoked once * when the marker is created, before it is added to the map view. (On this * invocation, the isNew parameter in the function parameters * object is set to true.) Additionally, this function is * invoked when the location provider receives data from Fleet Engine, * regardless of whether the data corresponding to this marker have * changed.

    See {@link * google.maps.journeySharing.DeliveryVehicleMarkerCustomizationFunctionParams} * for a list of supplied parameters and their uses.
*/ deliveryVehicleMarkerCustomization?: | (( a: google.maps.journeySharing.DeliveryVehicleMarkerCustomizationFunctionParams, ) => void) | null; /** * The latitude/longitude bounds within which to track vehicles immediately * after the location provider is instantiated. If not set, the location * provider does not start tracking any vehicles; use {@link * google.maps.journeySharing.FleetEngineDeliveryFleetLocationProvider.locationRestriction} * to set the bounds and begin tracking. To track all delivery vehicles * regardless of location, set bounds equivalent to the entire earth. */ locationRestriction: | google.maps.LatLngBounds | null | google.maps.LatLngBoundsLiteral; /** * The consumer's project ID from Google Cloud Console. */ projectId: string; /** * Threshold for stale vehicle location. If the last updated location for * the vehicle is older this threshold, the vehicle will not be displayed. * Defaults to 24 hours in milliseconds. If the threshold is less than zero, * or Infinity, the threshold will be ignored and the vehicle * location will not be considered stale. */ staleLocationThresholdMillis: number | null; } /** * The event object passed to the event handler when the {@link * google.maps.journeySharing.FleetEngineDeliveryFleetLocationProvider.update} * event is triggered. */ export interface FleetEngineDeliveryFleetLocationProviderUpdateEvent { /** * The list of delivery vehicles returned by the query. Unmodifiable. */ deliveryVehicles: google.maps.journeySharing.DeliveryVehicle[] | null; } /** * Delivery Vehicle Location Provider. * * Access by calling `const {FleetEngineDeliveryVehicleLocationProvider} = * await google.maps.importLibrary("journeySharing")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class FleetEngineDeliveryVehicleLocationProvider extends google.maps .journeySharing.PollingLocationProvider { /** * Delivery Vehicle Location Provider. * * Access by calling `const {FleetEngineDeliveryVehicleLocationProvider} = * await google.maps.importLibrary("journeySharing")`. See * https://developers.google.com/maps/documentation/javascript/libraries. * @param options Options to pass to the location provider. */ constructor( options: google.maps.journeySharing.FleetEngineDeliveryVehicleLocationProviderOptions, ); /** * ID for the vehicle that this location provider observes. Set this field * to track a vehicle. */ deliveryVehicleId: string; /** * Optionally allow users to display the task's outcome location. */ shouldShowOutcomeLocations: boolean | null; /** * Optionally allow users to display fetched tasks. */ shouldShowTasks: boolean | null; /** * This Field is read-only. Threshold for stale vehicle location. If the * last updated location for the vehicle is older than this threshold, the * vehicle will not be displayed. */ staleLocationThresholdMillis: number; /** * Returns the filter options to apply when fetching tasks. */ taskFilterOptions: google.maps.journeySharing.FleetEngineTaskFilterOptions; } /** * Options for delivery vehicle location provider. */ export interface FleetEngineDeliveryVehicleLocationProviderOptions { /** * Customization applied to the active polyline. An active polyline * corresponds to a portion of the route the vehicle is currently traversing * through.

Use this field to specify custom styling (such as * polyline color) and interactivity (such as click handling).
  • If * a {@link google.maps.PolylineOptions} object is specified, the changes * specified in it are applied to the polyline after the polyline has been * created, overwriting its default options if they exist.
  • If a * function is specified, it is invoked once when the polyline is created. * (On this invocation, the isNew parameter in the function * parameters object is set to true.) Additionally, this * function is invoked when the polyline's coordinates change, or when * the location provider receives data from Fleet Engine, regardless of * whether the data corresponding to this polyline have * changed.

    See {@link * google.maps.journeySharing.DeliveryVehiclePolylineCustomizationFunctionParams} * for a list of supplied parameters and their uses.
*/ activePolylineCustomization?: | (( a: google.maps.journeySharing.DeliveryVehiclePolylineCustomizationFunctionParams, ) => void) | google.maps.PolylineOptions | null; /** * Provides JSON Web Tokens for authenticating the client to Fleet Engine. */ authTokenFetcher( this: any, a: google.maps.journeySharing.AuthTokenFetcherOptions, ): Promise; /** * The delivery vehicle ID to track immediately after the location provider * is instantiated. If not specified, the location provider does not start * tracking any vehicle; use {@link * google.maps.journeySharing.FleetEngineDeliveryVehicleLocationProvider.deliveryVehicleId} * to set the ID and begin tracking. */ deliveryVehicleId: string | null; /** * Customization applied to the delivery vehicle marker.

Use this * field to specify custom styling (such as marker icon) and interactivity * (such as click handling).
  • If a {@link google.maps.MarkerOptions} * object is specified, the changes specified in it are applied to the * marker after the marker has been created, overwriting its default options * if they exist.
  • If a function is specified, it is invoked once * when the marker is created, before it is added to the map view. (On this * invocation, the isNew parameter in the function parameters * object is set to true.) Additionally, this function is * invoked when the location provider receives data from Fleet Engine, * regardless of whether the data corresponding to this marker have * changed.

    See {@link * google.maps.journeySharing.DeliveryVehicleMarkerCustomizationFunctionParams} * for a list of supplied parameters and their uses.
*/ deliveryVehicleMarkerCustomization?: | (( a: google.maps.journeySharing.DeliveryVehicleMarkerCustomizationFunctionParams, ) => void) | google.maps.MarkerOptions | null; /** * Customization applied to a planned stop marker.

Use this field to * specify custom styling (such as marker icon) and interactivity (such as * click handling).
  • If a {@link google.maps.MarkerOptions} object is * specified, the changes specified in it are applied to the marker after * the marker has been created, overwriting its default options if they * exist.
  • If a function is specified, it is invoked once when the * marker is created, before it is added to the map view. (On this * invocation, the isNew parameter in the function parameters * object is set to true.) Additionally, this function is * invoked when the location provider receives data from Fleet Engine, * regardless of whether the data corresponding to this marker have * changed.

    See {@link * google.maps.journeySharing.PlannedStopMarkerCustomizationFunctionParams} * for a list of supplied parameters and their uses.
*/ plannedStopMarkerCustomization?: | (( a: google.maps.journeySharing.PlannedStopMarkerCustomizationFunctionParams, ) => void) | google.maps.MarkerOptions | null; /** * Minimum time between fetching location updates in milliseconds. If it * takes longer than pollingIntervalMillis to fetch a location * update, the next location update is not started until the current one * finishes.

Setting this value to 0 disables recurring location * updates. A new location update is fetched if any of the parameters * observed by the location provider changes.

The default polling * interval is 5000 milliseconds, the minimum interval. If you set the * polling interval to a lower non-zero value, 5000 is used. */ pollingIntervalMillis: number | null; /** * The consumer's project ID from Google Cloud Console. */ projectId: string; /** * Customization applied to the remaining polyline. A remaining polyline * corresponds to a portion of the route the vehicle has not yet started * traversing through.

Use this field to specify custom styling * (such as polyline color) and interactivity (such as click * handling).
  • If a {@link google.maps.PolylineOptions} object is * specified, the changes specified in it are applied to the polyline after * the polyline has been created, overwriting its default options if they * exist.
  • If a function is specified, it is invoked once when the * polyline is created. (On this invocation, the isNew * parameter in the function parameters object is set to true.) * Additionally, this function is invoked when the polyline's * coordinates change, or when the location provider receives data from * Fleet Engine, regardless of whether the data corresponding to this * polyline have changed.

    See {@link * google.maps.journeySharing.DeliveryVehiclePolylineCustomizationFunctionParams} * for a list of supplied parameters and their uses.
*/ remainingPolylineCustomization?: | (( a: google.maps.journeySharing.DeliveryVehiclePolylineCustomizationFunctionParams, ) => void) | google.maps.PolylineOptions | null; /** * Boolean to show or hide outcome locations for the fetched tasks. */ shouldShowOutcomeLocations: boolean | null; /** * Boolean to show or hide tasks. Setting this to false will prevent the * ListTasks endpoint from being called to fetch the tasks. Only the * upcoming vehicle stops will be displayed. */ shouldShowTasks: boolean | null; /** * Threshold for stale vehicle location. If the last updated location for * the vehicle is older this threshold, the vehicle will not be displayed. * Defaults to 24 hours in milliseconds. If the threshold is less than 0, or * Infinity, the threshold will be ignored and the vehicle location * will not be considered stale. */ staleLocationThresholdMillis: number | null; /** * Customization applied to the taken polyline. A taken polyline corresponds * to a portion of the route the vehicle has already traversed through. *

Use this field to specify custom styling (such as polyline color) * and interactivity (such as click handling).
  • If a {@link * google.maps.PolylineOptions} object is specified, the changes specified * in it are applied to the polyline after the polyline has been created, * overwriting its default options if they exist.
  • If a function is * specified, it is invoked once when the polyline is created. (On this * invocation, the isNew parameter in the function parameters * object is set to true.) Additionally, this function is * invoked when the polyline's coordinates change, or when the location * provider receives data from Fleet Engine, regardless of whether the data * corresponding to this polyline have changed.

    See {@link * google.maps.journeySharing.DeliveryVehiclePolylineCustomizationFunctionParams} * for a list of supplied parameters and their uses.
*/ takenPolylineCustomization?: | (( a: google.maps.journeySharing.DeliveryVehiclePolylineCustomizationFunctionParams, ) => void) | google.maps.PolylineOptions | null; /** * Filter options to apply when fetching tasks. The options can include * specific vehicle, time, and task status. */ taskFilterOptions: google.maps.journeySharing.FleetEngineTaskFilterOptions | null; /** * Customization applied to a task marker. A task marker is rendered at the * planned location of each task assigned to the delivery vehicle. *

Use this field to specify custom styling (such as marker icon) * and interactivity (such as click handling).
  • If a {@link * google.maps.MarkerOptions} object is specified, the changes specified in * it are applied to the marker after the marker has been created, * overwriting its default options if they exist.
  • If a function is * specified, it is invoked once when the marker is created, before it is * added to the map view. (On this invocation, the isNew * parameter in the function parameters object is set to true.) * Additionally, this function is invoked when the location provider * receives data from Fleet Engine, regardless of whether the data * corresponding to this marker have changed.

    See {@link * google.maps.journeySharing.TaskMarkerCustomizationFunctionParams} for a * list of supplied parameters and their uses.
*/ taskMarkerCustomization?: | (( a: google.maps.journeySharing.TaskMarkerCustomizationFunctionParams, ) => void) | google.maps.MarkerOptions | null; /** * Customization applied to a task outcome marker. A task outcome marker is * rendered at the actual outcome location of each task assigned to the * delivery vehicle.

Use this field to specify custom styling (such * as marker icon) and interactivity (such as click handling).
  • If * a {@link google.maps.MarkerOptions} object is specified, the changes * specified in it are applied to the marker after the marker has been * created, overwriting its default options if they exist.
  • If a * function is specified, it is invoked once when the marker is created, * before it is added to the map view. (On this invocation, the * isNew parameter in the function parameters object is set to * true.) Additionally, this function is invoked when the * location provider receives data from Fleet Engine, regardless of whether * the data corresponding to this marker have changed.

    See {@link * google.maps.journeySharing.TaskMarkerCustomizationFunctionParams} for a * list of supplied parameters and their uses.
*/ taskOutcomeMarkerCustomization?: | (( a: google.maps.journeySharing.TaskMarkerCustomizationFunctionParams, ) => void) | null; } /** * The event object passed to the event handler when the {@link * google.maps.journeySharing.FleetEngineDeliveryVehicleLocationProvider.update} * event is triggered. */ export interface FleetEngineDeliveryVehicleLocationProviderUpdateEvent { /** * The journey segments that have been completed by this vehicle. * Unmodifiable. */ completedVehicleJourneySegments: | google.maps.journeySharing.VehicleJourneySegment[] | null; /** * The delivery vehicle data structure returned by the update. Unmodifiable. */ deliveryVehicle: google.maps.journeySharing.DeliveryVehicle | null; /** * The list of tasks served by this delivery vehicle. Unmodifiable. */ tasks: google.maps.journeySharing.Task[] | null; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * Fleet Location Provider. * * Access by calling `const {FleetEngineFleetLocationProvider} = await * google.maps.importLibrary("journeySharing")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class FleetEngineFleetLocationProvider extends google.maps .journeySharing.PollingLocationProvider { /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * Fleet Location Provider. * * Access by calling `const {FleetEngineFleetLocationProvider} = await * google.maps.importLibrary("journeySharing")`. See * https://developers.google.com/maps/documentation/javascript/libraries. * @param options Options to pass to the location provider. */ constructor( options: google.maps.journeySharing.FleetEngineFleetLocationProviderOptions, ); /** * The bounds within which to track vehicles. If no bounds are set, no * vehicles will be tracked. To track all vehicles regardless of location, * set bounds equivalent to the entire earth. */ locationRestriction?: | google.maps.LatLngBounds | null | google.maps.LatLngBoundsLiteral; /** * This Field is read-only. Threshold for stale vehicle location. If the * last updated location for the vehicle is older than this threshold, the * vehicle will not be displayed. */ staleLocationThresholdMillis: number; /** * The filter applied when fetching the vehicles. */ vehicleFilter?: string | null; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * Options for fleet location provider. */ export interface FleetEngineFleetLocationProviderOptions { /** * Provides JSON Web Tokens for authenticating the client to Fleet Engine. */ authTokenFetcher( this: any, a: google.maps.journeySharing.AuthTokenFetcherOptions, ): Promise; /** * The latitude/longitude bounds within which to track vehicles immediately * after the location provider is instantiated. If not set, the location * provider does not start tracking any vehicles; use {@link * google.maps.journeySharing.FleetEngineFleetLocationProvider.locationRestriction} * to set the bounds and begin tracking. To track all vehicles regardless of * location, set bounds equivalent to the entire earth. */ locationRestriction: | google.maps.LatLngBounds | null | google.maps.LatLngBoundsLiteral; /** * The consumer's project ID from Google Cloud Console. */ projectId: string; /** * Threshold for stale vehicle location. If the last updated location for * the vehicle is older than this threshold, the vehicle will not be * displayed. Defaults to 24 hours in milliseconds. If the threshold is less * than zero, or Infinity, the threshold will be ignored and the * vehicle location will not be considered stale. */ staleLocationThresholdMillis: number | null; /** * A filter query to apply when fetching vehicles. This filter is passed * directly to Fleet Engine.

See ListVehiclesRequest.filter * for supported formats.

Note that valid filters for attributes must * have the "attributes" prefix. For example, attributes.x = * "y" or attributes."x y" = * "z". */ vehicleFilter: string | null; /** * Customization applied to a vehicle marker.

Use this field to * specify custom styling (such as marker icon) and interactivity (such as * click handling).
  • If a {@link google.maps.MarkerOptions} object is * specified, the changes specified in it are applied to the marker after * the marker has been created, overwriting its default options if they * exist.
  • If a function is specified, it is invoked once when the * marker is created, before it is added to the map view. (On this * invocation, the isNew parameter in the function parameters * object is set to true.) Additionally, this function is * invoked when the location provider receives data from Fleet Engine, * regardless of whether the data corresponding to this marker have * changed.

    See {@link * google.maps.journeySharing.VehicleMarkerCustomizationFunctionParams} for * a list of supplied parameters and their uses.
*/ vehicleMarkerCustomization?: | (( a: google.maps.journeySharing.VehicleMarkerCustomizationFunctionParams, ) => void) | null; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * The event object passed to the event handler when the {@link * google.maps.journeySharing.FleetEngineFleetLocationProvider.update} event * is triggered. */ export interface FleetEngineFleetLocationProviderUpdateEvent { /** * The list of vehicles returned by the query. Unmodifiable. */ vehicles: google.maps.journeySharing.Vehicle[] | null; } /** * Types of Fleet Engine services. * * Access by calling `const {FleetEngineServiceType} = await * google.maps.importLibrary("journeySharing")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum FleetEngineServiceType { /** * Fleet Engine service used to access delivery vehicles. */ DELIVERY_VEHICLE_SERVICE = 'DELIVERY_VEHICLE_SERVICE', /** * Fleet Engine service used to access task information. */ TASK_SERVICE = 'TASK_SERVICE', /** * Fleet Engine service used to access trip information. */ TRIP_SERVICE = 'TRIP_SERVICE', /** * Unknown Fleet Engine service. */ UNKNOWN_SERVICE = 'UNKNOWN_SERVICE', } /** * Shipment location provider. * * Access by calling `const {FleetEngineShipmentLocationProvider} = await * google.maps.importLibrary("journeySharing")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class FleetEngineShipmentLocationProvider extends google.maps .journeySharing.PollingLocationProvider { /** * Shipment location provider. * * Access by calling `const {FleetEngineShipmentLocationProvider} = await * google.maps.importLibrary("journeySharing")`. See * https://developers.google.com/maps/documentation/javascript/libraries. * @param options Options for the location provider. */ constructor( options: google.maps.journeySharing.FleetEngineShipmentLocationProviderOptions, ); /** * Explicitly refreshes the tracked location. */ refresh(): void; /** * The tracking ID for the task that this location provider observes. Set * this field to begin tracking. */ trackingId: string; } /** * Options for shipment location provider. */ export interface FleetEngineShipmentLocationProviderOptions { /** * Customization applied to the active polyline. An active polyline * corresponds to a portion of the route the vehicle is currently traversing * through.

Use this field to specify custom styling (such as * polyline color) and interactivity (such as click handling).
  • If * a {@link google.maps.PolylineOptions} object is specified, the changes * specified in it are applied to the polyline after the polyline has been * created, overwriting its default options if they exist.
  • If a * function is specified, it is invoked once when the polyline is created. * (On this invocation, the isNew parameter in the function * parameters object is set to true.) Additionally, this * function is invoked when the polyline's coordinates change, or when * the location provider receives data from Fleet Engine, regardless of * whether the data corresponding to this polyline have * changed.

    See {@link * google.maps.journeySharing.ShipmentPolylineCustomizationFunctionParams} * for a list of supplied parameters and their uses.
*/ activePolylineCustomization?: | (( a: google.maps.journeySharing.ShipmentPolylineCustomizationFunctionParams, ) => void) | google.maps.PolylineOptions | null; /** * Provides JSON Web Tokens for authenticating the client to Fleet Engine. */ authTokenFetcher( this: any, a: google.maps.journeySharing.AuthTokenFetcherOptions, ): Promise; /** * Customization applied to the delivery vehicle marker.

Use this * field to specify custom styling (such as marker icon) and interactivity * (such as click handling).
  • If a {@link google.maps.MarkerOptions} * object is specified, the changes specified in it are applied to the * marker after the marker has been created, overwriting its default options * if they exist.
  • If a function is specified, it is invoked once * when the marker is created, before it is added to the map view. (On this * invocation, the isNew parameter in the function parameters * object is set to true.) Additionally, this function is * invoked when the location provider receives data from Fleet Engine, * regardless of whether the data corresponding to this marker have * changed.

    See {@link * google.maps.journeySharing.ShipmentMarkerCustomizationFunctionParams} for * a list of supplied parameters and their uses.
*/ deliveryVehicleMarkerCustomization?: | (( a: google.maps.journeySharing.ShipmentMarkerCustomizationFunctionParams, ) => void) | google.maps.MarkerOptions | null; /** * Customization applied to the destination marker.

Use this field * to specify custom styling (such as marker icon) and interactivity (such * as click handling).
  • If a {@link google.maps.MarkerOptions} object * is specified, the changes specified in it are applied to the marker after * the marker has been created, overwriting its default options if they * exist.
  • If a function is specified, it is invoked once when the * marker is created, before it is added to the map view. (On this * invocation, the isNew parameter in the function parameters * object is set to true.) Additionally, this function is * invoked when the location provider receives data from Fleet Engine, * regardless of whether the data corresponding to this marker have * changed.

    See {@link * google.maps.journeySharing.ShipmentMarkerCustomizationFunctionParams} for * a list of supplied parameters and their uses.
*/ destinationMarkerCustomization?: | (( a: google.maps.journeySharing.ShipmentMarkerCustomizationFunctionParams, ) => void) | google.maps.MarkerOptions | null; /** * Minimum time between fetching location updates in milliseconds. If it * takes longer than pollingIntervalMillis to fetch a location * update, the next location update is not started until the current one * finishes.

Setting this value to 0, Infinity, or a negative value * disables automatic location updates. A new location update is fetched * once if the tracking ID parameter (for example, the shipment tracking ID * of the shipment location provider), or a filtering option (for example, * viewport bounds or attribute filters for fleet location providers) * changes.

The default, and minimum, polling interval is 5000 * milliseconds. If you set the polling interval to a lower positive value, * 5000 is stored and used. */ pollingIntervalMillis: number | null; /** * The consumer's project ID from Google Cloud Console. */ projectId: string; /** * Customization applied to the remaining polyline. A remaining polyline * corresponds to a portion of the route the vehicle has not yet started * traversing through.

Use this field to specify custom styling * (such as polyline color) and interactivity (such as click * handling).
  • If a {@link google.maps.PolylineOptions} object is * specified, the changes specified in it are applied to the polyline after * the polyline has been created, overwriting its default options if they * exist.
  • If a function is specified, it is invoked once when the * polyline is created. (On this invocation, the isNew * parameter in the function parameters object is set to true.) * Additionally, this function is invoked when the polyline's * coordinates change, or when the location provider receives data from * Fleet Engine, regardless of whether the data corresponding to this * polyline have changed.

    See {@link * google.maps.journeySharing.ShipmentPolylineCustomizationFunctionParams} * for a list of supplied parameters and their uses.
*/ remainingPolylineCustomization?: | (( a: google.maps.journeySharing.ShipmentPolylineCustomizationFunctionParams, ) => void) | google.maps.PolylineOptions | null; /** * Customization applied to the taken polyline. A taken polyline corresponds * to a portion of the route the vehicle has already traversed through. *

Use this field to specify custom styling (such as polyline color) * and interactivity (such as click handling).
  • If a {@link * google.maps.PolylineOptions} object is specified, the changes specified * in it are applied to the polyline after the polyline has been created, * overwriting its default options if they exist.
  • If a function is * specified, it is invoked once when the polyline is created. (On this * invocation, the isNew parameter in the function parameters * object is set to true.) Additionally, this function is * invoked when the polyline's coordinates change, or when the location * provider receives data from Fleet Engine, regardless of whether the data * corresponding to this polyline have changed.

    See {@link * google.maps.journeySharing.ShipmentPolylineCustomizationFunctionParams} * for a list of supplied parameters and their uses.
*/ takenPolylineCustomization?: | (( a: google.maps.journeySharing.ShipmentPolylineCustomizationFunctionParams, ) => void) | google.maps.PolylineOptions | null; /** * The tracking ID of the task to track immediately after the location * provider is instantiated. If not specified, the location provider does * not start tracking any task; use {@link * google.maps.journeySharing.FleetEngineShipmentLocationProvider.trackingId} * to set the tracking ID and begin tracking. */ trackingId: string | null; } /** * The event object passed to the event handler when the {@link * google.maps.journeySharing.FleetEngineShipmentLocationProvider.update} * event is triggered. */ export interface FleetEngineShipmentLocationProviderUpdateEvent { /** * The task tracking info structure returned by the update. Unmodifiable. */ taskTrackingInfo: google.maps.journeySharing.TaskTrackingInfo | null; } /** * Filtering options for tasks in the Delivery Vehicle Location Provider. */ export interface FleetEngineTaskFilterOptions { /** * Exclusive lower bound for the completion time of the task. Used to filter * for tasks that were completed after the specified time. */ completionTimeFrom: Date | null; /** * Exclusive upper bound for the completion time of the task. Used to filter * for tasks that were completed before the specified time. */ completionTimeTo: Date | null; /** * The state of the task. Valid values are OPEN or CLOSED. */ state: string | null; } /** * Trip location provider. * * Access by calling `const {FleetEngineTripLocationProvider} = await * google.maps.importLibrary("journeySharing")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class FleetEngineTripLocationProvider extends google.maps .journeySharing.PollingLocationProvider { /** * Trip location provider. * * Access by calling `const {FleetEngineTripLocationProvider} = await * google.maps.importLibrary("journeySharing")`. See * https://developers.google.com/maps/documentation/javascript/libraries. * @param options Options for the location provider. */ constructor( options: google.maps.journeySharing.FleetEngineTripLocationProviderOptions, ); /** * Explicitly refreshes the tracked location. */ refresh(): void; /** * The ID for the trip that this location provider observes. Set this field * to begin tracking. */ tripId: string; /** * Polyline customization function that colors the active polyline according * to its speed reading. Specify this function as the {@link * google.maps.journeySharing.FleetEngineTripLocationProviderOptions.activePolylineCustomization} * to render a traffic-aware polyline for the active polyline. * @param params The parameters provided to the polyline customization * function. */ static TRAFFIC_AWARE_ACTIVE_POLYLINE_CUSTOMIZATION_FUNCTION( this: any, params: google.maps.journeySharing.TripPolylineCustomizationFunctionParams, ): void; /** * Polyline customization function that colors the remaining polyline * according to its speed reading. Specify this function as the {@link * google.maps.journeySharing.FleetEngineTripLocationProviderOptions.remainingPolylineCustomization} * to render a traffic-aware polyline for the remaining polyline. * @param params The parameters provided to the polyline customization * function. */ static TRAFFIC_AWARE_REMAINING_POLYLINE_CUSTOMIZATION_FUNCTION( this: any, params: google.maps.journeySharing.TripPolylineCustomizationFunctionParams, ): void; } /** * Options for trip location provider. */ export interface FleetEngineTripLocationProviderOptions { /** * Customization applied to the active polyline. An active polyline * corresponds to a portion of the route the vehicle is currently traversing * through.

Use this field to specify custom styling (such as * polyline color) and interactivity (such as click handling).
  • If * a {@link google.maps.PolylineOptions} object is specified, the changes * specified in it are applied to the polyline after the polyline has been * created, overwriting its default options if they exist.
  • If a * function is specified, it is invoked once when the polyline is created. * (On this invocation, the isNew parameter in the function * parameters object is set to true.) Additionally, this * function is invoked when the polyline's coordinates change, or when * the location provider receives data from Fleet Engine, regardless of * whether the data corresponding to this polyline have * changed.

    See {@link * google.maps.journeySharing.TripPolylineCustomizationFunctionParams} for a * list of supplied parameters and their uses.
*/ activePolylineCustomization?: | (( a: google.maps.journeySharing.TripPolylineCustomizationFunctionParams, ) => void) | google.maps.PolylineOptions | null; /** * Provides JSON Web Tokens for authenticating the client to Fleet Engine. */ authTokenFetcher( this: any, a: google.maps.journeySharing.AuthTokenFetcherOptions, ): Promise; /** * Customization applied to the destination marker.

Use this field * to specify custom styling (such as marker icon) and interactivity (such * as click handling).
  • If a {@link google.maps.MarkerOptions} object * is specified, the changes specified in it are applied to the marker after * the marker has been created, overwriting its default options if they * exist.
  • If a function is specified, it is invoked once when the * marker is created, before it is added to the map view. (On this * invocation, the isNew parameter in the function parameters * object is set to true.) Additionally, this function is * invoked when the location provider receives data from Fleet Engine, * regardless of whether the data corresponding to this marker have * changed.

    See {@link * google.maps.journeySharing.TripMarkerCustomizationFunctionParams} for a * list of supplied parameters and their uses.
*/ destinationMarkerCustomization?: | (( a: google.maps.journeySharing.TripMarkerCustomizationFunctionParams, ) => void) | google.maps.MarkerOptions | null; /** * Customization applied to the origin marker.

Use this field to * specify custom styling (such as marker icon) and interactivity (such as * click handling).
  • If a {@link google.maps.MarkerOptions} object is * specified, the changes specified in it are applied to the marker after * the marker has been created, overwriting its default options if they * exist.
  • If a function is specified, it is invoked once when the * marker is created, before it is added to the map view. (On this * invocation, the isNew parameter in the function parameters * object is set to true.) Additionally, this function is * invoked when the location provider receives data from Fleet Engine, * regardless of whether the data corresponding to this marker have * changed.

    See {@link * google.maps.journeySharing.TripMarkerCustomizationFunctionParams} for a * list of supplied parameters and their uses.
*/ originMarkerCustomization?: | (( a: google.maps.journeySharing.TripMarkerCustomizationFunctionParams, ) => void) | google.maps.MarkerOptions | null; /** * Minimum time between fetching location updates in milliseconds. If it * takes longer than pollingIntervalMillis to fetch a location * update, the next location update is not started until the current one * finishes.

Setting this value to 0 disables recurring location * updates. A new location update is fetched if any of the parameters * observed by the location provider changes.

The default polling * interval is 5000 milliseconds, the minimum interval. If you set the * polling interval to a lower non-zero value, 5000 is used. */ pollingIntervalMillis: number | null; /** * The consumer's project ID from Google Cloud Console. */ projectId: string; /** * Customization applied to the remaining polyline. A remaining polyline * corresponds to a portion of the route the vehicle has not yet started * traversing through.

Use this field to specify custom styling * (such as polyline color) and interactivity (such as click * handling).
  • If a {@link google.maps.PolylineOptions} object is * specified, the changes specified in it are applied to the polyline after * the polyline has been created, overwriting its default options if they * exist.
  • If a function is specified, it is invoked once when the * polyline is created. (On this invocation, the isNew * parameter in the function parameters object is set to true.) * Additionally, this function is invoked when the polyline's * coordinates change, or when the location provider receives data from * Fleet Engine, regardless of whether the data corresponding to this * polyline have changed.

    See {@link * google.maps.journeySharing.TripPolylineCustomizationFunctionParams} for a * list of supplied parameters and their uses.
*/ remainingPolylineCustomization?: | (( a: google.maps.journeySharing.TripPolylineCustomizationFunctionParams, ) => void) | google.maps.PolylineOptions | null; /** * Customization applied to the taken polyline. A taken polyline corresponds * to a portion of the route the vehicle has already traversed through. *

Use this field to specify custom styling (such as polyline color) * and interactivity (such as click handling).
  • If a {@link * google.maps.PolylineOptions} object is specified, the changes specified * in it are applied to the polyline after the polyline has been created, * overwriting its default options if they exist.
  • If a function is * specified, it is invoked once when the polyline is created. (On this * invocation, the isNew parameter in the function parameters * object is set to true.) Additionally, this function is * invoked when the polyline's coordinates change, or when the location * provider receives data from Fleet Engine, regardless of whether the data * corresponding to this polyline have changed.

    See {@link * google.maps.journeySharing.TripPolylineCustomizationFunctionParams} for a * list of supplied parameters and their uses.
*/ takenPolylineCustomization?: | (( a: google.maps.journeySharing.TripPolylineCustomizationFunctionParams, ) => void) | google.maps.PolylineOptions | null; /** * The trip ID to track immediately after the location provider is * instantiated. If not specified, the location provider does not start * tracking any trip; use {@link * google.maps.journeySharing.FleetEngineTripLocationProvider.tripId} to set * the ID and begin tracking. */ tripId: string | null; /** * Customization applied to the vehicle marker.

Use this field to * specify custom styling (such as marker icon) and interactivity (such as * click handling).
  • If a {@link google.maps.MarkerOptions} object is * specified, the changes specified in it are applied to the marker after * the marker has been created, overwriting its default options if they * exist.
  • If a function is specified, it is invoked once when the * marker is created, before it is added to the map view. (On this * invocation, the isNew parameter in the function parameters * object is set to true.) Additionally, this function is * invoked when the location provider receives data from Fleet Engine, * regardless of whether the data corresponding to this marker have * changed.

    See {@link * google.maps.journeySharing.TripMarkerCustomizationFunctionParams} for a * list of supplied parameters and their uses.
*/ vehicleMarkerCustomization?: | (( a: google.maps.journeySharing.TripMarkerCustomizationFunctionParams, ) => void) | google.maps.MarkerOptions | null; /** * Customization applied to a waypoint marker.

Use this field to * specify custom styling (such as marker icon) and interactivity (such as * click handling).
  • If a {@link google.maps.MarkerOptions} object is * specified, the changes specified in it are applied to the marker after * the marker has been created, overwriting its default options if they * exist.
  • If a function is specified, it is invoked once when the * marker is created, before it is added to the map view. (On this * invocation, the isNew parameter in the function parameters * object is set to true.) Additionally, this function is * invoked when the location provider receives data from Fleet Engine, * regardless of whether the data corresponding to this marker have * changed.

    See {@link * google.maps.journeySharing.TripWaypointMarkerCustomizationFunctionParams} * for a list of supplied parameters and their uses.
*/ waypointMarkerCustomization?: | (( a: google.maps.journeySharing.TripWaypointMarkerCustomizationFunctionParams, ) => void) | google.maps.MarkerOptions | null; } /** * The event object passed to the event handler when the {@link * google.maps.journeySharing.FleetEngineTripLocationProvider.update} event is * triggered. */ export interface FleetEngineTripLocationProviderUpdateEvent { /** * The trip structure returned by the update. Unmodifiable. */ trip: google.maps.journeySharing.Trip | null; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * Vehicle Location Provider. * * Access by calling `const {FleetEngineVehicleLocationProvider} = await * google.maps.importLibrary("journeySharing")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class FleetEngineVehicleLocationProvider extends google.maps .journeySharing.PollingLocationProvider { /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * Vehicle Location Provider. * * Access by calling `const {FleetEngineVehicleLocationProvider} = await * google.maps.importLibrary("journeySharing")`. See * https://developers.google.com/maps/documentation/javascript/libraries. * @param options Options to pass to the location provider. */ constructor( options: google.maps.journeySharing.FleetEngineVehicleLocationProviderOptions, ); /** * This Field is read-only. Threshold for stale vehicle location. If the * last updated location for the vehicle is older than this threshold, the * vehicle will not be displayed. */ staleLocationThresholdMillis: number; /** * ID for the vehicle that this location provider observes. Set this field * to track a vehicle. */ vehicleId: string; /** * Polyline customization function that colors the active polyline according * to its speed reading. Specify this function as the {@link * google.maps.journeySharing.FleetEngineVehicleLocationProviderOptions.activePolylineCustomization} * to render a traffic-aware polyline for the active polyline. * @param params The parameters provided to the polyline customization * function. */ static TRAFFIC_AWARE_ACTIVE_POLYLINE_CUSTOMIZATION_FUNCTION( this: any, params: google.maps.journeySharing.VehiclePolylineCustomizationFunctionParams, ): void; /** * Polyline customization function that colors the remaining polyline * according to its speed reading. Specify this function as the {@link * google.maps.journeySharing.FleetEngineVehicleLocationProviderOptions.remainingPolylineCustomization} * to render a traffic-aware polyline for the remaining polyline. * @param params The parameters provided to the polyline customization * function. */ static TRAFFIC_AWARE_REMAINING_POLYLINE_CUSTOMIZATION_FUNCTION( this: any, params: google.maps.journeySharing.VehiclePolylineCustomizationFunctionParams, ): void; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * Options for vehicle location provider. */ export interface FleetEngineVehicleLocationProviderOptions { /** * Customization applied to the active polyline. An active polyline * corresponds to a portion of the route the vehicle is currently traversing * through.

Use this field to specify custom styling (such as * polyline color) and interactivity (such as click handling).
  • If * a {@link google.maps.PolylineOptions} object is specified, the changes * specified in it are applied to the polyline after the polyline has been * created, overwriting its default options if they exist.
  • If a * function is specified, it is invoked once when the polyline is created. * (On this invocation, the isNew parameter in the function * parameters object is set to true.) Additionally, this * function is invoked when the polyline's coordinates change, or when * the location provider receives data from Fleet Engine, regardless of * whether the data corresponding to this polyline have * changed.

    See {@link * google.maps.journeySharing.VehiclePolylineCustomizationFunctionParams} * for a list of supplied parameters and their uses.
*/ activePolylineCustomization?: | (( a: google.maps.journeySharing.VehiclePolylineCustomizationFunctionParams, ) => void) | google.maps.PolylineOptions | null; /** * Provides JSON Web Tokens for authenticating the client to Fleet Engine. */ authTokenFetcher( this: any, a: google.maps.journeySharing.AuthTokenFetcherOptions, ): Promise; /** * Customization applied to the vehicle trip destination marker.

Use * this field to specify custom styling (such as marker icon) and * interactivity (such as click handling).
  • If a {@link * google.maps.MarkerOptions} object is specified, the changes specified in * it are applied to the marker after the marker has been created, * overwriting its default options if they exist.
  • If a function is * specified, it is invoked once when the marker is created, before it is * added to the map view. (On this invocation, the isNew * parameter in the function parameters object is set to true.) * Additionally, this function is invoked when the location provider * receives data from Fleet Engine, regardless of whether the data * corresponding to this marker have changed.

    See {@link * google.maps.journeySharing.VehicleWaypointMarkerCustomizationFunctionParams} * for a list of supplied parameters and their uses.
*/ destinationMarkerCustomization?: | (( a: google.maps.journeySharing.VehicleWaypointMarkerCustomizationFunctionParams, ) => void) | google.maps.MarkerOptions | null; /** * Customization applied to the vehicle trip intermediate destination * markers.

Use this field to specify custom styling (such as marker * icon) and interactivity (such as click handling).
  • If a {@link * google.maps.MarkerOptions} object is specified, the changes specified in * it are applied to the marker after the marker has been created, * overwriting its default options if they exist.
  • If a function is * specified, it is invoked once when the marker is created, before it is * added to the map view. (On this invocation, the isNew * parameter in the function parameters object is set to true.) * Additionally, this function is invoked when the location provider * receives data from Fleet Engine, regardless of whether the data * corresponding to this marker have changed.

    See {@link * google.maps.journeySharing.VehicleWaypointMarkerCustomizationFunctionParams} * for a list of supplied parameters and their uses.
*/ intermediateDestinationMarkerCustomization?: | (( a: google.maps.journeySharing.VehicleWaypointMarkerCustomizationFunctionParams, ) => void) | google.maps.MarkerOptions | null; /** * Customization applied to the vehicle trip origin marker.

Use this * field to specify custom styling (such as marker icon) and interactivity * (such as click handling).
  • If a {@link google.maps.MarkerOptions} * object is specified, the changes specified in it are applied to the * marker after the marker has been created, overwriting its default options * if they exist.
  • If a function is specified, it is invoked once * when the marker is created, before it is added to the map view. (On this * invocation, the isNew parameter in the function parameters * object is set to true.) Additionally, this function is * invoked when the location provider receives data from Fleet Engine, * regardless of whether the data corresponding to this marker have * changed.

    See {@link * google.maps.journeySharing.VehicleWaypointMarkerCustomizationFunctionParams} * for a list of supplied parameters and their uses.
*/ originMarkerCustomization?: | (( a: google.maps.journeySharing.VehicleWaypointMarkerCustomizationFunctionParams, ) => void) | google.maps.MarkerOptions | null; /** * Minimum time between fetching location updates in milliseconds. If it * takes longer than pollingIntervalMillis to fetch a location * update, the next location update is not started until the current one * finishes.

Setting this value to 0 disables recurring location * updates. A new location update is fetched if any of the parameters * observed by the location provider changes.

The default polling * interval is 5000 milliseconds, the minimum interval. If you set the * polling interval to a lower non-zero value, 5000 is used. */ pollingIntervalMillis: number | null; /** * The consumer's project ID from Google Cloud Console. */ projectId: string; /** * Customization applied to the remaining polyline. A remaining polyline * corresponds to a portion of the route the vehicle has not yet started * traversing through.

Use this field to specify custom styling * (such as polyline color) and interactivity (such as click * handling).
  • If a {@link google.maps.PolylineOptions} object is * specified, the changes specified in it are applied to the polyline after * the polyline has been created, overwriting its default options if they * exist.
  • If a function is specified, it is invoked once when the * polyline is created. (On this invocation, the isNew * parameter in the function parameters object is set to true.) * Additionally, this function is invoked when the polyline's * coordinates change, or when the location provider receives data from * Fleet Engine, regardless of whether the data corresponding to this * polyline have changed.

    See {@link * google.maps.journeySharing.VehiclePolylineCustomizationFunctionParams} * for a list of supplied parameters and their uses.
*/ remainingPolylineCustomization?: | (( a: google.maps.journeySharing.VehiclePolylineCustomizationFunctionParams, ) => void) | google.maps.PolylineOptions | null; /** * Threshold for stale vehicle location. If the last updated location for * the vehicle is older this threshold, the vehicle will not be displayed. * Defaults to 24 hours in milliseconds. If the threshold is less than 0, or * Infinity, the threshold will be ignored and the vehicle location * will not be considered stale. */ staleLocationThresholdMillis: number | null; /** * Customization applied to the taken polyline. A taken polyline corresponds * to a portion of the route the vehicle has already traversed through. *

Use this field to specify custom styling (such as polyline color) * and interactivity (such as click handling).
  • If a {@link * google.maps.PolylineOptions} object is specified, the changes specified * in it are applied to the polyline after the polyline has been created, * overwriting its default options if they exist.
  • If a function is * specified, it is invoked once when the polyline is created. (On this * invocation, the isNew parameter in the function parameters * object is set to true.) Additionally, this function is * invoked when the polyline's coordinates change, or when the location * provider receives data from Fleet Engine, regardless of whether the data * corresponding to this polyline have changed.

    See {@link * google.maps.journeySharing.VehiclePolylineCustomizationFunctionParams} * for a list of supplied parameters and their uses.
*/ takenPolylineCustomization?: | (( a: google.maps.journeySharing.VehiclePolylineCustomizationFunctionParams, ) => void) | google.maps.PolylineOptions | null; /** * The vehicle ID to track immediately after the location provider is * instantiated. If not specified, the location provider does not start * tracking any vehicle; use {@link * google.maps.journeySharing.FleetEngineVehicleLocationProvider.vehicleId} * to set the ID and begin tracking. */ vehicleId: string | null; /** * Customization applied to the vehicle marker.

Use this field to * specify custom styling (such as marker icon) and interactivity (such as * click handling).
  • If a {@link google.maps.MarkerOptions} object is * specified, the changes specified in it are applied to the marker after * the marker has been created, overwriting its default options if they * exist.
  • If a function is specified, it is invoked once when the * marker is created, before it is added to the map view. (On this * invocation, the isNew parameter in the function parameters * object is set to true.) Additionally, this function is * invoked when the location provider receives data from Fleet Engine, * regardless of whether the data corresponding to this marker have * changed.

    See {@link * google.maps.journeySharing.VehicleMarkerCustomizationFunctionParams} for * a list of supplied parameters and their uses.
*/ vehicleMarkerCustomization?: | (( a: google.maps.journeySharing.VehicleMarkerCustomizationFunctionParams, ) => void) | google.maps.MarkerOptions | null; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * The event object passed to the event handler when the {@link * google.maps.journeySharing.FleetEngineVehicleLocationProvider.update} event * is triggered. */ export interface FleetEngineVehicleLocationProviderUpdateEvent { /** * The list of trips completed by this vehicle. Unmodifiable. */ trips: google.maps.journeySharing.Trip[] | null; /** * The vehicle data structure returned by the update. Unmodifiable. */ vehicle: google.maps.journeySharing.Vehicle | null; } /** * The map view. * * Access by calling `const {JourneySharingMapView} = await * google.maps.importLibrary("journeySharing")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class JourneySharingMapView { /** * The map view. * * Access by calling `const {JourneySharingMapView} = await * google.maps.importLibrary("journeySharing")`. See * https://developers.google.com/maps/documentation/javascript/libraries. * @param options Options for the map view. */ constructor( options: google.maps.journeySharing.JourneySharingMapViewOptions, ); /** * Adds a location provider to the map view. If the location provider is * already added, no action is performed. * @param locationProvider the location provider to add. */ addLocationProvider( locationProvider: google.maps.journeySharing.LocationProvider, ): void; /** * Configures options for an anticipated route polyline. Invoked whenever a * new anticipated route polyline is rendered.

If specifying a * function, the function can and should modify the input's * defaultPolylineOptions field containing a google.maps.PolylineOptions * object, and return it as polylineOptions in the output * PolylineSetupOptions object.

Specifying a PolylineSetupOptions * object has the same effect as specifying a function that returns that * static object.

Do not reuse the same PolylineSetupOptions object * in different PolylineSetup functions or static values, and do not reuse * the same google.maps.PolylineOptions object for the polylineOptions key * in different PolylineSetupOptions objects. If polylineOptions or visible * is unset or null, it will be overwritten with the default. Any values set * for polylineOptions.map or polylineOptions.path will be ignored. * @deprecated Polyline setup is deprecated. Use the * PolylineCustomizationFunction methods for your location * provider instead. This field will be removed in the future. */ anticipatedRoutePolylineSetup: | google.maps.journeySharing.PolylineSetupOptions | (( a: google.maps.journeySharing.DefaultPolylineSetupOptions, ) => google.maps.journeySharing.PolylineSetupOptions); /** * Returns the anticipated route polylines, if any. * @deprecated getting a list of polylines via the MapView is * deprecated. Use the PolylineCustomizationFunctions for * your location provider to receive callbacks when a polyline is added * to the map or updated. */ anticipatedRoutePolylines: google.maps.Polyline[]; /** * This Field is read-only. Automatic viewport mode. */ automaticViewportMode: google.maps.journeySharing.AutomaticViewportMode; /** * Configures options for a destination location marker. Invoked whenever a * new destination marker is rendered.

If specifying a function, the * function can and should modify the input's defaultMarkerOptions field * containing a google.maps.MarkerOptions object, and return it as * markerOptions in the output MarkerSetupOptions object.

Specifying * a MarkerSetupOptions object has the same effect as specifying a function * that returns that static object.

Do not reuse the same * MarkerSetupOptions object in different MarkerSetup functions or static * values, and do not reuse the same google.maps.MarkerOptions object for * the markerOptions key in different MarkerSetupOptions objects. If * markerOptions is unset or null, it will be overwritten with the default. * Any value set for markerOptions.map or markerOptions.position will be * ignored. * @deprecated Marker setup is deprecated. Use the * MarkerCustomizationFunction methods for your location * provider instead. This field will be removed in the future. */ destinationMarkerSetup: | google.maps.journeySharing.MarkerSetupOptions | (( a: google.maps.journeySharing.DefaultMarkerSetupOptions, ) => google.maps.journeySharing.MarkerSetupOptions); /** * Returns the destination markers, if any. * @deprecated getting a list of markers via the MapView is * deprecated. Use the MarkerCustomizationFunctions for * your location provider to receive callbacks when a marker is added to * the map or updated. */ destinationMarkers: google.maps.Marker[]; /** * This Field is read-only. The DOM element backing the view. */ element: Element; /** * Enables or disables the traffic layer. */ enableTraffic: boolean; /** * This Field is read-only. A source of tracked locations to be shown in the * tracking map view. * @deprecated Use {@link * google.maps.journeySharing.JourneySharingMapView.locationProviders} * instead. */ locationProvider: google.maps.journeySharing.LocationProvider | null; /** * This field is read-only. Sources of tracked locations to be shown in the * tracking map view. To add or remove location providers, use the {@link * google.maps.journeySharing.JourneySharingMapView.addLocationProvider} * and {@link * google.maps.journeySharing.JourneySharingMapView.removeLocationProvider} * methods. */ locationProviders: google.maps.journeySharing.LocationProvider[] | null; /** * This Field is read-only. The map object contained in the map view. */ map: google.maps.Map; /** * This Field is read-only. The map options passed into the map via the map * view. */ mapOptions: google.maps.MapOptions; /** * Configures options for an origin location marker. Invoked whenever a new * origin marker is rendered.

If specifying a function, the function * can and should modify the input's defaultMarkerOptions field * containing a google.maps.MarkerOptions object, and return it as * markerOptions in the output MarkerSetupOptions object.

Specifying * a MarkerSetupOptions object has the same effect as specifying a function * that returns that static object.

Do not reuse the same * MarkerSetupOptions object in different MarkerSetup functions or static * values, and do not reuse the same google.maps.MarkerOptions object for * the markerOptions key in different MarkerSetupOptions objects. If * markerOptions is unset or null, it will be overwritten with the default. * Any value set for markerOptions.map or markerOptions.position will be * ignored. * @deprecated Marker setup is deprecated. Use the * MarkerCustomizationFunction methods for your location * provider instead. This field will be removed in the future. */ originMarkerSetup: | google.maps.journeySharing.MarkerSetupOptions | (( a: google.maps.journeySharing.DefaultMarkerSetupOptions, ) => google.maps.journeySharing.MarkerSetupOptions); /** * Returns the origin markers, if any. * @deprecated getting a list of markers via the MapView is * deprecated. Use the MarkerCustomizationFunctions for * your location provider to receive callbacks when a marker is added to * the map or updated. */ originMarkers: google.maps.Marker[]; /** * Configures options for a ping location marker. Invoked whenever a new * ping marker is rendered.

If specifying a function, the function * can and should modify the input's defaultMarkerOptions field * containing a google.maps.MarkerOptions object, and return it as * markerOptions in the output MarkerSetupOptions object.

Specifying * a MarkerSetupOptions object has the same effect as specifying a function * that returns that static object.

Do not reuse the same * MarkerSetupOptions object in different MarkerSetup functions or static * values, and do not reuse the same google.maps.MarkerOptions object for * the markerOptions key in different MarkerSetupOptions objects. If * markerOptions is unset or null, it will be overwritten with the default. * Any value set for markerOptions.map or markerOptions.position will be * ignored. * @deprecated Marker setup is deprecated. Use the * MarkerCustomizationFunction methods for your location * provider instead. This field will be removed in the future. */ pingMarkerSetup: | google.maps.journeySharing.MarkerSetupOptions | (( a: google.maps.journeySharing.DefaultMarkerSetupOptions, ) => google.maps.journeySharing.MarkerSetupOptions); /** * Removes a location provider from the map view. If the location provider * is not already added to the map view, no action is performed. * @param locationProvider the location provider to remove. */ removeLocationProvider( locationProvider: google.maps.journeySharing.LocationProvider, ): void; /** * Configures options for a successful task location marker. Invoked * whenever a new successful task marker is rendered.

If specifying * a function, the function can and should modify the input's * defaultMarkerOptions field containing a google.maps.MarkerOptions object, * and return it as markerOptions in the output MarkerSetupOptions object. *

Specifying a MarkerSetupOptions object has the same effect as * specifying a function that returns that static object.

Do not * reuse the same MarkerSetupOptions object in different MarkerSetup * functions or static values, and do not reuse the same * google.maps.MarkerOptions object for the markerOptions key in different * MarkerSetupOptions objects. If markerOptions is unset or null, it will be * overwritten with the default. Any value set for markerOptions.map or * markerOptions.position will be ignored. * @deprecated Marker setup is deprecated. Use the * MarkerCustomizationFunction methods for your location * provider instead. This field will be removed in the future. */ successfulTaskMarkerSetup: | google.maps.journeySharing.MarkerSetupOptions | (( a: google.maps.journeySharing.DefaultMarkerSetupOptions, ) => google.maps.journeySharing.MarkerSetupOptions); /** * Returns the successful task markers, if any. * @deprecated getting a list of markers via the MapView is * deprecated. Use the MarkerCustomizationFunctions for * your location provider to receive callbacks when a marker is added to * the map or updated. */ successfulTaskMarkers: google.maps.Marker[]; /** * Configures options for a taken route polyline. Invoked whenever a new * taken route polyline is rendered.

If specifying a function, the * function can and should modify the input's defaultPolylineOptions * field containing a google.maps.PolylineOptions object, and return it as * polylineOptions in the output PolylineSetupOptions object. *

Specifying a PolylineSetupOptions object has the same effect as * specifying a function that returns that static object.

Do not * reuse the same PolylineSetupOptions object in different PolylineSetup * functions or static values, and do not reuse the same * google.maps.PolylineOptions object for the polylineOptions key in * different PolylineSetupOptions objects.

Any values set for * polylineOptions.map or polylineOptions.path will be ignored. Any unset or * null value will be overwritten with the default. * @deprecated Polyline setup is deprecated. Use the * PolylineCustomizationFunction methods for your location * provider instead. This field will be removed in the future. */ takenRoutePolylineSetup: | google.maps.journeySharing.PolylineSetupOptions | (( a: google.maps.journeySharing.DefaultPolylineSetupOptions, ) => google.maps.journeySharing.PolylineSetupOptions); /** * Returns the taken route polylines, if any. * @deprecated getting a list of polylines via the MapView is * deprecated. Use the PolylineCustomizationFunctions for * your location provider to receive callbacks when a polyline is added * to the map or updated. */ takenRoutePolylines: google.maps.Polyline[]; /** * Configures options for a task outcome location marker. Invoked whenever a * new task outcome location marker is rendered.

If specifying a * function, the function can and should modify the input's * defaultMarkerOptions field containing a google.maps.MarkerOptions object, * and return it as markerOptions in the output MarkerSetupOptions object. *

Specifying a MarkerSetupOptions object has the same effect as * specifying a function that returns that static object.

Do not * reuse the same MarkerSetupOptions object in different MarkerSetup * functions or static values, and do not reuse the same * google.maps.MarkerOptions object for the markerOptions key in different * MarkerSetupOptions objects. If markerOptions is unset or null, it will be * overwritten with the default. Any value set for markerOptions.map or * markerOptions.position will be ignored. * @deprecated Marker setup is deprecated. Use the * MarkerCustomizationFunction methods for your location * provider instead. This field will be removed in the future. */ taskOutcomeMarkerSetup: | google.maps.journeySharing.MarkerSetupOptions | (( a: google.maps.journeySharing.DefaultMarkerSetupOptions, ) => google.maps.journeySharing.MarkerSetupOptions); /** * Returns the task outcome markers, if any. * @deprecated getting a list of markers via the MapView is * deprecated. Use the MarkerCustomizationFunctions for * your location provider to receive callbacks when a marker is added to * the map or updated. */ taskOutcomeMarkers: google.maps.Marker[]; /** * Configures options for an unsuccessful task location marker. Invoked * whenever a new unsuccessful task marker is rendered.

If * specifying a function, the function can and should modify the input's * defaultMarkerOptions field containing a google.maps.MarkerOptions object, * and return it as markerOptions in the output MarkerSetupOptions object. *

Specifying a MarkerSetupOptions object has the same effect as * specifying a function that returns that static object.

Do not * reuse the same MarkerSetupOptions object in different MarkerSetup * functions or static values, and do not reuse the same * google.maps.MarkerOptions object for the markerOptions key in different * MarkerSetupOptions objects. If markerOptions is unset or null, it will be * overwritten with the default. Any value set for markerOptions.map or * markerOptions.position will be ignored. * @deprecated Marker setup is deprecated. Use the * MarkerCustomizationFunction methods for your location * provider instead. This field will be removed in the future. */ unsuccessfulTaskMarkerSetup: | google.maps.journeySharing.MarkerSetupOptions | (( a: google.maps.journeySharing.DefaultMarkerSetupOptions, ) => google.maps.journeySharing.MarkerSetupOptions); /** * Returns the unsuccessful task markers, if any. * @deprecated getting a list of markers via the MapView is * deprecated. Use the MarkerCustomizationFunctions for * your location provider to receive callbacks when a marker is added to * the map or updated. */ unsuccessfulTaskMarkers: google.maps.Marker[]; /** * Configures options for a vehicle location marker. Invoked whenever a new * vehicle marker is rendered.

If specifying a function, the * function can and should modify the input's defaultMarkerOptions field * containing a google.maps.MarkerOptions object, and return it as * markerOptions in the output MarkerSetupOptions object.

Specifying * a MarkerSetupOptions object has the same effect as specifying a function * that returns that static object.

Do not reuse the same * MarkerSetupOptions object in different MarkerSetup functions or static * values, and do not reuse the same google.maps.MarkerOptions object for * the markerOptions key in different MarkerSetupOptions objects. If * markerOptions is unset or null, it will be overwritten with the default. * Any value set for markerOptions.map or markerOptions.position will be * ignored. * @deprecated Marker setup is deprecated. Use the * MarkerCustomizationFunction methods for your location * provider instead. This field will be removed in the future. */ vehicleMarkerSetup: | google.maps.journeySharing.MarkerSetupOptions | (( a: google.maps.journeySharing.DefaultMarkerSetupOptions, ) => google.maps.journeySharing.MarkerSetupOptions); /** * Returns the vehicle markers, if any. * @deprecated getting a list of markers via the MapView is * deprecated. Use the MarkerCustomizationFunctions for * your location provider to receive callbacks when a marker is added to * the map or updated. */ vehicleMarkers: google.maps.Marker[]; /** * Configures options for a waypoint location marker. Invoked whenever a new * waypoint marker is rendered.

If specifying a function, the * function can and should modify the input's defaultMarkerOptions field * containing a google.maps.MarkerOptions object, and return it as * markerOptions in the output MarkerSetupOptions object.

Specifying * a MarkerSetupOptions object has the same effect as specifying a function * that returns that static object.

Do not reuse the same * MarkerSetupOptions object in different MarkerSetup functions or static * values, and do not reuse the same google.maps.MarkerOptions object for * the markerOptions key in different MarkerSetupOptions objects. If * markerOptions is unset or null, it will be overwritten with the default. * Any value set for markerOptions.map or markerOptions.position will be * ignored. * @deprecated Marker setup is deprecated. Use the * MarkerCustomizationFunction methods for your location * provider instead. This field will be removed in the future. */ waypointMarkerSetup: | google.maps.journeySharing.MarkerSetupOptions | (( a: google.maps.journeySharing.DefaultMarkerSetupOptions, ) => google.maps.journeySharing.MarkerSetupOptions); /** * Returns the waypoint markers, if any. * @deprecated getting a list of markers via the MapView is * deprecated. Use the MarkerCustomizationFunctions for * your location provider to receive callbacks when a marker is added to * the map or updated. */ waypointMarkers: google.maps.Marker[]; } /** * Options for the map view. */ export interface JourneySharingMapViewOptions { /** * Configures options for an anticipated route polyline. Invoked whenever a * new anticipated route polyline is rendered.

If specifying a * function, the function can and should modify the input's * defaultPolylineOptions field containing a google.maps.PolylineOptions * object, and return it as polylineOptions in the output * PolylineSetupOptions object.

Specifying a PolylineSetupOptions * object has the same effect as specifying a function that returns that * static object.

Do not reuse the same PolylineSetupOptions object * in different PolylineSetup functions or static values, and do not reuse * the same google.maps.PolylineOptions object for the polylineOptions key * in different PolylineSetupOptions objects. If polylineOptions or visible * is unset or null, it will be overwritten with the default. Any values set * for polylineOptions.map or polylineOptions.path will be ignored. * @deprecated Polyline setup is deprecated. Use the * PolylineCustomizationFunction methods for your location * provider instead. This field will be removed in the future. */ anticipatedRoutePolylineSetup?: | google.maps.journeySharing.PolylineSetupOptions | (( a: google.maps.journeySharing.DefaultPolylineSetupOptions, ) => google.maps.journeySharing.PolylineSetupOptions) | null; /** * Automatic viewport mode. Default value is FIT_ANTICIPATED_ROUTE, which * enables the map view to automatically adjust the viewport to fit vehicle * markers, location markers, and any visible anticipated route polylines. * Set this to NONE to turn off automatic fitting. */ automaticViewportMode?: google.maps.journeySharing.AutomaticViewportMode | null; /** * Configures options for a destination location marker. Invoked whenever a * new destination marker is rendered.

If specifying a function, the * function can and should modify the input's defaultMarkerOptions field * containing a google.maps.MarkerOptions object, and return it as * markerOptions in the output MarkerSetupOptions object.

Specifying * a MarkerSetupOptions object has the same effect as specifying a function * that returns that static object.

Do not reuse the same * MarkerSetupOptions object in different MarkerSetup functions or static * values, and do not reuse the same google.maps.MarkerOptions object for * the markerOptions key in different MarkerSetupOptions objects. If * markerOptions is unset or null, it will be overwritten with the default. * Any value set for markerOptions.map or markerOptions.position will be * ignored. * @deprecated Marker setup is deprecated. Use the * MarkerCustomizationFunction methods for your location * provider instead. This field will be removed in the future. */ destinationMarkerSetup?: | google.maps.journeySharing.MarkerSetupOptions | (( a: google.maps.journeySharing.DefaultMarkerSetupOptions, ) => google.maps.journeySharing.MarkerSetupOptions) | null; /** * The DOM element backing the view. Required. */ element: Element; /** * A source of tracked locations to be shown in the tracking map view. * Optional. * @deprecated Use {@link * google.maps.journeySharing.JourneySharingMapViewOptions.locationProviders} * instead. */ locationProvider: google.maps.journeySharing.LocationProvider | null; /** * Sources of tracked locations to be shown in the tracking map view. * Optional. */ locationProviders: google.maps.journeySharing.LocationProvider[] | null; /** * Map options passed into the google.maps.Map constructor. */ mapOptions?: google.maps.MapOptions | null; /** * Configures options for an origin location marker. Invoked whenever a new * origin marker is rendered.

If specifying a function, the function * can and should modify the input's defaultMarkerOptions field * containing a google.maps.MarkerOptions object, and return it as * markerOptions in the output MarkerSetupOptions object.

Specifying * a MarkerSetupOptions object has the same effect as specifying a function * that returns that static object.

Do not reuse the same * MarkerSetupOptions object in different MarkerSetup functions or static * values, and do not reuse the same google.maps.MarkerOptions object for * the markerOptions key in different MarkerSetupOptions objects. If * markerOptions is unset or null, it will be overwritten with the default. * Any value set for markerOptions.map or markerOptions.position will be * ignored. * @deprecated Marker setup is deprecated. Use the * MarkerCustomizationFunction methods for your location * provider instead. This field will be removed in the future. */ originMarkerSetup?: | google.maps.journeySharing.MarkerSetupOptions | (( a: google.maps.journeySharing.DefaultMarkerSetupOptions, ) => google.maps.journeySharing.MarkerSetupOptions) | null; /** * Configures options for a ping location marker. Invoked whenever a new * ping marker is rendered.

If specifying a function, the function * can and should modify the input's defaultMarkerOptions field * containing a google.maps.MarkerOptions object, and return it as * markerOptions in the output MarkerSetupOptions object.

Specifying * a MarkerSetupOptions object has the same effect as specifying a function * that returns that static object.

Do not reuse the same * MarkerSetupOptions object in different MarkerSetup functions or static * values, and do not reuse the same google.maps.MarkerOptions object for * the markerOptions key in different MarkerSetupOptions objects. If * markerOptions is unset or null, it will be overwritten with the default. * Any value set for markerOptions.map or markerOptions.position will be * ignored. * @deprecated Marker setup is deprecated. Use the * MarkerCustomizationFunction methods for your location * provider instead. This field will be removed in the future. */ pingMarkerSetup?: | google.maps.journeySharing.MarkerSetupOptions | (( a: google.maps.journeySharing.DefaultMarkerSetupOptions, ) => google.maps.journeySharing.MarkerSetupOptions) | null; /** * Configures options for a successful task location marker. Invoked * whenever a new successful task marker is rendered.

If specifying * a function, the function can and should modify the input's * defaultMarkerOptions field containing a google.maps.MarkerOptions object, * and return it as markerOptions in the output MarkerSetupOptions object. *

Specifying a MarkerSetupOptions object has the same effect as * specifying a function that returns that static object.

Do not * reuse the same MarkerSetupOptions object in different MarkerSetup * functions or static values, and do not reuse the same * google.maps.MarkerOptions object for the markerOptions key in different * MarkerSetupOptions objects. If markerOptions is unset or null, it will be * overwritten with the default. Any value set for markerOptions.map or * markerOptions.position will be ignored. * @deprecated Marker setup is deprecated. Use the * MarkerCustomizationFunction methods for your location * provider instead. This field will be removed in the future. */ successfulTaskMarkerSetup?: | google.maps.journeySharing.MarkerSetupOptions | (( a: google.maps.journeySharing.DefaultMarkerSetupOptions, ) => google.maps.journeySharing.MarkerSetupOptions) | null; /** * Configures options for a taken route polyline. Invoked whenever a new * taken route polyline is rendered.

If specifying a function, the * function can and should modify the input's defaultPolylineOptions * field containing a google.maps.PolylineOptions object, and return it as * polylineOptions in the output PolylineSetupOptions object. *

Specifying a PolylineSetupOptions object has the same effect as * specifying a function that returns that static object.

Do not * reuse the same PolylineSetupOptions object in different PolylineSetup * functions or static values, and do not reuse the same * google.maps.PolylineOptions object for the polylineOptions key in * different PolylineSetupOptions objects.

Any values set for * polylineOptions.map or polylineOptions.path will be ignored. Any unset or * null value will be overwritten with the default. * @deprecated Polyline setup is deprecated. Use the * PolylineCustomizationFunction methods for your location * provider instead. This field will be removed in the future. */ takenRoutePolylineSetup?: | google.maps.journeySharing.PolylineSetupOptions | (( a: google.maps.journeySharing.DefaultPolylineSetupOptions, ) => google.maps.journeySharing.PolylineSetupOptions) | null; /** * Configures options for a task outcome location marker. Invoked whenever a * new task outcome location marker is rendered.

If specifying a * function, the function can and should modify the input's * defaultMarkerOptions field containing a google.maps.MarkerOptions object, * and return it as markerOptions in the output MarkerSetupOptions object. *

Specifying a MarkerSetupOptions object has the same effect as * specifying a function that returns that static object.

Do not * reuse the same MarkerSetupOptions object in different MarkerSetup * functions or static values, and do not reuse the same * google.maps.MarkerOptions object for the markerOptions key in different * MarkerSetupOptions objects. If markerOptions is unset or null, it will be * overwritten with the default. Any value set for markerOptions.map or * markerOptions.position will be ignored. * @deprecated Marker setup is deprecated. Use the * MarkerCustomizationFunction methods for your location * provider instead. This field will be removed in the future. */ taskOutcomeMarkerSetup?: | google.maps.journeySharing.MarkerSetupOptions | (( a: google.maps.journeySharing.DefaultMarkerSetupOptions, ) => google.maps.journeySharing.MarkerSetupOptions) | null; /** * Configures options for an unsuccessful task location marker. Invoked * whenever a new unsuccessful task marker is rendered.

If * specifying a function, the function can and should modify the input's * defaultMarkerOptions field containing a google.maps.MarkerOptions object, * and return it as markerOptions in the output MarkerSetupOptions object. *

Specifying a MarkerSetupOptions object has the same effect as * specifying a function that returns that static object.

Do not * reuse the same MarkerSetupOptions object in different MarkerSetup * functions or static values, and do not reuse the same * google.maps.MarkerOptions object for the markerOptions key in different * MarkerSetupOptions objects. If markerOptions is unset or null, it will be * overwritten with the default. Any value set for markerOptions.map or * markerOptions.position will be ignored. * @deprecated Marker setup is deprecated. Use the * MarkerCustomizationFunction methods for your location * provider instead. This field will be removed in the future. */ unsuccessfulTaskMarkerSetup?: | google.maps.journeySharing.MarkerSetupOptions | (( a: google.maps.journeySharing.DefaultMarkerSetupOptions, ) => google.maps.journeySharing.MarkerSetupOptions) | null; /** * Configures options for a vehicle location marker. Invoked whenever a new * vehicle marker is rendered.

If specifying a function, the * function can and should modify the input's defaultMarkerOptions field * containing a google.maps.MarkerOptions object, and return it as * markerOptions in the output MarkerSetupOptions object.

Specifying * a MarkerSetupOptions object has the same effect as specifying a function * that returns that static object.

Do not reuse the same * MarkerSetupOptions object in different MarkerSetup functions or static * values, and do not reuse the same google.maps.MarkerOptions object for * the markerOptions key in different MarkerSetupOptions objects. If * markerOptions is unset or null, it will be overwritten with the default. * Any value set for markerOptions.map or markerOptions.position will be * ignored. * @deprecated Marker setup is deprecated. Use the * MarkerCustomizationFunction methods for your location * provider instead. This field will be removed in the future. */ vehicleMarkerSetup?: | google.maps.journeySharing.MarkerSetupOptions | (( a: google.maps.journeySharing.DefaultMarkerSetupOptions, ) => google.maps.journeySharing.MarkerSetupOptions) | null; /** * Configures options for a waypoint location marker. Invoked whenever a new * waypoint marker is rendered.

If specifying a function, the * function can and should modify the input's defaultMarkerOptions field * containing a google.maps.MarkerOptions object, and return it as * markerOptions in the output MarkerSetupOptions object.

Specifying * a MarkerSetupOptions object has the same effect as specifying a function * that returns that static object.

Do not reuse the same * MarkerSetupOptions object in different MarkerSetup functions or static * values, and do not reuse the same google.maps.MarkerOptions object for * the markerOptions key in different MarkerSetupOptions objects. If * markerOptions is unset or null, it will be overwritten with the default. * Any value set for markerOptions.map or markerOptions.position will be * ignored. * @deprecated Marker setup is deprecated. Use the * MarkerCustomizationFunction methods for your location * provider instead. This field will be removed in the future. */ waypointMarkerSetup?: | google.maps.journeySharing.MarkerSetupOptions | (( a: google.maps.journeySharing.DefaultMarkerSetupOptions, ) => google.maps.journeySharing.MarkerSetupOptions) | null; } /** * Parent class of all location providers. */ export abstract class LocationProvider { /** * Adds a {@link google.maps.MapsEventListener} for an event fired by this * location provider. Returns an identifier for this listener that can be * used with {@link google.maps.event.removeListener}. * @param eventName The name of the event to listen for. * @param handler The event handler. */ addListener( eventName: string, handler: Function, ): google.maps.MapsEventListener; } /** * Parameters that are common to all marker customization functions. No object * of this class is provided directly to any marker customization function; an * object of one of its descendent classes is provided instead. */ export interface MarkerCustomizationFunctionParams { /** * The default options used to create this marker. */ defaultOptions: google.maps.MarkerOptions; /** * If true, the marker was newly created, and the marker customization * function is being called for the first time, before the marker has been * added to the map view. False otherwise. */ isNew: boolean; /** * The marker. Any customizations should be made to this object directly. */ marker: google.maps.Marker; } /** * @deprecated Marker setup is deprecated. Use the * MarkerCustomizationFunction methods for your location * provider instead. */ export type MarkerSetup = | google.maps.journeySharing.MarkerSetupOptions | (( a: google.maps.journeySharing.DefaultMarkerSetupOptions, ) => google.maps.journeySharing.MarkerSetupOptions); /** * MarkerSetup options. * @deprecated Marker setup is deprecated. Use the * MarkerCustomizationFunction methods for your location * provider instead. */ export interface MarkerSetupOptions { /** * Marker options. */ markerOptions?: google.maps.MarkerOptions | null; } /** * Parameters specific to marker customization functions that apply options to * markers representing planned stops. Used by {@link * google.maps.journeySharing.FleetEngineDeliveryVehicleLocationProviderOptions.plannedStopMarkerCustomization}. */ export interface PlannedStopMarkerCustomizationFunctionParams extends google.maps.journeySharing .DeliveryVehicleMarkerCustomizationFunctionParams { /** * The 0-based index of this stop in the list of remaining stops. */ stopIndex: number; } /** * Parent class of polling location providers. */ export abstract class PollingLocationProvider extends google.maps .journeySharing.LocationProvider { /** * True if this location provider is polling. Read only. */ isPolling: boolean; /** * Minimum time between fetching location updates in milliseconds. If it * takes longer than pollingIntervalMillis to fetch a location * update, the next location update is not started until the current one * finishes.

Setting this value to 0, Infinity, or a negative value * disables automatic location updates. A new location update is fetched * once if the tracking ID parameter (for example, the shipment tracking ID * of the shipment location provider), or a filtering option (for example, * viewport bounds or attribute filters for fleet location providers) * changes.

The default, and minimum, polling interval is 5000 * milliseconds. If you set the polling interval to a lower positive value, * 5000 is stored and used. */ pollingIntervalMillis: number; } /** * The event object passed to the event handler when the {@link * google.maps.journeySharing.PollingLocationProvider.ispollingchange} event * is triggered. */ export interface PollingLocationProviderIsPollingChangeEvent { /** * The error that caused the polling state to change, if the state change * was caused by an error. Undefined if the state change was due to normal * operations. */ error: Error | null; } /** * Parameters that are common to all polyline customization functions. No * object of this class is provided directly to any polyline customization * function; an object of one of its descendent classes is provided instead. */ export interface PolylineCustomizationFunctionParams { /** * The default options used to create this set of polylines. */ defaultOptions: google.maps.PolylineOptions; /** * If true, the list of polylines was newly created, and the polyline * customization function is being called for the first time. False * otherwise. */ isNew: boolean; /** * The list of polylines created. They are arranged sequentially to form the * rendered route. */ polylines: google.maps.Polyline[]; } /** * @deprecated Polyline setup is deprecated. Use the * PolylineCustomizationFunction methods for your location * provider instead. */ export type PolylineSetup = | google.maps.journeySharing.PolylineSetupOptions | (( a: google.maps.journeySharing.DefaultPolylineSetupOptions, ) => google.maps.journeySharing.PolylineSetupOptions); /** * PolylineSetup options. * @deprecated Polyline setup is deprecated. Use the * PolylineCustomizationFunction methods for your location * provider instead. */ export interface PolylineSetupOptions { /** * Polyline options. */ polylineOptions?: google.maps.PolylineOptions | null; /** * Polyline visibility. */ visible?: boolean | null; } /** * Parameters specific to marker customization functions that apply options to * markers representing shipment delivery vehicle and destination locations. * Used by {@link * google.maps.journeySharing.FleetEngineShipmentLocationProviderOptions.deliveryVehicleMarkerCustomization} * and {@link * google.maps.journeySharing.FleetEngineShipmentLocationProviderOptions.destinationMarkerCustomization}. */ export interface ShipmentMarkerCustomizationFunctionParams extends google.maps.journeySharing.MarkerCustomizationFunctionParams { /** * Information for the task associated with this marker. */ taskTrackingInfo: google.maps.journeySharing.TaskTrackingInfo; } /** * Parameters specific to polyline customization functions for {@link * google.maps.journeySharing.FleetEngineShipmentLocationProvider}. */ export interface ShipmentPolylineCustomizationFunctionParams extends google.maps.journeySharing.PolylineCustomizationFunctionParams { /** * Information for the task associated with this polyline. */ taskTrackingInfo: google.maps.journeySharing.TaskTrackingInfo; } /** * The classification of polyline speed based on traffic data. * * Access by calling `const {Speed} = await * google.maps.importLibrary("journeySharing")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum Speed { /** * Normal speed, no slowdown is detected. */ NORMAL = 'NORMAL', /** * Slowdown detected, but no traffic jam formed. */ SLOW = 'SLOW', /** * Traffic jam detected. */ TRAFFIC_JAM = 'TRAFFIC_JAM', } /** * Traffic density indicator on a contiguous path segment. The interval * defines the starting and ending points of the segment via their indices. */ export interface SpeedReadingInterval { /** * The zero-based index of the ending point of the interval in the path. */ endPolylinePointIndex: number; /** * Traffic speed in this interval. */ speed: google.maps.journeySharing.Speed; /** * The zero-based index of the starting point of the interval in the path. */ startPolylinePointIndex: number; } /** * The details for a task returned by Fleet Engine. */ export interface Task { /** * Attributes assigned to the task. */ attributes: {[key: string]: unknown}; /** * The timestamp of the estimated completion time of the task. */ estimatedCompletionTime: Date | null; /** * Information specific to the last location update. */ latestVehicleLocationUpdate: google.maps.journeySharing.VehicleLocationUpdate | null; /** * The task name in the format * "providers/{provider_id}/tasks/{task_id}". The task_id must be * a unique identifier and not a tracking ID. To store a tracking ID of a * shipment, use the tracking_id field. Multiple tasks can have the same * tracking_id. */ name: string; /** * The outcome of the task. */ outcome: string | null; /** * The location where the task was completed (from provider). */ outcomeLocation: google.maps.LatLngLiteral | null; /** * The setter of the task outcome location ('PROVIDER' or * 'LAST_VEHICLE_LOCATION'). */ outcomeLocationSource: string | null; /** * The timestamp of when the task's outcome was set (from provider). */ outcomeTime: Date | null; /** * The location where the task is to be completed. */ plannedLocation: google.maps.LatLngLiteral | null; /** * Information about the segments left to be completed for this task. */ remainingVehicleJourneySegments: google.maps.journeySharing.VehicleJourneySegment[]; /** * The current execution state of the task. */ status: string; /** * The time window during which the task should be completed. */ targetTimeWindow: google.maps.journeySharing.TimeWindow | null; /** * The tracking ID of the shipment. */ trackingId: string | null; /** * The task type; for example, a break or shipment. */ type: string; /** * The ID of the vehicle performing this task. */ vehicleId: string | null; } /** * TaskInfo type, used by {@link * google.maps.journeySharing.DeliveryVehicleStop}. */ export interface TaskInfo { /** * The extra time it takes to perform the task, in milliseconds. */ extraDurationMillis: number | null; /** * The ID of the task. */ id: string | null; /** * The time window during which the task should be completed. */ targetTimeWindow: google.maps.journeySharing.TimeWindow | null; } /** * Parameters specific to marker customization functions that apply options to * markers representing planned or actual task locations. Used by {@link * google.maps.journeySharing.FleetEngineDeliveryVehicleLocationProviderOptions.taskMarkerCustomization} * and {@link * google.maps.journeySharing.FleetEngineDeliveryVehicleLocationProviderOptions.taskOutcomeMarkerCustomization}. */ export interface TaskMarkerCustomizationFunctionParams extends google.maps.journeySharing .DeliveryVehicleMarkerCustomizationFunctionParams { /** * The task location represented by this marker. */ task: google.maps.journeySharing.Task; } /** * The details for a task tracking info object returned by Fleet Engine. */ export interface TaskTrackingInfo { /** * Attributes assigned to the task. */ attributes: {[key: string]: unknown}; /** * The estimated arrival time to the stop location. */ estimatedArrivalTime: Date | null; /** * The estimated completion time of a Task. */ estimatedTaskCompletionTime: Date | null; /** * Information specific to the last location update. */ latestVehicleLocationUpdate: google.maps.journeySharing.VehicleLocationUpdate | null; /** * The name in the format * "providers/{provider_id}/taskTrackingInfo/{tracking_id}", where * tracking_id represents the tracking ID. */ name: string; /** * The location where the Task will be completed. */ plannedLocation: google.maps.LatLng | null; /** * The total remaining distance in meters to the VehicleStop of * interest. */ remainingDrivingDistanceMeters: number | null; /** * Indicates the number of stops the vehicle remaining until the task stop * is reached, including the task stop. For example, if the vehicle's * next stop is the task stop, the value will be 1. */ remainingStopCount: number | null; /** * A list of points which when connected forms a polyline of the * vehicle's expected route to the location of this task. */ routePolylinePoints: google.maps.LatLng[] | null; /** * The current execution state of the Task. */ state: string | null; /** * The time window during which the task should be completed. */ targetTimeWindow: google.maps.journeySharing.TimeWindow | null; /** * The outcome of attempting to execute a Task. */ taskOutcome: string | null; /** * The time when the Task's outcome was set by the provider. */ taskOutcomeTime: Date | null; /** * The tracking ID of a Task.
  • Must be a valid Unicode * string.
  • Limited to a maximum length of 64 characters.
  • *
  • Normalized according to Unicode Normalization Form * C.
  • May not contain any of the following ASCII characters: * '/', ':', '?', ',', or * '#'.
*/ trackingId: string; } /** * A time range. */ export interface TimeWindow { /** * The end time of the time window (inclusive). */ endTime: Date; /** * The start time of the time window (inclusive). */ startTime: Date; } /** * The details for a trip returned by Fleet Engine. */ export interface Trip { /** * Location where the customer was dropped off. */ actualDropOffLocation: google.maps.LatLngLiteral | null; /** * Location where the customer was picked up. */ actualPickupLocation: google.maps.LatLngLiteral | null; /** * The estimated future time when the passengers will be dropped off, or the * actual time when they were dropped off. */ dropOffTime: Date | null; /** * Information specific to the last location update. */ latestVehicleLocationUpdate: google.maps.journeySharing.VehicleLocationUpdate | null; /** * In the format "providers/{provider_id}/trips/{trip_id}". The * trip_id must be a unique identifier. */ name: string; /** * Number of passengers on this trip; does not include the driver. */ passengerCount: number; /** * The estimated future time when the passengers will be picked up, or the * actual time when they were picked up. */ pickupTime: Date | null; /** * Location where the customer indicates they will be dropped off. */ plannedDropOffLocation: google.maps.LatLngLiteral | null; /** * Location where customer indicates they will be picked up. */ plannedPickupLocation: google.maps.LatLngLiteral | null; /** * An array of waypoints indicating the path from the current location to * the drop-off point. */ remainingWaypoints: google.maps.journeySharing.VehicleWaypoint[]; /** * Current status of the trip. Possible values are UNKNOWN_TRIP_STATUS, NEW, * ENROUTE_TO_PICKUP, ARRIVED_AT_PICKUP, * ARRIVED_AT_INTERMEDIATE_DESTINATION, ENROUTE_TO_INTERMEDIATE_DESTINATION, * ENROUTE_TO_DROPOFF, COMPLETE, or CANCELED. */ status: string; /** * The type of the trip. Possible values are UNKNOWN_TRIP_TYPE, SHARED or * EXCLUSIVE. */ type: string; /** * ID of the vehicle making this trip. */ vehicleId: string; } /** * Parameters specific to marker customization functions that apply options to * markers representing trip vehicle, origin and destination locations. Used * by {@link * google.maps.journeySharing.FleetEngineTripLocationProviderOptions.vehicleMarkerCustomization}, {@link * google.maps.journeySharing.FleetEngineTripLocationProviderOptions.originMarkerCustomization}, * and {@link * google.maps.journeySharing.FleetEngineTripLocationProviderOptions.destinationMarkerCustomization}. */ export interface TripMarkerCustomizationFunctionParams extends google.maps.journeySharing.MarkerCustomizationFunctionParams { /** * The trip associated with this marker.

For information about the * vehicle servicing this trip, use {@link * google.maps.journeySharing.Trip.latestVehicleLocationUpdate} and {@link * google.maps.journeySharing.Trip.remainingWaypoints}. */ trip: google.maps.journeySharing.Trip; } /** * Parameters specific to polyline customization functions for {@link * google.maps.journeySharing.FleetEngineTripLocationProvider}. */ export interface TripPolylineCustomizationFunctionParams extends google.maps.journeySharing.PolylineCustomizationFunctionParams { /** * The trip associated with this polyline. */ trip: google.maps.journeySharing.Trip; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * Trip types supported by a {@link google.maps.journeySharing.Vehicle}. * * Access by calling `const {TripType} = await * google.maps.importLibrary("journeySharing")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum TripType { /** * The trip is exclusive to a vehicle. */ EXCLUSIVE = 'EXCLUSIVE', /** * The trip may share a vehicle with other trips. */ SHARED = 'SHARED', /** * Unknown trip type. */ UNKNOWN_TRIP_TYPE = 'UNKNOWN_TRIP_TYPE', } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * TripWaypoint type. */ export interface TripWaypoint { /** * The path distance between the previous waypoint (or the vehicle's * current location, if this waypoint is the first in the list of waypoints) * to this waypoint in meters. */ distanceMeters: number | null; /** * Travel time between the previous waypoint (or the vehicle's current * location, if this waypoint is the first in the list of waypoints) to this * waypoint in milliseconds. */ durationMillis: number | null; /** * The location of the waypoint. */ location: google.maps.LatLng | null; /** * The path from the previous stop (or the vehicle's current location, * if this stop is the first in the list of stops) to this stop. */ path: google.maps.LatLng[] | null; /** * The list of traffic speeds along the path from the previous waypoint (or * vehicle location) to the current waypoint. Each interval in the list * describes the traffic on a contiguous segment on the path; the interval * defines the starting and ending points of the segment via their indices. * See the definition of {@link * google.maps.journeySharing.SpeedReadingInterval} for more details. */ speedReadingIntervals: | google.maps.journeySharing.SpeedReadingInterval[] | null; /** * The trip associated with this waypoint. */ tripId: string | null; /** * The role this waypoint plays in this trip, such as pickup or dropoff. */ waypointType: google.maps.journeySharing.WaypointType | null; } /** * Parameters specific to marker customization functions that apply options to * markers representing trip waypoint locations. Used by {@link * google.maps.journeySharing.FleetEngineTripLocationProviderOptions.waypointMarkerCustomization}. */ export interface TripWaypointMarkerCustomizationFunctionParams extends google.maps.journeySharing.TripMarkerCustomizationFunctionParams { /** * The 0-based waypoint index associated with this marker. Use this index * on {@link google.maps.journeySharing.Trip.remainingWaypoints} to retrieve * information about the waypoint. */ waypointIndex: number; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * The details for a vehicle returned by Fleet Engine. */ export interface Vehicle { /** * Custom vehicle attributes. */ attributes: {[key: string]: unknown}; /** * The waypoint where current route segment ends. */ currentRouteSegmentEndPoint: google.maps.journeySharing.TripWaypoint | null; /** * Time when the current route segment was set. */ currentRouteSegmentVersion: Date | null; /** * List of trip IDs for trips currently assigned to this vehicle. */ currentTrips: string[] | null; /** * The ETA to the first entry in the waypoints field. */ etaToFirstWaypoint: Date | null; /** * The last reported location of the vehicle. */ latestLocation: google.maps.journeySharing.VehicleLocationUpdate | null; /** * The total numbers of riders this vehicle can carry. The driver is not * considered in this value. */ maximumCapacity: number | null; /** * In the format "providers/{provider_id}/vehicles/{vehicle_id}". * The vehicle_id must be a unique identifier. */ name: string; /** * The current navigation status of the vehicle. */ navigationStatus: google.maps.journeySharing.VehicleNavigationStatus; /** * The remaining driving distance in the current route segment, in meters. */ remainingDistanceMeters: number; /** * Trip types supported by this vehicle. */ supportedTripTypes: google.maps.journeySharing.TripType[] | null; /** * The vehicle state. */ vehicleState: google.maps.journeySharing.VehicleState; /** * The type of this vehicle. */ vehicleType: google.maps.journeySharing.VehicleType; /** * The remaining waypoints assigned to this Vehicle. */ waypoints: google.maps.journeySharing.TripWaypoint[] | null; /** * Last time the waypoints field was updated. */ waypointsVersion: Date | null; } /** * VehicleJourneySegment type */ export interface VehicleJourneySegment { /** * The travel distance from the previous stop to this stop, in meters. */ drivingDistanceMeters: number | null; /** * The travel time from the previous stop this stop, in milliseconds. */ drivingDurationMillis: number | null; /** * The path from the previous stop (or the vehicle's current location, * if this stop is the first in the list of stops) to this stop. */ path: google.maps.LatLngLiteral[] | null; /** * Information about the stop. */ stop: google.maps.journeySharing.DeliveryVehicleStop | null; } /** * VehicleLocationUpdate type */ export interface VehicleLocationUpdate { /** * The heading of the update. 0 corresponds to north, 180 to south. */ heading: number | null; /** * The location of the update. */ location: google.maps.LatLngLiteral | null | google.maps.LatLng; /** * The speed in kilometers per hour. */ speedKilometersPerHour: number | null; /** * The time this update was received from the vehicle. */ time: Date | null; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * Parameters specific to marker customization functions that apply options to * vehicle markers. Used by {@link * google.maps.journeySharing.FleetEngineVehicleLocationProviderOptions.vehicleMarkerCustomization} * and {@link * google.maps.journeySharing.FleetEngineFleetLocationProviderOptions.vehicleMarkerCustomization}. */ export interface VehicleMarkerCustomizationFunctionParams extends google.maps.journeySharing.MarkerCustomizationFunctionParams { /** * The vehicle represented by this marker. */ vehicle: google.maps.journeySharing.Vehicle; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * The current navigation status of a {@link * google.maps.journeySharing.Vehicle}. * * Access by calling `const {VehicleNavigationStatus} = await * google.maps.importLibrary("journeySharing")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum VehicleNavigationStatus { /** * The vehicle is within approximately 50m of the destination. */ ARRIVED_AT_DESTINATION = 'ARRIVED_AT_DESTINATION', /** * Turn-by-turn navigation is available and the Driver app navigation has * entered GUIDED_NAV mode. */ ENROUTE_TO_DESTINATION = 'ENROUTE_TO_DESTINATION', /** * The Driver app's navigation is in FREE_NAV mode. */ NO_GUIDANCE = 'NO_GUIDANCE', /** * The vehicle has gone off the suggested route. */ OFF_ROUTE = 'OFF_ROUTE', /** * Unspecified navigation status. */ UNKNOWN_NAVIGATION_STATUS = 'UNKNOWN_NAVIGATION_STATUS', } /** * Parameters specific to polyline customization functions for {@link * google.maps.journeySharing.FleetEngineVehicleLocationProvider}. */ export interface VehiclePolylineCustomizationFunctionParams extends google.maps.journeySharing.PolylineCustomizationFunctionParams { /** * The vehicle traversing through this polyline. */ vehicle: google.maps.journeySharing.Vehicle; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * The current state of a {@link google.maps.journeySharing.Vehicle}. * * Access by calling `const {VehicleState} = await * google.maps.importLibrary("journeySharing")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum VehicleState { /** * The vehicle is not accepting new trips. */ OFFLINE = 'OFFLINE', /** * The vehicle is accepting new trips. */ ONLINE = 'ONLINE', /** * Unknown vehicle state. */ UNKNOWN_VEHICLE_STATE = 'UNKNOWN_VEHICLE_STATE', } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * The type of {@link google.maps.journeySharing.Vehicle}. * * Access by calling `const {VehicleType} = await * google.maps.importLibrary("journeySharing")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum VehicleType { /** * An automobile. */ AUTO = 'AUTO', /** * Any vehicle that acts as a taxi (typically licensed or regulated). */ TAXI = 'TAXI', /** * A vehicle with a large storage capacity. */ TRUCK = 'TRUCK', /** * A motorcycle, moped, or other two-wheeled vehicle. */ TWO_WHEELER = 'TWO_WHEELER', /** * Unknown vehicle type. */ UNKNOWN = 'UNKNOWN', } /** * VehicleWaypoint type. */ export interface VehicleWaypoint { /** * The path distance between the previous waypoint (or the vehicle's * current location, if this waypoint is the first in the list of waypoints) * to this waypoint in meters. */ distanceMeters: number | null; /** * Travel time between the previous waypoint (or the vehicle's current * location, if this waypoint is the first in the list of waypoints) to this * waypoint in milliseconds. */ durationMillis: number | null; /** * The location of the waypoint. */ location: google.maps.LatLngLiteral | null; /** * The path from the previous waypoint (or the vehicle's current * location, if this waypoint is the first in the list of waypoints) to this * waypoint. */ path: google.maps.LatLngLiteral[] | null; /** * The list of traffic speeds along the path from the previous waypoint (or * vehicle location) to the current waypoint. Each interval in the list * describes the traffic on a contiguous segment on the path; the interval * defines the starting and ending points of the segment via their indices. * See the definition of {@link * google.maps.journeySharing.SpeedReadingInterval} for more details. */ speedReadingIntervals: | google.maps.journeySharing.SpeedReadingInterval[] | null; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * Parameters specific to marker customization functions that apply options to * vehicle waypoint markers. Used by {@link * google.maps.journeySharing.FleetEngineVehicleLocationProviderOptions.originMarkerCustomization}, {@link * google.maps.journeySharing.FleetEngineVehicleLocationProviderOptions.destinationMarkerCustomization} * and {@link * google.maps.journeySharing.FleetEngineVehicleLocationProviderOptions.intermediateDestinationMarkerCustomization} */ export interface VehicleWaypointMarkerCustomizationFunctionParams extends google.maps.journeySharing .VehicleMarkerCustomizationFunctionParams { /** * The 0-based waypoint index associated with this marker. Use this index * on {@link google.maps.journeySharing.Vehicle.waypoints} to retrieve * information about the waypoint. */ waypointIndex: number; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * Waypoint types supported by {@link google.maps.journeySharing.Vehicle}. * * Access by calling `const {WaypointType} = await * google.maps.importLibrary("journeySharing")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum WaypointType { /** * Waypoints for dropping off riders. */ DROP_OFF_WAYPOINT_TYPE = 'DROP_OFF_WAYPOINT_TYPE', /** * Waypoints for intermediate destinations in a multi-destination trip. */ INTERMEDIATE_DESTINATION_WAYPOINT_TYPE = 'INTERMEDIATE_DESTINATION_WAYPOINT_TYPE', /** * Waypoints for picking up riders. */ PICKUP_WAYPOINT_TYPE = 'PICKUP_WAYPOINT_TYPE', /** * Unknown waypoint type. */ UNKNOWN_WAYPOINT_TYPE = 'UNKNOWN_WAYPOINT_TYPE', } } declare namespace google.maps.localContext { /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * Shows a Local Context experience with a {@link google.maps.Map}. * * Access by calling `const {LocalContextMapView} = await * google.maps.importLibrary("localContext")`. See * https://developers.google.com/maps/documentation/javascript/libraries. * @deprecated Local Context is deprecated, and no longer recommended for new * websites. The feature will continue to work, and 12 months notice will * be given before support is discontinued. If you are interested in * building a Local Context-like experience yourself, we suggest that you * check out the "Neighborhood Discovery" solution in Quick * Builder or use the Places * Library, Maps JavaScript API. Code * samples and codelabs * for the Places Library can help you. */ export class LocalContextMapView implements google.maps.localContext.LocalContextMapViewOptions { /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * Shows a Local Context experience with a {@link google.maps.Map}. * * Access by calling `const {LocalContextMapView} = await * google.maps.importLibrary("localContext")`. See * https://developers.google.com/maps/documentation/javascript/libraries. * @deprecated Local Context is deprecated, and no longer recommended for * new websites. The feature will continue to work, and 12 months notice * will be given before support is discontinued. If you are interested * in building a Local Context-like experience yourself, we suggest that * you check out the "Neighborhood Discovery" solution in Quick * Builder or use the Places * Library, Maps JavaScript API. Code * samples and codelabs * for the Places Library can help you. */ constructor(options: google.maps.localContext.LocalContextMapViewOptions); /** * Adds the given listener function to the given event name. */ addListener( eventName: string, handler: Function, ): google.maps.MapsEventListener; /** * See {@link * google.maps.localContext.LocalContextMapViewOptions.directionsOptions}. */ directionsOptions?: null | google.maps.localContext.MapDirectionsOptionsLiteral; /** * This Field is read-only. The DOM Element backing the view. */ element?: HTMLElement | SVGElement | null; /** * Hides the place details. */ hidePlaceDetailsView(): void; /** * Is set to true before {@link * google.maps.localContext.LocalContextMapView} begins changing the bounds * of the inner {@link google.maps.Map}, and set to false * after {@link google.maps.localContext.LocalContextMapView} finishes * changing the bounds of the inner {@link google.maps.Map}. (Not set when * layout mode changes happen due to responsive resizing.) */ isTransitioningMapBounds: boolean; /** * See {@link * google.maps.localContext.LocalContextMapViewOptions.locationBias}. * Changing this property on the LocalContextMapView may * trigger a new search. */ locationBias?: | google.maps.LatLng | google.maps.LatLngLiteral | google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral | google.maps.Circle | google.maps.CircleLiteral | string | null; /** * See {@link * google.maps.localContext.LocalContextMapViewOptions.locationRestriction}. * Changing this property on the LocalContextMapView may * trigger a new search. */ locationRestriction?: | google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral | null; map?: google.maps.Map | null; /** * See {@link * google.maps.localContext.LocalContextMapViewOptions.maxPlaceCount}. * Changing this property on the LocalContextMapView may * trigger a new search. */ maxPlaceCount: number; pinOptionsSetup?: | ((a: { isHighlighted: boolean; isSelected: boolean; }) => google.maps.localContext.PinOptions | null | undefined) | google.maps.localContext.PinOptions | null; placeChooserViewSetup?: | ((a: { defaultLayoutMode: google.maps.localContext.PlaceChooserLayoutMode; defaultPosition: google.maps.localContext.PlaceChooserPosition | null; }) => | google.maps.localContext.PlaceChooserViewSetupOptions | null | undefined) | google.maps.localContext.PlaceChooserViewSetupOptions | null; placeDetailsViewSetup?: | ((a: { defaultLayoutMode: google.maps.localContext.PlaceDetailsLayoutMode; defaultPosition: google.maps.localContext.PlaceDetailsPosition | null; }) => | google.maps.localContext.PlaceDetailsViewSetupOptions | null | undefined) | google.maps.localContext.PlaceDetailsViewSetupOptions | null; /** * See {@link * google.maps.localContext.LocalContextMapViewOptions.placeTypePreferences}. * Changing this property on the LocalContextMapView may * trigger a new search. * Iterable<string|PlaceTypePreference> is also accepted. */ placeTypePreferences: google.maps.localContext.PlaceTypePreference[]; /** * Searches for places to show the user based on the current * maxPlaceCount, placeTypePreferences, * locationRestriction, and locationBias. */ search(): void; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * Options for constructing a {@link * google.maps.localContext.LocalContextMapView}, or accessing an * existing {@link google.maps.localContext.LocalContextMapView}. */ export interface LocalContextMapViewOptions { /** * Options for customizing directions. If not set, directions and distance * will be disabled. */ directionsOptions?: null | google.maps.localContext.MapDirectionsOptionsLiteral; /** * This Field is read-only. The DOM Element backing the view. */ element?: HTMLElement | SVGElement | null; /** * A soft boundary or hint to use when searching for places. * @defaultValue null */ locationBias?: | google.maps.LatLng | google.maps.LatLngLiteral | google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral | google.maps.Circle | google.maps.CircleLiteral | string | null; /** * Bounds to constrain search results. If not specified, results will be * constrained to the map viewport. */ locationRestriction?: | google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral | null; /** * An already instantiated {@link google.maps.Map} instance. If passed in, * the map will be moved into the LocalContextMapView's DOM, and will * not be re-styled. The element associated with the Map * may also have styles and classes applied to it by the * LocalContextMapView. */ map?: google.maps.Map | null; /** * The maximum number of places to show. When this parameter is 0, the Local * Context Library does not load places. [0,24] */ maxPlaceCount: number; /** * Configure the place marker icon based on the icon state. Invoked whenever * the input to the callback changes. Pass a function to dynamically * override the default setup when the LocalContextMapView draws the place * marker. Errors and invalid configurations may be determined * asynchronously, and will be ignored (defaults will be used, and errors * will be logged to the console). */ pinOptionsSetup?: | ((a: { isHighlighted: boolean; isSelected: boolean; }) => google.maps.localContext.PinOptions | null | undefined) | google.maps.localContext.PinOptions | null; /** * Overrides the setup of the place chooser view. Pass a function to * dynamically override the default setup when the LocalContextMapView might * change its layout due to resizing. Errors and invalid configurations may * be determined asynchronously, and will be ignored (defaults will be used * instead, and errors will be logged to the console). Errors detected at * construction will cause errors to be thrown synchronously. */ placeChooserViewSetup?: | ((a: { defaultLayoutMode: google.maps.localContext.PlaceChooserLayoutMode; defaultPosition: google.maps.localContext.PlaceChooserPosition | null; }) => | google.maps.localContext.PlaceChooserViewSetupOptions | null | undefined) | google.maps.localContext.PlaceChooserViewSetupOptions | null; /** * Overrides the setup of the place details view. Pass a function to * dynamically override the default setup when the LocalContextMapView might * change its layout due to resizing. Errors and invalid configurations may * be determined asynchronously, and will be ignored (defaults will be used, * and errors will be logged to the console). Errors detected at * construction will cause errors to be thrown synchronously. */ placeDetailsViewSetup?: | ((a: { defaultLayoutMode: google.maps.localContext.PlaceDetailsLayoutMode; defaultPosition: google.maps.localContext.PlaceDetailsPosition | null; }) => | google.maps.localContext.PlaceDetailsViewSetupOptions | null | undefined) | google.maps.localContext.PlaceDetailsViewSetupOptions | null; /** * The types of places to search for (up to 10). The type * Iterable<string|PlaceTypePreference> is also accepted, * but is only supported in browsers which natively support JavaScript * Symbols. */ placeTypePreferences: google.maps.localContext.PlaceTypePreference[]; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * Provides settings for directions with a {@link * google.maps.localContext.LocalContextMapView}. * * Access by calling `const {MapDirectionsOptions} = await * google.maps.importLibrary("localContext")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class MapDirectionsOptions implements google.maps.localContext.MapDirectionsOptionsLiteral { /** * Adds the given listener function to the given event name. */ addListener( eventName: string, handler: Function, ): google.maps.MapsEventListener; origin: google.maps.LatLng | google.maps.LatLngLiteral; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * Object literals are accepted in place of {@link * google.maps.localContext.MapDirectionsOptions} objects, as a convenience, * in many places. These are converted to {@link * google.maps.localContext.MapDirectionsOptions} objects when the Maps API * encounters them. */ export interface MapDirectionsOptionsLiteral { /** * Origin for directions and distance. */ origin: google.maps.LatLng | google.maps.LatLngLiteral; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * Options for customizing a pin marker. */ export interface PinOptions { /** * The color of the icon's shape, can be any valid CSS color. */ background?: string | null; /** * The color of the icon's glyph, can be any valid CSS color. */ glyphColor?: string | null; /** * The scale of the icon. The value is absolute, not relative to the default * sizes in each state. */ scale?: number | null; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * Layout modes for the place chooser. * * Access by calling `const {PlaceChooserLayoutMode} = await * google.maps.importLibrary("localContext")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum PlaceChooserLayoutMode { /** * Place chooser is hidden. */ HIDDEN = 'HIDDEN', /** * Place chooser is shown as a sheet. */ SHEET = 'SHEET', } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * Display positions for the place chooser. * * Access by calling `const {PlaceChooserPosition} = await * google.maps.importLibrary("localContext")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum PlaceChooserPosition { /** * Place chooser is displayed on a line below the map extending to the end * of the container. */ BLOCK_END = 'BLOCK_END', /** * Place chooser is displayed inline with the map at the end of the line. * (In a left-to-right language this means that the place chooser is to the * right of the map.) */ INLINE_END = 'INLINE_END', /** * Place chooser is displayed inline with the map at the start of the line. * (In a left-to-right language this means that the place chooser is to the * left of the map.) */ INLINE_START = 'INLINE_START', } /** * Setup options for the place chooser. Read more about setting * layout and visibility. */ export interface PlaceChooserViewSetupOptions { layoutMode?: google.maps.localContext.PlaceChooserLayoutMode | null; /** * Ignored when layoutMode:HIDDEN. If not passed, a position * will be determined automatically based on the layoutMode. */ position?: google.maps.localContext.PlaceChooserPosition | null; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * Layout modes for the place details. * * Access by calling `const {PlaceDetailsLayoutMode} = await * google.maps.importLibrary("localContext")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum PlaceDetailsLayoutMode { /** * Place details is displayed in an {@link google.maps.InfoWindow}. */ INFO_WINDOW = 'INFO_WINDOW', /** * Place details is displayed in a sheet. */ SHEET = 'SHEET', } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * Display positions for the place details. * * Access by calling `const {PlaceDetailsPosition} = await * google.maps.importLibrary("localContext")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum PlaceDetailsPosition { /** * Place details is displayed inline with the map at the end of the line. * (In a left-to-right language this means that the place details is to the * right of the map.) */ INLINE_END = 'INLINE_END', /** * Place details is displayed inline with the map at the start of the line. * (In a left-to-right language this means that the place details is to the * left of the map.) */ INLINE_START = 'INLINE_START', } /** * Setup options for the place details. Read more about setting * layout and visibility. */ export interface PlaceDetailsViewSetupOptions { hidesOnMapClick?: boolean; layoutMode?: google.maps.localContext.PlaceDetailsLayoutMode | null; /** * Ignored when layoutMode:INFO_WINDOW. If not passed, a * position will be determined automatically based on the * layoutMode. */ position?: google.maps.localContext.PlaceDetailsPosition | null; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. */ export type PlaceTypePreference = {type: string; weight?: number}; } declare namespace google.maps.maps3d { /** * Available only in the v=alpha channel: https://goo.gle/js-alpha-channel. * * Specifies how altitude components in the coordinates are interpreted. * * Access by calling `const {AltitudeMode} = await * google.maps.importLibrary("maps3d")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum AltitudeMode { /** * Allows to express objects relative to the average mean sea level. That * also means that if the terrain level of detail changes underneath the * object, its absolute position will remain the same. */ ABSOLUTE = 'ABSOLUTE', /** * Allows to express objects placed on the ground. They will remain at * ground level following the terrain regardless of what altitude is * provided. If the object is positioned over a major body of water, it will * be placed at sea level. */ CLAMP_TO_GROUND = 'CLAMP_TO_GROUND', /** * Allows to express objects relative to the ground surface. If the terrain * level of detail changes, the position of the object will remain constant * relative to the ground. When over water, the altitude will be interpreted * as a value in meters above sea level. */ RELATIVE_TO_GROUND = 'RELATIVE_TO_GROUND', /** * Allows to express objects relative to the highest of * ground+building+water surface. When over water, this will be water * surface; when over terrain, this will be the building surface (if * present) or ground surface (if no buildings). */ RELATIVE_TO_MESH = 'RELATIVE_TO_MESH', } /** * Available only in the v=alpha channel: https://goo.gle/js-alpha-channel. * * This event is created from monitoring center change on * Map3DElement. This event bubbles up through the DOM tree. * * Access by calling `const {CenterChangeEvent} = await * google.maps.importLibrary("maps3d")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class CenterChangeEvent extends Event { /** * Available only in the v=alpha channel: https://goo.gle/js-alpha-channel. * * This event is created from monitoring center change on * Map3DElement. This event bubbles up through the DOM tree. * * Access by calling `const {CenterChangeEvent} = await * google.maps.importLibrary("maps3d")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(); } /** * Available only in the v=alpha channel: https://goo.gle/js-alpha-channel. * * This event is created from monitoring heading change on * Map3DElement. This event bubbles up through the DOM tree. * * Access by calling `const {HeadingChangeEvent} = await * google.maps.importLibrary("maps3d")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class HeadingChangeEvent extends Event { /** * Available only in the v=alpha channel: https://goo.gle/js-alpha-channel. * * This event is created from monitoring heading change on * Map3DElement. This event bubbles up through the DOM tree. * * Access by calling `const {HeadingChangeEvent} = await * google.maps.importLibrary("maps3d")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(); } /** * Available only in the v=alpha channel: https://goo.gle/js-alpha-channel. * * This event is created from clicking a Map3DElement. * * Access by calling `const {LocationClickEvent} = await * google.maps.importLibrary("maps3d")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class LocationClickEvent extends Event { /** * Available only in the v=alpha channel: https://goo.gle/js-alpha-channel. * * This event is created from clicking a Map3DElement. * * Access by calling `const {LocationClickEvent} = await * google.maps.importLibrary("maps3d")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(); /** * The latitude/longitude/altitude that was below the cursor when the event * occurred. Please note, that at coarser levels, less accurate data will be * returned. Also, sea floor elevation may be returned for the altitude * value when clicking at the water surface from higher camera positions. * This event bubbles up through the DOM tree. */ position: google.maps.LatLngAltitude | null; } /** * Available only in the v=alpha channel: https://goo.gle/js-alpha-channel. * * Map3DElement is an HTML interface for the 3D Map view. * * Access by calling `const {Map3DElement} = await * google.maps.importLibrary("maps3d")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class Map3DElement extends HTMLElement implements google.maps.maps3d.Map3DElementOptions { /** * Available only in the v=alpha channel: https://goo.gle/js-alpha-channel. * * Map3DElement is an HTML interface for the 3D Map view. * * Access by calling `const {Map3DElement} = await * google.maps.importLibrary("maps3d")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(options?: google.maps.maps3d.Map3DElementOptions); /** * When set, restricts the position of the camera within the specified * lat/lng bounds. Note that objects outside the bounds are still rendered. * Bounds can restrict both longitude and latitude, or can restrict either * latitude or longitude only. For latitude-only bounds use west and east * longitudes of -180 and 180, respectively. For * longitude-only bounds use north and south latitudes of 90 * and -90, respectively. */ bounds?: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral | null; /** * The center of the map given as a LatLngAltitude, where altitude is in * meters above ground level. Note that this is not necessarily where the * camera is located, as the range field affects the * camera's distance from the map center. If not set, defaults to * {lat: 0, lng: 0, altitude: 63170000}. 63170000 meters is a * maximum allowed altitude (Earth radius multiplied by 10). */ center?: google.maps.LatLngAltitudeLiteral | null; /** * When true, default map labels aren't rendered. * @defaultValue false */ defaultLabelsDisabled?: boolean | null; /** * The compass heading of the map, in degrees, where due north is zero. When * there is no tilt, any roll will be interpreted as heading. */ heading?: number | null; /** * The maximum altitude above the ground which will be displayed on the map. * A valid value is between 0 and 63170000 meters * (Earth radius multiplied by 10). */ maxAltitude?: number | null; /** * The maximum angle of heading (rotation) of the map. A valid value is * between 0 and 360 degrees. * minHeading and maxHeading represent an interval * of <= 360 degrees in which heading gestures will be * allowed. minHeading = 180 and maxHeading = 90 * will allow heading in [0, 90] and heading in [180, * 360]. minHeading = 90 and maxHeading = * 180 will allow heading in [90, 180]. */ maxHeading?: number | null; /** * The maximum angle of incidence of the map. A valid value is between * 0 and 90 degrees. */ maxTilt?: number | null; /** * The minimum altitude above the ground which will be displayed on the map. * A valid value is between 0 and 63170000 meters * (Earth radius multiplied by 10). */ minAltitude?: number | null; /** * The minimum angle of heading (rotation) of the map. A valid value is * between 0 and 360 degrees. * minHeading and maxHeading represent an interval * of <= 360 degrees in which heading gestures will be * allowed. minHeading = 180 and maxHeading = 90 * will allow heading in [0, 90] and heading in [180, * 360]. minHeading = 90 and maxHeading = * 180 will allow heading in [90, 180]. */ minHeading?: number | null; /** * The minimum angle of incidence of the map. A valid value is between * 0 and 90 degrees. */ minTilt?: number | null; /** * The distance from camera to the center of the map, in meters. */ range?: number | null; /** * The roll of the camera around the view vector in degrees. To resolve * ambiguities, when there is no tilt, any roll will be interpreted as * heading. */ roll?: number | null; /** * The tilt of the camera's view vector in degrees. A view vector * looking directly down at the earth would have a tilt of zero degrees. A * view vector pointing away from the earth would have a tilt of * 180 degrees. */ tilt?: number | null; } /** * Available only in the v=alpha channel: https://goo.gle/js-alpha-channel. * * Map3DElementOptions object used to define the properties that can be set on * a Map3DElement. */ export interface Map3DElementOptions { /** * See {@link google.maps.maps3d.Map3DElement.bounds}. */ bounds?: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral | null; /** * See {@link google.maps.maps3d.Map3DElement.center}. */ center?: google.maps.LatLngAltitudeLiteral | null; /** * See {@link google.maps.maps3d.Map3DElement.defaultLabelsDisabled}. */ defaultLabelsDisabled?: boolean | null; /** * See {@link google.maps.maps3d.Map3DElement.heading}. */ heading?: number | null; /** * See {@link google.maps.maps3d.Map3DElement.maxAltitude}. */ maxAltitude?: number | null; /** * See {@link google.maps.maps3d.Map3DElement.maxHeading}. */ maxHeading?: number | null; /** * See {@link google.maps.maps3d.Map3DElement.maxTilt}. */ maxTilt?: number | null; /** * See {@link google.maps.maps3d.Map3DElement.minAltitude}. */ minAltitude?: number | null; /** * See {@link google.maps.maps3d.Map3DElement.minHeading}. */ minHeading?: number | null; /** * See {@link google.maps.maps3d.Map3DElement.minTilt}. */ minTilt?: number | null; /** * See {@link google.maps.maps3d.Map3DElement.range}. */ range?: number | null; /** * See {@link google.maps.maps3d.Map3DElement.roll}. */ roll?: number | null; /** * See {@link google.maps.maps3d.Map3DElement.tilt}. */ tilt?: number | null; } /** * Available only in the v=alpha channel: https://goo.gle/js-alpha-channel. * * A 3D polygon (like a 3D polyline) defines a series of connected coordinates * in an ordered sequence. Additionally, polygons form a closed loop and * define a filled region. * * Access by calling `const {Polygon3DElement} = await * google.maps.importLibrary("maps3d")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class Polygon3DElement extends HTMLElement implements google.maps.maps3d.Polygon3DElementOptions { /** * Available only in the v=alpha channel: https://goo.gle/js-alpha-channel. * * A 3D polygon (like a 3D polyline) defines a series of connected * coordinates in an ordered sequence. Additionally, polygons form a closed * loop and define a filled region. * * Access by calling `const {Polygon3DElement} = await * google.maps.importLibrary("maps3d")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(options?: google.maps.maps3d.Polygon3DElementOptions); /** * Specifies how altitude components in the coordinates are interpreted. * @defaultValue {@link google.maps.maps3d.AltitudeMode.ABSOLUTE} */ altitudeMode?: google.maps.maps3d.AltitudeMode | null; /** * Specifies whether parts of the polygon which could be occluded are drawn * or not. Polygons can be occluded by map geometry (e.g. buildings). * @defaultValue false */ drawsOccludedSegments?: boolean | null; /** * Specifies whether to connect the polygon to the ground. To extrude a * polygon, the altitudeMode must be either * RELATIVE_TO_GROUND or ABSOLUTE. * @defaultValue false */ extruded?: boolean | null; /** * The fill color. All CSS3 colors are supported. */ fillColor?: string | null; /** * The fill opacity between 0.0 and 1.0. */ fillOpacity?: number | null; /** * When true, edges of the polygon are interpreted as geodesic * and will follow the curvature of the Earth. When false, * edges of the polygon are rendered as straight lines in screen space. * @defaultValue false */ geodesic?: boolean | null; /** * The ordered sequence of coordinates that designates a closed loop. Unlike * polylines, a polygon may consist of one or more paths, which create * multiple cut-outs inside the polygon. */ innerCoordinates?: Iterable> | null; /** * The ordered sequence of coordinates that designates a closed loop. * Altitude is ignored in certain modes and thus optional. */ outerCoordinates?: Iterable | null; /** * The stroke color. All CSS3 colors are supported. */ strokeColor?: string | null; /** * The stroke opacity between 0.0 and 1.0. */ strokeOpacity?: number | null; /** * The stroke width in pixels. */ strokeWidth?: number | null; /** * The zIndex compared to other polys. */ zIndex?: number | null; } /** * Available only in the v=alpha channel: https://goo.gle/js-alpha-channel. * * Polygon3DElementOptions object used to define the properties that can be * set on a Polygon3DElement. */ export interface Polygon3DElementOptions { /** * See {@link google.maps.maps3d.Polygon3DElement.altitudeMode}. * @defaultValue {@link google.maps.maps3d.AltitudeMode.ABSOLUTE} */ altitudeMode?: google.maps.maps3d.AltitudeMode | null; /** * See {@link google.maps.maps3d.Polygon3DElement.drawsOccludedSegments}. * @defaultValue false */ drawsOccludedSegments?: boolean | null; /** * See {@link google.maps.maps3d.Polygon3DElement.extruded}. * @defaultValue false */ extruded?: boolean | null; /** * See {@link google.maps.maps3d.Polygon3DElement.fillColor}. */ fillColor?: string | null; /** * See {@link google.maps.maps3d.Polygon3DElement.fillOpacity}. */ fillOpacity?: number | null; /** * See {@link google.maps.maps3d.Polygon3DElement.geodesic}. * @defaultValue false */ geodesic?: boolean | null; /** * See {@link google.maps.maps3d.Polygon3DElement.innerCoordinates}. */ innerCoordinates?: Iterable> | null; /** * See {@link google.maps.maps3d.Polygon3DElement.outerCoordinates}. */ outerCoordinates?: Iterable | null; /** * See {@link google.maps.maps3d.Polygon3DElement.strokeColor}. */ strokeColor?: string | null; /** * See {@link google.maps.maps3d.Polygon3DElement.strokeOpacity}. */ strokeOpacity?: number | null; /** * See {@link google.maps.maps3d.Polygon3DElement.strokeWidth}. */ strokeWidth?: number | null; /** * See {@link google.maps.maps3d.Polygon3DElement.zIndex}. */ zIndex?: number | null; } /** * Available only in the v=alpha channel: https://goo.gle/js-alpha-channel. * * A 3D polyline is a linear overlay of connected line segments on a 3D map. * * Access by calling `const {Polyline3DElement} = await * google.maps.importLibrary("maps3d")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class Polyline3DElement extends HTMLElement implements google.maps.maps3d.Polyline3DElementOptions { /** * Available only in the v=alpha channel: https://goo.gle/js-alpha-channel. * * A 3D polyline is a linear overlay of connected line segments on a 3D map. * * Access by calling `const {Polyline3DElement} = await * google.maps.importLibrary("maps3d")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(options?: google.maps.maps3d.Polyline3DElementOptions); /** * Specifies how altitude components in the coordinates are interpreted. * @defaultValue {@link google.maps.maps3d.AltitudeMode.ABSOLUTE} */ altitudeMode?: google.maps.maps3d.AltitudeMode | null; /** * The ordered sequence of coordinates of the Polyline. Altitude is ignored * in certain modes and thus optional. */ coordinates?: Iterable | null; /** * Specifies whether parts of the polyline which could be occluded are drawn * or not. Polylines can be occluded by map geometry (e.g. buildings). * @defaultValue false */ drawsOccludedSegments?: boolean | null; /** * Specifies whether to connect the polyline to the ground. To extrude a * polyline, the altitudeMode must be either * RELATIVE_TO_GROUND or ABSOLUTE. * @defaultValue false */ extruded?: boolean | null; /** * When true, edges of the polyline are interpreted as geodesic * and will follow the curvature of the Earth. When false, * edges of the polyline are rendered as straight lines in screen space. * @defaultValue false */ geodesic?: boolean | null; /** * The outer color. All CSS3 colors are supported. */ outerColor?: string | null; /** * The outer opacity between 0.0 and 1.0. */ outerOpacity?: number | null; /** * The outer width is between 0.0 and 1.0. This is * a percentage of the strokeWidth. */ outerWidth?: number | null; /** * The stroke color. All CSS3 colors are supported. */ strokeColor?: string | null; /** * The stroke opacity between 0.0 and 1.0. */ strokeOpacity?: number | null; /** * The stroke width in pixels. */ strokeWidth?: number | null; /** * The zIndex compared to other polys. */ zIndex?: number | null; } /** * Available only in the v=alpha channel: https://goo.gle/js-alpha-channel. * * Polyline3DElementOptions object used to define the properties that can be * set on a Polyline3DElement. */ export interface Polyline3DElementOptions { /** * See {@link google.maps.maps3d.Polyline3DElement.altitudeMode}. * @defaultValue {@link google.maps.maps3d.AltitudeMode.ABSOLUTE} */ altitudeMode?: google.maps.maps3d.AltitudeMode | null; /** * See {@link google.maps.maps3d.Polyline3DElement.coordinates}. */ coordinates?: Iterable | null; /** * See {@link google.maps.maps3d.Polyline3DElement.drawsOccludedSegments}. * @defaultValue false */ drawsOccludedSegments?: boolean | null; /** * See {@link google.maps.maps3d.Polyline3DElement.extruded}. * @defaultValue false */ extruded?: boolean | null; /** * See {@link google.maps.maps3d.Polyline3DElement.geodesic}. * @defaultValue false */ geodesic?: boolean | null; /** * See {@link google.maps.maps3d.Polyline3DElement.outerColor}. */ outerColor?: string | null; /** * See {@link google.maps.maps3d.Polyline3DElement.outerOpacity}. */ outerOpacity?: number | null; /** * See {@link google.maps.maps3d.Polyline3DElement.outerWidth}. */ outerWidth?: number | null; /** * See {@link google.maps.maps3d.Polyline3DElement.strokeColor}. */ strokeColor?: string | null; /** * See {@link google.maps.maps3d.Polyline3DElement.strokeOpacity}. */ strokeOpacity?: number | null; /** * See {@link google.maps.maps3d.Polyline3DElement.strokeWidth}. */ strokeWidth?: number | null; /** * See {@link google.maps.maps3d.Polyline3DElement.zIndex}. */ zIndex?: number | null; } /** * Available only in the v=alpha channel: https://goo.gle/js-alpha-channel. * * This event is created from monitoring range change on * Map3DElement. This event bubbles up through the DOM tree. * * Access by calling `const {RangeChangeEvent} = await * google.maps.importLibrary("maps3d")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class RangeChangeEvent extends Event { /** * Available only in the v=alpha channel: https://goo.gle/js-alpha-channel. * * This event is created from monitoring range change on * Map3DElement. This event bubbles up through the DOM tree. * * Access by calling `const {RangeChangeEvent} = await * google.maps.importLibrary("maps3d")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(); } /** * Available only in the v=alpha channel: https://goo.gle/js-alpha-channel. * * This event is created from monitoring roll change on * Map3DElement. This event bubbles up through the DOM tree. * * Access by calling `const {RollChangeEvent} = await * google.maps.importLibrary("maps3d")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class RollChangeEvent extends Event { /** * Available only in the v=alpha channel: https://goo.gle/js-alpha-channel. * * This event is created from monitoring roll change on * Map3DElement. This event bubbles up through the DOM tree. * * Access by calling `const {RollChangeEvent} = await * google.maps.importLibrary("maps3d")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(); } /** * Available only in the v=alpha channel: https://goo.gle/js-alpha-channel. * * This event is created from monitoring a steady state of * Map3DElement. This event bubbles up through the DOM tree. * * Access by calling `const {SteadyChangeEvent} = await * google.maps.importLibrary("maps3d")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class SteadyChangeEvent extends Event { /** * Available only in the v=alpha channel: https://goo.gle/js-alpha-channel. * * This event is created from monitoring a steady state of * Map3DElement. This event bubbles up through the DOM tree. * * Access by calling `const {SteadyChangeEvent} = await * google.maps.importLibrary("maps3d")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(); /** * Indicates whether Map3DElement is steady (i.e. all rendering for the * current scene has completed) or not. */ isSteady: boolean; } /** * Available only in the v=alpha channel: https://goo.gle/js-alpha-channel. * * This event is created from monitoring tilt change on * Map3DElement. This event bubbles up through the DOM tree. * * Access by calling `const {TiltChangeEvent} = await * google.maps.importLibrary("maps3d")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class TiltChangeEvent extends Event { /** * Available only in the v=alpha channel: https://goo.gle/js-alpha-channel. * * This event is created from monitoring tilt change on * Map3DElement. This event bubbles up through the DOM tree. * * Access by calling `const {TiltChangeEvent} = await * google.maps.importLibrary("maps3d")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(); } } declare namespace google.maps.marker { /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * This event is created from clicking an Advanced Marker. Access the * marker's position with event.target.position. * * Access by calling `const {AdvancedMarkerClickEvent} = await * google.maps.importLibrary("marker")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class AdvancedMarkerClickEvent extends Event { /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * This event is created from clicking an Advanced Marker. Access the * marker's position with event.target.position. * * Access by calling `const {AdvancedMarkerClickEvent} = await * google.maps.importLibrary("marker")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(); } /** * Shows a position on a map. Note that the position must be set * for the AdvancedMarkerElement to display.

* Note: Usage as a Web Component (e.g. using the custom * <gmp-advanced-marker> HTML element, is only available in * the v=beta channel). * * Access by calling `const {AdvancedMarkerElement} = await * google.maps.importLibrary("marker")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class AdvancedMarkerElement extends HTMLElement implements google.maps.marker.AdvancedMarkerElementOptions { /** * Shows a position on a map. Note that the position must be * set for the AdvancedMarkerElement to display.

* Note: Usage as a Web Component (e.g. using the custom * <gmp-advanced-marker> HTML element, is only available * in the v=beta channel). * * Access by calling `const {AdvancedMarkerElement} = await * google.maps.importLibrary("marker")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(options?: google.maps.marker.AdvancedMarkerElementOptions); /** * Adds the given listener function to the given event name in the Maps * Eventing system. * @param eventName Observed event. * @param handler Function to handle events. */ addListener( eventName: string, handler: Function, ): google.maps.MapsEventListener; /** * See {@link * google.maps.marker.AdvancedMarkerElementOptions.collisionBehavior}. */ collisionBehavior?: google.maps.CollisionBehavior | null; /** * See {@link google.maps.marker.AdvancedMarkerElementOptions.content}. */ content?: Node | null; /** * This field is read-only. The DOM Element backing the view. */ element: HTMLElement; /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * See {@link google.maps.marker.AdvancedMarkerElementOptions.gmpClickable}. */ gmpClickable?: boolean | null; /** * See {@link google.maps.marker.AdvancedMarkerElementOptions.gmpDraggable}. */ gmpDraggable?: boolean | null; /** * See {@link google.maps.marker.AdvancedMarkerElementOptions.map}. */ map?: google.maps.Map | null; /** * See {@link google.maps.marker.AdvancedMarkerElementOptions.position}. */ position?: | google.maps.LatLng | google.maps.LatLngLiteral | google.maps.LatLngAltitudeLiteral | null; /** * See {@link google.maps.marker.AdvancedMarkerElementOptions.title}. */ title: string; /** * See {@link google.maps.marker.AdvancedMarkerElementOptions.zIndex}. */ zIndex?: number | null; } /** * Options for constructing an {@link * google.maps.marker.AdvancedMarkerElement}. */ export interface AdvancedMarkerElementOptions { /** * An enumeration specifying how an AdvancedMarkerElement * should behave when it collides with another * AdvancedMarkerElement or with the basemap labels on a vector * map.

Note: AdvancedMarkerElement to * AdvancedMarkerElement collision works on both raster and * vector maps, however, AdvancedMarkerElement to base * map's label collision only works on vector maps. */ collisionBehavior?: google.maps.CollisionBehavior | null; /** * The DOM Element backing the visual of an * AdvancedMarkerElement.

Note: * AdvancedMarkerElement does not clone the passed-in DOM * element. Once the DOM element is passed to an * AdvancedMarkerElement, passing the same DOM element to * another AdvancedMarkerElement will move the DOM element and * cause the previous AdvancedMarkerElement to look empty. * @defaultValue {@link google.maps.marker.PinElement.element} */ content?: Node | null; /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * If true, the AdvancedMarkerElement will be * clickable and trigger the gmp-click event, and will be * interactive for accessibility purposes (e.g. allowing keyboard navigation * via arrow keys). * @defaultValue false */ gmpClickable?: boolean | null; /** * If true, the AdvancedMarkerElement can be * dragged.

Note: AdvancedMarkerElement * with altitude is not draggable. * @defaultValue false */ gmpDraggable?: boolean | null; /** * Map on which to display the AdvancedMarkerElement. The map * is required to display the AdvancedMarkerElement and can be * provided by setting {@link google.maps.marker.AdvancedMarkerElement.map} * if not provided at the construction. */ map?: google.maps.Map | null; /** * Sets the AdvancedMarkerElement's position. An * AdvancedMarkerElement may be constructed without a position, * but will not be displayed until its position is provided - for example, * by a user's actions or choices. An * AdvancedMarkerElement's position can be provided by * setting {@link google.maps.marker.AdvancedMarkerElement.position} if not * provided at the construction.

Note: * AdvancedMarkerElement with altitude is only supported on * vector maps. */ position?: google.maps.LatLng | google.maps.LatLngLiteral | null; /** * Rollover text. If provided, an accessibility text (e.g. for use with * screen readers) will be added to the AdvancedMarkerElement * with the provided value. */ title?: string | null; /** * All AdvancedMarkerElements are displayed on the map in order * of their zIndex, with higher values displaying in front of * AdvancedMarkerElements with lower values. By default, * AdvancedMarkerElements are displayed according to their * vertical position on screen, with lower * AdvancedMarkerElements appearing in front of * AdvancedMarkerElements farther up the screen. Note that * zIndex is also used to help determine relative priority * between {@link * google.maps.CollisionBehavior.OPTIONAL_AND_HIDES_LOWER_PRIORITY} Advanced * Markers. A higher zIndex value indicates higher priority. */ zIndex?: number | null; } /** * A PinElement represents a DOM element that consists of a shape * and a glyph. The shape has the same balloon style as seen in the * default {@link google.maps.marker.AdvancedMarkerElement}. The glyph is an * optional DOM element displayed in the balloon shape. A * PinElement may have a different aspect ratio depending on * its {@link google.maps.marker.PinElement.scale}.

* Note: Usage as a Web Component (e.g. usage as an * HTMLElement subclass, or via HTML) is not yet supported. * * Access by calling `const {PinElement} = await * google.maps.importLibrary("marker")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class PinElement extends HTMLElement implements google.maps.marker.PinElementOptions { /** * A PinElement represents a DOM element that consists of a * shape and a glyph. The shape has the same balloon style as seen in the * default {@link google.maps.marker.AdvancedMarkerElement}. The glyph is an * optional DOM element displayed in the balloon shape. A * PinElement may have a different aspect ratio depending on * its {@link google.maps.marker.PinElement.scale}.

* Note: Usage as a Web Component (e.g. usage as an * HTMLElement subclass, or via HTML) is not yet supported. * * Access by calling `const {PinElement} = await * google.maps.importLibrary("marker")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(options?: google.maps.marker.PinElementOptions); /** * See {@link google.maps.marker.PinElementOptions.background}. */ background?: string | null; /** * See {@link google.maps.marker.PinElementOptions.borderColor}. */ borderColor?: string | null; /** * This field is read-only. The DOM Element backing the view. */ element: HTMLElement; /** * See {@link google.maps.marker.PinElementOptions.glyph}. */ glyph?: string | Element | URL | null; /** * See {@link google.maps.marker.PinElementOptions.glyphColor}. */ glyphColor?: string | null; /** * See {@link google.maps.marker.PinElementOptions.scale}. */ scale?: number | null; } /** * Options for creating a {@link google.maps.marker.PinElement}. */ export interface PinElementOptions { /** * The background color of the pin shape. Supports any CSS color * value. */ background?: string | null; /** * The border color of the pin shape. Supports any CSS color * value. */ borderColor?: string | null; /** * The DOM element displayed in the pin. */ glyph?: string | Element | URL | null; /** * The color of the glyph. Supports any CSS color * value. */ glyphColor?: string | null; /** * The scale of the pin. * @defaultValue 1 */ scale?: number | null; } } declare namespace google.maps.places { /** * Access by calling `const {AccessibilityOptions} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class AccessibilityOptions { /** * Whether a place has a wheelchair accessible entrance. Returns * 'true' or 'false' if the value is known. Returns * 'null' if the value is unknown. */ hasWheelchairAccessibleEntrance: boolean | null; /** * Whether a place has wheelchair accessible parking. Returns 'true' * or * 'false' if the value is known. Returns 'null' if the * value is unknown. */ hasWheelchairAccessibleParking: boolean | null; /** * Whether a place has a wheelchair accessible restroom. Returns * 'true' or 'false' if the value is known. Returns * 'null' if the value is unknown. */ hasWheelchairAccessibleRestroom: boolean | null; /** * Whether a place offers wheelchair accessible seating. Returns * 'true' or 'false' if the value is known. Returns * 'null' if the value is unknown. */ hasWheelchairAccessibleSeating: boolean | null; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * * Access by calling `const {AddressComponent} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class AddressComponent { /** * The full text of the address component. */ longText: string | null; /** * The abbreviated, short text of the given address component. */ shortText: string | null; /** * An array of strings denoting the type of this address component. A list * of valid types can be found here. */ types: string[]; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * * Access by calling `const {Attribution} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class Attribution { /** * Attribution text to be displayed for this Place result. */ provider: string | null; providerURI: string | null; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * * Access by calling `const {AuthorAttribution} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class AuthorAttribution { /** * Author's name for this result. */ displayName: string; /** * Author's photo URI for this result. This may not always be available. */ photoURI: string | null; /** * Author's profile URI for this result. */ uri: string | null; } /** * A widget that provides Place predictions based on a user's text input. * It attaches to an input element of type text, and listens for * text entry in that field. The list of predictions is presented as a * drop-down list, and is updated as text is entered. * * Access by calling `const {Autocomplete} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class Autocomplete extends google.maps.MVCObject { /** * A widget that provides Place predictions based on a user's text * input. It attaches to an input element of type text, and * listens for text entry in that field. The list of predictions is * presented as a drop-down list, and is updated as text is entered. * * Access by calling `const {Autocomplete} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. * @param inputField The <input> text field to which the * Autocomplete should be attached. * @param opts Options. */ constructor( inputField: HTMLInputElement, opts?: google.maps.places.AutocompleteOptions | null, ); /** * Returns the bounds to which predictions are biased. */ getBounds(): google.maps.LatLngBounds | undefined; /** * Returns the fields to be included for the Place in the details response * when the details are successfully retrieved. For a list of fields * see {@link google.maps.places.PlaceResult}. */ getFields(): string[] | undefined; /** * Returns the details of the Place selected by user if the details were * successfully retrieved. Otherwise returns a stub Place object, with the * name property set to the current value of the input field. */ getPlace(): google.maps.places.PlaceResult; /** * Sets the preferred area within which to return Place results. Results are * biased towards, but not restricted to, this area. * @param bounds The biasing bounds. */ setBounds( bounds: | google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral | undefined, ): void; /** * Sets the component restrictions. Component restrictions are used to * restrict predictions to only those within the parent component. For * example, the country. * @param restrictions The restrictions to use. */ setComponentRestrictions( restrictions: google.maps.places.ComponentRestrictions | null, ): void; /** * Sets the fields to be included for the Place in the details response when * the details are successfully retrieved. For a list of fields see {@link * google.maps.places.PlaceResult}. */ setFields(fields: string[] | undefined): void; setOptions(options: google.maps.places.AutocompleteOptions | null): void; /** * Sets the types of predictions to be returned. For supported types, see * the * developer's guide. If no types are specified, all types will be * returned. * @param types The types of predictions to be included. */ setTypes(types: string[] | null): void; } /** * The options that can be set on an Autocomplete object. */ export interface AutocompleteOptions { /** * The area in which to search for places. */ bounds?: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral; /** * The component restrictions. Component restrictions are used to restrict * predictions to only those within the parent component. For example, the * country. */ componentRestrictions?: google.maps.places.ComponentRestrictions; /** * Fields to be included for the Place in the details response when the * details are successfully retrieved, which * will be billed for. If ['ALL'] is passed in, all * available fields will be returned and billed for (this is not recommended * for production deployments). For a list of fields see {@link * google.maps.places.PlaceResult}. Nested fields can be specified with * dot-paths (for example, "geometry.location"). The default is * ['ALL']. */ fields?: string[]; /** * Whether to retrieve only Place IDs. The PlaceResult made available when * the place_changed event is fired will only have the place_id, types and * name fields, with the place_id, types and description returned by the * Autocomplete service. Disabled by default. * @deprecated placeIdOnly is deprecated as of January 15, * 2019, and will be turned off on January 15, 2020. Use {@link * google.maps.places.AutocompleteOptions.fields} instead: fields: * ['place_id', 'name', 'types']. */ placeIdOnly?: boolean; /** * A boolean value, indicating that the Autocomplete widget should only * return those places that are inside the bounds of the Autocomplete widget * at the time the query is sent. Setting strictBounds to false * (which is the default) will make the results biased towards, but not * restricted to, places contained within the bounds. */ strictBounds?: boolean; /** * The types of predictions to be returned. For supported types, see the * developer's guide. If no types are specified, all types will be * returned. */ types?: string[]; } /** * Represents a single autocomplete prediction. */ export interface AutocompletePrediction { /** * This is the unformatted version of the query suggested by the Places * service. */ description: string; /** * The distance in meters of the place from the {@link * google.maps.places.AutocompletionRequest.origin}. */ distance_meters?: number; /** * A set of substrings in the place's description that match elements in * the user's input, suitable for use in highlighting those substrings. * Each substring is identified by an offset and a length, expressed in * unicode characters. */ matched_substrings: google.maps.places.PredictionSubstring[]; /** * A place ID that can be used to retrieve details about this place using * the place details service (see {@link * google.maps.places.PlacesService.getDetails}). */ place_id: string; /** * Structured information about the place's description, divided into a * main text and a secondary text, including an array of matched substrings * from the autocomplete input, identified by an offset and a length, * expressed in unicode characters. */ structured_formatting: google.maps.places.StructuredFormatting; /** * Information about individual terms in the above description, from most to * least specific. For example, "Taco Bell", "Willitis", * and "CA". */ terms: google.maps.places.PredictionTerm[]; /** * An array of types that the prediction belongs to, for example * 'establishment' or 'geocode'. */ types: string[]; } /** * Request interface for {@link * google.maps.places.AutocompleteSuggestion.fetchAutocompleteSuggestions}. */ export interface AutocompleteRequest { /** * Included primary Place * type (for example, "restaurant" or * "gas_station").

A Place is only returned if its * primary type is included in this list. Up to 5 values can be specified. * If no types are specified, all Place types are returned. */ includedPrimaryTypes?: string[]; /** * Only include results in the specified regions, specified as up to 15 CLDR * two-character region codes. An empty set will not restrict the results. * If both locationRestriction and * includedRegionCodes are set, the results will be located in * the area of intersection. */ includedRegionCodes?: string[]; /** * The text string on which to search. */ input: string; /** * A zero-based Unicode character offset of input indicating * the cursor position in input. The cursor position may * influence what predictions are returned. If not specified, defaults to * the length of input. */ inputOffset?: number; /** * The language in which to return results. Will default to the * browser's language preference. The results may be in mixed languages * if the language used in input is different from * language, or if the returned Place does not have a * translation from the local language to language. */ language?: string; /** * Bias results to a specified location.

At most one of * locationBias or locationRestriction should be * set. If neither are set, the results will be biased by IP address, * meaning the IP address will be mapped to an imprecise location and used * as a biasing signal. */ locationBias?: | google.maps.LatLng | google.maps.LatLngLiteral | google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral | google.maps.Circle | google.maps.CircleLiteral | string; /** * Restrict results to a specified location.

At most one of * locationBias or locationRestriction should be * set. If neither are set, the results will be biased by IP address, * meaning the IP address will be mapped to an imprecise location and used * as a biasing signal. */ locationRestriction?: | google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral; /** * The origin point from which to calculate geodesic distance to the * destination (returned as {@link * google.maps.places.PlacePrediction.distanceMeters}). If this value is * omitted, geodesic distance will not be returned. */ origin?: google.maps.LatLng | google.maps.LatLngLiteral; /** * The region code, specified as a CLDR two-character region code. This * affects address formatting, result ranking, and may influence what * results are returned. This does not restrict results to the specified * region. */ region?: string; /** * A token which identifies an Autocomplete session for billing purposes. * Generate a new session token via {@link * google.maps.places.AutocompleteSessionToken}.

The session * begins when the user starts typing a query, and concludes when they * select a place and call {@link google.maps.places.Place.fetchFields}. * Each session can have multiple queries, followed by one * fetchFields call. The credentials used for each request * within a session must belong to the same Google Cloud Console project. * Once a session has concluded, the token is no longer valid; your app must * generate a fresh token for each session. If the sessionToken * parameter is omitted, or if you reuse a session token, the session is * charged as if no session token was provided (each request is billed * separately).

We recommend the following guidelines: *

  • Use session tokens for all Place Autocomplete calls.
  • *
  • Generate a fresh token for each session.
  • Be sure to pass a * unique session token for each new session. Using the same token for more * than one session will result in each request being billed * individually.
*/ sessionToken?: google.maps.places.AutocompleteSessionToken; } /** * An Autocomplete response returned by the call to {@link * google.maps.places.AutocompleteService.getPlacePredictions} containing a * list of {@link google.maps.places.AutocompletePrediction}s. */ export interface AutocompleteResponse { /** * The list of {@link google.maps.places.AutocompletePrediction}s. */ predictions: google.maps.places.AutocompletePrediction[]; } /** * Contains methods related to retrieving Autocomplete predictions. * * Access by calling `const {AutocompleteService} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class AutocompleteService { /** * Retrieves place autocomplete predictions based on the supplied * autocomplete request. * @param request The autocompletion request. * @param callback A callback accepting an array of AutocompletePrediction * objects and a PlacesServiceStatus value as argument. */ getPlacePredictions( request: google.maps.places.AutocompletionRequest, callback?: ( a: google.maps.places.AutocompletePrediction[] | null, b: google.maps.places.PlacesServiceStatus, ) => void, ): Promise; /** * Retrieves query autocomplete predictions based on the supplied query * autocomplete request. * @param request The query autocompletion request. * @param callback A callback accepting an array of * QueryAutocompletePrediction objects and a PlacesServiceStatus value * as argument. */ getQueryPredictions( request: google.maps.places.QueryAutocompletionRequest, callback: ( a: google.maps.places.QueryAutocompletePrediction[] | null, b: google.maps.places.PlacesServiceStatus, ) => void, ): void; } /** * Represents a session token used for tracking an autocomplete session. * * Access by calling `const {AutocompleteSessionToken} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class AutocompleteSessionToken {} /** * An Autocomplete suggestion result. * * Access by calling `const {AutocompleteSuggestion} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class AutocompleteSuggestion { /** * Contains the human-readable name for the returned result. For * establishment results, this is usually the business name and address. */ placePrediction: google.maps.places.PlacePrediction | null; /** * Fetches a list of AutocompleteSuggestions. */ static fetchAutocompleteSuggestions( this: any, autocompleteRequest: google.maps.places.AutocompleteRequest, ): Promise<{suggestions: google.maps.places.AutocompleteSuggestion[]}>; } /** * An Autocompletion request to be sent to {@link * google.maps.places.AutocompleteService.getPlacePredictions}. */ export interface AutocompletionRequest { /** * Bounds for prediction biasing. Predictions will be biased towards, but * not restricted to, the given bounds. Both * location and radius will be ignored if * bounds is set. * @deprecated bounds is deprecated as of May 2023. Use {@link * google.maps.places.AutocompletionRequest.locationBias} and {@link * google.maps.places.AutocompletionRequest.locationRestriction} * instead. */ bounds?: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral; /** * The component restrictions. Component restrictions are used to restrict * predictions to only those within the parent component. For example, the * country. */ componentRestrictions?: google.maps.places.ComponentRestrictions; /** * The user entered input string. */ input: string; /** * A language identifier for the language in which the results should be * returned, if possible. Results in the selected language may be given a * higher ranking, but suggestions are not restricted to this language. See * the list * of supported languages. */ language?: string | null; /** * Location for prediction biasing. Predictions will be biased towards the * given location and radius. Alternatively, * bounds can be used. * @deprecated location is deprecated as of May 2023. * Use {@link google.maps.places.AutocompletionRequest.locationBias} * and {@link * google.maps.places.AutocompletionRequest.locationRestriction} * instead. */ location?: google.maps.LatLng; /** * A soft boundary or hint to use when searching for places. */ locationBias?: | google.maps.LatLng | google.maps.LatLngLiteral | google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral | google.maps.Circle | google.maps.CircleLiteral | string | null; /** * Bounds to constrain search results. */ locationRestriction?: | google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral | null; /** * The character position in the input term at which the service uses text * for predictions (the position of the cursor in the input field). */ offset?: number; /** * The location where {@link * google.maps.places.AutocompletePrediction.distance_meters} is calculated * from. */ origin?: google.maps.LatLng | google.maps.LatLngLiteral; /** * The radius of the area used for prediction biasing. The * radius is specified in meters, and must always be * accompanied by a location property. Alternatively, * bounds can be used. * @deprecated radius is deprecated as of May 2023. Use {@link * google.maps.places.AutocompletionRequest.locationBias} and {@link * google.maps.places.AutocompletionRequest.locationRestriction} * instead. */ radius?: number; /** * A region code which is used for result formatting and for result * filtering. It does not restrict the suggestions to this country. The * region code accepts a ccTLD * ("top-level domain") two-character value. Most ccTLD codes * are identical to ISO 3166-1 codes, with some notable exceptions. For * example, the United Kingdom's ccTLD is "uk" * (.co.uk) while its ISO 3166-1 code is "gb" * (technically for the entity of "The United Kingdom of Great Britain * and Northern Ireland"). */ region?: string | null; /** * Unique reference used to bundle individual requests into sessions. */ sessionToken?: google.maps.places.AutocompleteSessionToken; /** * The types of predictions to be returned. For supported types, see the * developer's guide. If no types are specified, all types will be * returned. */ types?: string[]; } /** * The operational status of the Place, if it is a business, returned in a * PlaceResult (indicates whether the place is operational, or closed either * temporarily or permanently). Specify these by value, or the constant's * name (example: 'OPERATIONAL' or * google.maps.places.BusinessStatus.OPERATIONAL). * * Access by calling `const {BusinessStatus} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum BusinessStatus { /** * The business is closed permanently. */ CLOSED_PERMANENTLY = 'CLOSED_PERMANENTLY', /** * The business is closed temporarily. */ CLOSED_TEMPORARILY = 'CLOSED_TEMPORARILY', /** * The business is operating normally. */ OPERATIONAL = 'OPERATIONAL', } /** * Defines the component restrictions that can be used with the autocomplete * service. */ export interface ComponentRestrictions { /** * Restricts predictions to the specified country (ISO 3166-1 Alpha-2 * country code, case insensitive). For example, 'us', * 'br', or 'au'. You can provide a single one, or * an array of up to five country code strings. */ country: string | string[] | null; } /** * EV charging information, aggregated for connectors of the same type and the * same charge rate. * * Access by calling `const {ConnectorAggregation} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class ConnectorAggregation { /** * The time when the connector availability information in this aggregation * was last updated. */ availabilityLastUpdateTime: Date | null; /** * Number of connectors in this aggregation that are currently available. */ availableCount: number | null; /** * Number of connectors in this aggregation. */ count: number; /** * The static max charging rate in kw of each connector of the aggregation. */ maxChargeRateKw: number; /** * Number of connectors in this aggregation that are currently out of * service. */ outOfServiceCount: number | null; /** * The connector type of this aggregation. */ type: google.maps.places.EVConnectorType | null; } /** * Information about the EV charging station hosted in the place. * * Access by calling `const {EVChargeOptions} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class EVChargeOptions { /** * A list of EV charging connector aggregations that contain connectors of * the same type and same charge rate. */ connectorAggregations: google.maps.places.ConnectorAggregation[]; /** * Number of connectors at this station. Because some ports can have * multiple connectors but only be able to charge one car at a time, the * number of connectors may be greater than the total number of cars which * can charge simultaneously. */ connectorCount: number; } /** * EV charging connector types. * * Access by calling `const {EVConnectorType} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum EVConnectorType { /** * Combined Charging System (AC and DC). Based on SAE Type-1 J-1772 * connector. */ CCS_COMBO_1 = 'CCS_COMBO_1', /** * Combined Charging System (AC and DC). Based on Type-2 Mennekes connector. */ CCS_COMBO_2 = 'CCS_COMBO_2', /** * CHAdeMO type connector. */ CHADEMO = 'CHADEMO', /** * J1772 type 1 connector. */ J1772 = 'J1772', /** * Other connector types. */ OTHER = 'OTHER', /** * The generic TESLA connector. This is NACS in the North America but can be * non-NACS in other parts of the world (e.g. CCS Combo 2 (CCS2) or GB/T). * This value is less representative of an actual connector type, and more * represents the ability to charge a Tesla brand vehicle at a Tesla owned * charging station. */ TESLA = 'TESLA', /** * IEC 62196 type 2 connector. Often referred to as MENNEKES. */ TYPE_2 = 'TYPE_2', /** * GB/T type corresponds to the GB/T standard in China. This type covers all * GB_T types. */ UNSPECIFIED_GB_T = 'UNSPECIFIED_GB_T', /** * Unspecified wall outlet. */ UNSPECIFIED_WALL_OUTLET = 'UNSPECIFIED_WALL_OUTLET', } /** * EV-related options that can be specified for a place search request. */ export interface EVSearchOptions { /** * The list of preferred EV connector types. A place that does not support * any of the listed connector types is filtered out. */ connectorTypes?: google.maps.places.EVConnectorType[]; /** * Minimum required charging rate in kilowatts. A place with a charging rate * less than the specified rate is filtered out. */ minimumChargingRateKw?: number; } /** * Options for fetching Place fields. */ export interface FetchFieldsRequest { /** * List of fields to be fetched. */ fields: string[]; } /** * A find place from text search request to be sent to {@link * google.maps.places.PlacesService.findPlaceFromPhoneNumber}. */ export interface FindPlaceFromPhoneNumberRequest { /** * Fields to be included in the response, which * will be billed for. If ['ALL'] is passed in, all * available fields will be returned and billed for (this is not recommended * for production deployments). For a list of fields see {@link * google.maps.places.PlaceResult}. Nested fields can be specified with * dot-paths (for example, "geometry.location"). */ fields: string[]; /** * A language identifier for the language in which names and addresses * should be returned, when possible. See the list of * supported languages. */ language?: string | null; /** * The bias used when searching for Place. The result will be biased * towards, but not restricted to, the given {@link * google.maps.places.LocationBias}. */ locationBias?: | google.maps.LatLng | google.maps.LatLngLiteral | google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral | google.maps.Circle | google.maps.CircleLiteral | string; /** * The phone number of the place to look up. Format must be E.164. */ phoneNumber: string; } /** * A find place from text search request to be sent to {@link * google.maps.places.PlacesService.findPlaceFromQuery}. */ export interface FindPlaceFromQueryRequest { /** * Fields to be included in the response, which * will be billed for. If ['ALL'] is passed in, all * available fields will be returned and billed for (this is not recommended * for production deployments). For a list of fields see {@link * google.maps.places.PlaceResult}. Nested fields can be specified with * dot-paths (for example, "geometry.location"). */ fields: string[]; /** * A language identifier for the language in which names and addresses * should be returned, when possible. See the list of * supported languages. */ language?: string | null; /** * The bias used when searching for Place. The result will be biased * towards, but not restricted to, the given {@link * google.maps.places.LocationBias}. */ locationBias?: | google.maps.LatLng | google.maps.LatLngLiteral | google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral | google.maps.Circle | google.maps.CircleLiteral | string; /** * The request's query. For example, the name or address of a place. */ query: string; } /** * Text representing a Place prediction. The text may be used as is or * formatted. * * Access by calling `const {FormattableText} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class FormattableText { /** * A list of string ranges identifying where the input request matched * in {@link google.maps.places.FormattableText.text}. The ranges can be * used to format specific parts of text. The substrings may * not be exact matches of {@link * google.maps.places.AutocompleteRequest.input} if the matching was * determined by criteria other than string matching (for example, spell * corrections or transliterations). These values are Unicode character * offsets of {@link google.maps.places.FormattableText.text}. The ranges * are guaranteed to be ordered in increasing offset values. */ matches: google.maps.places.StringRange[]; /** * Text that may be used as is or formatted with {@link * google.maps.places.FormattableText.matches}. */ text: string; } /** * The most recent information about fuel options in a gas station. This * information is updated regularly. * * Access by calling `const {FuelOptions} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class FuelOptions { /** * A list of fuel prices for each type of fuel this station has, one entry * per fuel type. */ fuelPrices: google.maps.places.FuelPrice[]; } /** * Fuel price information for a given type of fuel. * * Access by calling `const {FuelPrice} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class FuelPrice { /** * The price of the fuel. */ price: google.maps.places.Money | null; /** * The type of fuel. */ type: google.maps.places.FuelType | null; /** * The time the fuel price was last updated. */ updateTime: Date | null; } /** * Types of fuel. * * Access by calling `const {FuelType} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum FuelType { /** * Bio-diesel. */ BIO_DIESEL = 'BIO_DIESEL', /** * Diesel fuel. */ DIESEL = 'DIESEL', /** * E 80. */ E80 = 'E80', /** * E 85. */ E85 = 'E85', /** * LPG. */ LPG = 'LPG', /** * Methane. */ METHANE = 'METHANE', /** * Midgrade. */ MIDGRADE = 'MIDGRADE', /** * Premium. */ PREMIUM = 'PREMIUM', /** * Regular unleaded. */ REGULAR_UNLEADED = 'REGULAR_UNLEADED', /** * SP 100. */ SP100 = 'SP100', /** * SP 91. */ SP91 = 'SP91', /** * SP 91 E10. */ SP91_E10 = 'SP91_E10', /** * SP 92. */ SP92 = 'SP92', /** * SP 95. */ SP95 = 'SP95', /** * SP95 E10. */ SP95_E10 = 'SP95_E10', /** * SP 98. */ SP98 = 'SP98', /** * SP 99. */ SP99 = 'SP99', /** * Truck diesel. */ TRUCK_DIESEL = 'TRUCK_DIESEL', } export type LocationBias = | google.maps.LatLng | google.maps.LatLngLiteral | google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral | google.maps.Circle | google.maps.CircleLiteral | string; export type LocationRestriction = | google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral; /** * A representation of an amount of money with its currency type. * * Access by calling `const {Money} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class Money { /** * The three-letter currency code, defined in ISO 4217. */ currencyCode: string; /** * Number of nano (10^-9) units of the amount. */ nanos: number; /** * Returns a human-readable representation of the amount of money with its * currency symbol. */ toString(): string; /** * The whole units of the amount. For example, if {@link * google.maps.places.Money.currencyCode} is "USD", then 1 unit is * 1 US dollar. */ units: number; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * * Access by calling `const {OpeningHours} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class OpeningHours { /** * Opening periods covering each day of the week, starting from Sunday, in * chronological order. Does not include days where the Place is not open. */ periods: google.maps.places.OpeningHoursPeriod[]; /** * An array of seven strings representing the formatted opening hours for * each day of the week. The Places Service will format and localize the * opening hours appropriately for the current language. The ordering of the * elements in this array depends on the language. Some languages start the * week on Monday, while others start on Sunday. */ weekdayDescriptions: string[]; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * * Access by calling `const {OpeningHoursPeriod} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class OpeningHoursPeriod { /** * The closing time for the Place. */ close: google.maps.places.OpeningHoursPoint | null; /** * The opening time for the Place. */ open: google.maps.places.OpeningHoursPoint; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * * Access by calling `const {OpeningHoursPoint} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class OpeningHoursPoint { /** * The day of the week, as a number in the range [0, 6], starting on Sunday. * For example, 2 means Tuesday. */ day: number; /** * The hour of the OpeningHoursPoint.time as a number, in the range [0, 23]. * This will be reported in the Place’s time zone. */ hour: number; /** * The minute of the OpeningHoursPoint.time as a number, in the range [0, * 59]. This will be reported in the Place’s time zone. */ minute: number; } /** * Access by calling `const {ParkingOptions} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class ParkingOptions { /** * Whether a place offers free garage parking. Returns 'true' or * 'false' if the value is known. Returns 'null' if the * value is unknown. */ hasFreeGarageParking: boolean | null; /** * Whether a place offers free parking lots. Returns 'true' or * 'false' if the value is known. Returns 'null' if the * value is unknown. */ hasFreeParkingLot: boolean | null; /** * Whether a place offers free street parking. Returns 'true' or * 'false' if the value is known. Returns 'null' if the * value is unknown. */ hasFreeStreetParking: boolean | null; /** * Whether a place offers paid garage parking. Returns 'true' or * 'false' if the value is known. Returns 'null' if the * value is unknown. */ hasPaidGarageParking: boolean | null; /** * Whether a place offers paid parking lots. Returns 'true' or * 'false' if the value is known. Returns 'null' if the * value is unknown. */ hasPaidParkingLot: boolean | null; /** * Whether a place offers paid street parking. Returns 'true' or * 'false' if the value is known. Returns 'null' if the * value is unknown. */ hasPaidStreetParking: boolean | null; /** * Whether a place offers valet parking. Returns 'true' or * 'false' if the value is known. Returns 'null' if the * value is unknown. */ hasValetParking: boolean | null; } /** * Access by calling `const {PaymentOptions} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class PaymentOptions { /** * Whether a place only accepts payment via cash. Returns 'true' or * 'false' if the value is known. Returns 'null' if the * value is unknown. */ acceptsCashOnly: boolean | null; /** * Whether a place accepts payment via credit card. Returns 'true' * or * 'false' if the value is known. Returns 'null' if the * value is unknown. */ acceptsCreditCards: boolean | null; /** * Whether a place accepts payment via debit card. Returns 'true' or * 'false' if the value is known. Returns 'null' if the * value is unknown. */ acceptsDebitCards: boolean | null; /** * Whether a place accepts payment via NFC. Returns 'true' or * 'false' if the value is known. Returns 'null' if the * value is unknown. */ acceptsNFC: boolean | null; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * * Access by calling `const {Photo} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class Photo { /** * Attribution text to be displayed for this photo. */ authorAttributions: google.maps.places.AuthorAttribution[]; /** * Returns the image URL corresponding to the specified options. */ getURI(options?: google.maps.places.PhotoOptions): string; /** * The height of the photo in pixels. */ heightPx: number; /** * The width of the photo in pixels. */ widthPx: number; } /** * Defines photo-requesting options. */ export interface PhotoOptions { /** * The maximum height in pixels of the returned image. */ maxHeight?: number | null; /** * The maximum width in pixels of the returned image. */ maxWidth?: number | null; } /** * Access by calling `const {Place} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class Place { /** * Access by calling `const {Place} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(options: google.maps.places.PlaceOptions); /** * Accessibility options of this Place. undefined if the * accessibility options data have not been called for from the server. */ accessibilityOptions?: google.maps.places.AccessibilityOptions | null; /** * The collection of address components for this Place’s location. Empty * object if there is no known address data. undefined if the * address data has not been called for from the server. */ addressComponents?: google.maps.places.AddressComponent[]; /** * The representation of the Place’s address in the adr microformat. */ adrFormatAddress?: string | null; allowsDogs?: boolean | null; /** * Attribution text to be displayed for this Place result. */ attributions?: google.maps.places.Attribution[]; /** * The location's operational status. null if there is no * known status. undefined if the status data has not been * loaded from the server. */ businessStatus?: google.maps.places.BusinessStatus | null; /** * The location's display name. null if there is no name. * undefined if the name data has not been loaded from the * server. */ displayName?: string | null; /** * The language of the location's display name. null if * there is no name. undefined if the name data has not been * loaded from the server. */ displayNameLanguageCode?: string | null; /** * The editorial summary for this place. null if there is no * editorial summary. undefined if this field has not yet been * requested. */ editorialSummary?: string | null; /** * The language of the editorial summary for this place. null * if there is no editorial summary. undefined if this field * has not yet been requested. */ editorialSummaryLanguageCode?: string | null; /** * EV Charge options provided by the place. undefined if the EV * charge options have not been called for from the server. */ evChargeOptions?: google.maps.places.EVChargeOptions | null; fetchFields( options: google.maps.places.FetchFieldsRequest, ): Promise<{place: google.maps.places.Place}>; /** * The locations’s full address. */ formattedAddress?: string | null; /** * Fuel options provided by the place. undefined if the fuel * options have not been called for from the server. */ fuelOptions?: google.maps.places.FuelOptions | null; /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * Calculates the Date representing the next OpeningHoursTime. Returns * undefined if the data is insufficient to calculate the result, or this * place is not operational. */ getNextOpeningTime(date?: Date): Promise; /** * URL of the official Google page for this place. This is the Google-owned * page that contains the best available information about the Place. */ googleMapsURI?: string | null; /** * Whether a place has curbside pickup. Returns 'true' or * 'false' if the value is known. Returns 'null' if the * value is unknown. Returns 'undefined' if this field has not yet * been requested. */ hasCurbsidePickup?: boolean | null; /** * Whether a place has delivery. Returns 'true' or 'false' * if the value is known. Returns 'null' if the value is unknown. * Returns * 'undefined' if this field has not yet been requested. */ hasDelivery?: boolean | null; /** * Whether a place has dine in. Returns 'true' or 'false' if * the value is known. Returns 'null' if the value is unknown. * Returns * 'undefined' if this field has not yet been requested. */ hasDineIn?: boolean | null; hasLiveMusic?: boolean | null; hasMenuForChildren?: boolean | null; hasOutdoorSeating?: boolean | null; hasRestroom?: boolean | null; /** * Whether a place has takeout. Returns 'true' or 'false' if * the value is known. Returns 'null' if the value is unknown. * Returns * 'undefined' if this field has not yet been requested. */ hasTakeout?: boolean | null; hasWiFi?: boolean | null; /** * The default HEX color code for the place's category. */ iconBackgroundColor?: string | null; /** * The unique place id. */ id: string; /** * The Place’s phone number in international format. International format * includes the country code, and is prefixed with the plus (+) sign. */ internationalPhoneNumber?: string | null; isGoodForChildren?: boolean | null; isGoodForGroups?: boolean | null; isGoodForWatchingSports?: boolean | null; /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * Check if the place is open at the given datetime. Resolves with * undefined if the known data for the location is insufficient * to calculate this, e.g. if the opening hours are unregistered. * @param date Defaults to now. */ isOpen(date?: Date): Promise; /** * Whether a place is reservable. Returns 'true' or 'false' * if the value is known. Returns 'null' if the value is unknown. * Returns * 'undefined' if this field has not yet been requested. */ isReservable?: boolean | null; /** * The Place’s position. */ location?: google.maps.LatLng | null; /** * The Place’s phone number, formatted according to the number's * regional convention. */ nationalPhoneNumber?: string | null; /** * @deprecated Use {@link google.maps.places.Place.regularOpeningHours} * instead. */ openingHours?: google.maps.places.OpeningHours | null; /** * Options of parking provided by the place. undefined if the * parking options data have not been called for from the server. */ parkingOptions?: google.maps.places.ParkingOptions | null; /** * Payment options provided by the place. undefined if the * payment options data have not been called for from the server. */ paymentOptions?: google.maps.places.PaymentOptions | null; /** * Photos of this Place. The collection will contain up to ten {@link * google.maps.places.Photo} objects. */ photos?: google.maps.places.Photo[]; plusCode?: google.maps.places.PlusCode | null; /** * The price level of the Place. This property can return any of the * following values
    *
  • Free
  • Inexpensive
  • *
  • Moderate
  • Expensive
  • *
  • Very Expensive
*/ priceLevel?: google.maps.places.PriceLevel | null; /** * The location's primary type. null if there is no type. * undefined if the type data has not been loaded from the * server. */ primaryType?: string | null; /** * The location's primary type display name. null if there * is no type. undefined if the type data has not been loaded * from the server. */ primaryTypeDisplayName?: string | null; /** * The language of the location's primary type display name. * null if there is no type. undefined if the type * data has not been loaded from the server. */ primaryTypeDisplayNameLanguageCode?: string | null; /** * A rating, between 1.0 to 5.0, based on user reviews of this Place. */ rating?: number | null; regularOpeningHours?: google.maps.places.OpeningHours | null; /** * The requested language for this place. */ requestedLanguage?: string | null; /** * The requested region for this place. */ requestedRegion?: string | null; /** * A list of reviews for this Place. */ reviews?: google.maps.places.Review[]; /** * Whether a place serves beer. Returns 'true' or 'false' if * the value is known. Returns 'null' if the value is unknown. * Returns * 'undefined' if this field has not yet been requested. */ servesBeer?: boolean | null; /** * Whether a place serves breakfast. Returns 'true' or * 'false' if the value is known. Returns 'null' if the * value is unknown. Returns 'undefined' if this field has not yet * been requested. */ servesBreakfast?: boolean | null; /** * Whether a place serves brunch. Returns 'true' or 'false' * if the value is known. Returns 'null' if the value is unknown. * Returns * 'undefined' if this field has not yet been requested. */ servesBrunch?: boolean | null; servesCocktails?: boolean | null; servesCoffee?: boolean | null; servesDessert?: boolean | null; /** * Whether a place serves dinner. Returns 'true' or 'false' * if the value is known. Returns 'null' if the value is unknown. * Returns * 'undefined' if this field has not yet been requested. */ servesDinner?: boolean | null; /** * Whether a place serves lunch. Returns 'true' or 'false' * if the value is known. Returns 'null' if the value is unknown. * Returns * 'undefined' if this field has not yet been requested. */ servesLunch?: boolean | null; /** * Whether a place serves vegetarian food. Returns 'true' or * 'false' if the value is known. Returns 'null' if the * value is unknown. Returns 'undefined' if this field has not yet * been requested. */ servesVegetarianFood?: boolean | null; /** * Whether a place serves wine. Returns 'true' or 'false' if * the value is known. Returns 'null' if the value is unknown. * Returns * 'undefined' if this field has not yet been requested. */ servesWine?: boolean | null; /** * URI to the svg image mask resource that can be used to represent a * place’s category. */ svgIconMaskURI?: string | null; toJSON(): object; /** * An array of types * for this Place (for example, ["political", * "locality"] or ["restaurant", * "establishment"]). */ types?: string[]; /** * The number of user ratings which contributed to this Place’s {@link * google.maps.places.Place.rating}. */ userRatingCount?: number | null; /** * The offset from UTC of the Place’s current timezone, in minutes. For * example, Austrialian Eastern Standard Time (GMT+10) in daylight savings * is 11 hours ahead of UTC, so the utc_offset_minutes will be * 660. For timezones behind UTC, the offset is negative. For * example, the utc_offset_minutes is -60 for Cape * Verde. */ utcOffsetMinutes?: number | null; /** * The preferred viewport when displaying this Place on a map. */ viewport?: google.maps.LatLngBounds | null; /** * The authoritative website for this Place, such as a business' * homepage. */ websiteURI?: string | null; /** * Text query based place search. */ static searchByText( this: any, request: google.maps.places.SearchByTextRequest, ): Promise<{places: google.maps.places.Place[]}>; /** * Search for nearby places. */ static searchNearby( this: any, request: google.maps.places.SearchNearbyRequest, ): Promise<{places: google.maps.places.Place[]}>; } /** * Defines information about an aspect of the place that users have reviewed. * @deprecated This interface is no longer used. */ export interface PlaceAspectRating { /** * The rating of this aspect. For individual reviews this is an integer from * 0 to 3. For aggregated ratings of a place this is an integer from 0 * to 30. */ rating: number; /** * The aspect type. For example, "food", "decor", * "service", or "overall". */ type: string; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * PlaceAutocompleteElement is an HTMLElement subclass which * provides a UI component for the Places Autocomplete API. * * Access by calling `const {PlaceAutocompleteElement} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class PlaceAutocompleteElement extends HTMLElement implements google.maps.places.PlaceAutocompleteElementOptions { /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * PlaceAutocompleteElement is an HTMLElement subclass which * provides a UI component for the Places Autocomplete API. * * Access by calling `const {PlaceAutocompleteElement} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(options: google.maps.places.PlaceAutocompleteElementOptions); /** * The component restrictions. Component restrictions are used to restrict * predictions to only those within the parent component. For example, the * country. */ componentRestrictions: google.maps.places.ComponentRestrictions | null; /** * A soft boundary or hint to use when searching for places. */ locationBias: | google.maps.LatLng | google.maps.LatLngLiteral | google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral | google.maps.Circle | google.maps.CircleLiteral | string | null; /** * Bounds to constrain search results. */ locationRestriction: | google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral | null; /** * The name to be used for the input element. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#name * for details. Follows the same behavior as the name attribute for inputs. * Note that this is the name that will be used when a form is submitted. * See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form * for details. */ name: string | null; /** * A language identifier for the language in which the results should be * returned, if possible. Results in the selected language may be given a * higher ranking, but suggestions are not restricted to this language. See * the list * of supported languages. */ requestedLanguage: string | null; /** * A region code which is used for result formatting and for result * filtering. It does not restrict the suggestions to this country. The * region code accepts a ccTLD * ("top-level domain") two-character value. Most ccTLD codes * are identical to ISO 3166-1 codes, with some notable exceptions. For * example, the United Kingdom's ccTLD is "uk" * (.co.uk) while its ISO 3166-1 code is "gb" * (technically for the entity of "The United Kingdom of Great Britain * and Northern Ireland"). */ requestedRegion: string | null; /** * The types of predictions to be returned. For supported types, see the * developer's guide. If no types are specified, all types will be * returned. */ types: string[] | null; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * Options for constructing a PlaceAutocompleteElement. */ export interface PlaceAutocompleteElementOptions { /** * See {@link * google.maps.places.PlaceAutocompleteElement.componentRestrictions} */ componentRestrictions?: google.maps.places.ComponentRestrictions | null; /** * See {@link google.maps.places.PlaceAutocompleteElement.locationBias} */ locationBias?: | google.maps.LatLng | google.maps.LatLngLiteral | google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral | google.maps.Circle | google.maps.CircleLiteral | string | null; /** * See {@link * google.maps.places.PlaceAutocompleteElement.locationRestriction} */ locationRestriction?: | google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral | null; /** * See {@link google.maps.places.PlaceAutocompleteElement.requestedLanguage} */ requestedLanguage?: string | null; /** * See {@link google.maps.places.PlaceAutocompleteElement.requestedRegion} */ requestedRegion?: string | null; /** * See {@link google.maps.places.PlaceAutocompleteElement.types} */ types?: string[] | null; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * This event is created after the user selects a place with the Place * Autocomplete Element. Access the selection with event.place. * * Access by calling `const {PlaceAutocompletePlaceSelectEvent} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class PlaceAutocompletePlaceSelectEvent extends Event { /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * This event is created after the user selects a place with the Place * Autocomplete Element. Access the selection with event.place. * * Access by calling `const {PlaceAutocompletePlaceSelectEvent} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(); /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. */ place: google.maps.places.Place; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * This event is emitted by the PlaceAutocompleteElement when there is an * issue with the network request. * * Access by calling `const {PlaceAutocompleteRequestErrorEvent} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class PlaceAutocompleteRequestErrorEvent extends Event { /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * This event is emitted by the PlaceAutocompleteElement when there is an * issue with the network request. * * Access by calling `const {PlaceAutocompleteRequestErrorEvent} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(); } /** * A Place details query to be sent to the PlacesService. */ export interface PlaceDetailsRequest { /** * Fields to be included in the details response, which * will be billed for. If no fields are specified or * ['ALL'] is passed in, all available fields will be * returned and billed for (this is not recommended for production * deployments). For a list of fields see {@link * google.maps.places.PlaceResult}. Nested fields can be specified with * dot-paths (for example, "geometry.location"). */ fields?: string[]; /** * A language identifier for the language in which details should be * returned. See the list of * supported languages. */ language?: string | null; /** * The Place ID of the Place for which details are being requested. */ placeId: string; /** * A region code of the user's region. This can affect which photos may * be returned, and possibly other things. The region code accepts a ccTLD * ("top-level domain") two-character value. Most ccTLD codes * are identical to ISO 3166-1 codes, with some notable exceptions. For * example, the United Kingdom's ccTLD is "uk" * (.co.uk) while its ISO 3166-1 code is "gb" * (technically for the entity of "The United Kingdom of Great Britain * and Northern Ireland"). */ region?: string | null; /** * Unique reference used to bundle the details request with an autocomplete * session. */ sessionToken?: google.maps.places.AutocompleteSessionToken; } /** * Defines information about the geometry of a Place. */ export interface PlaceGeometry { /** * The Place’s position. */ location?: google.maps.LatLng; /** * The preferred viewport when displaying this Place on a map. This property * will be null if the preferred viewport for the Place is not * known. Only available with {@link * google.maps.places.PlacesService.getDetails}. */ viewport?: google.maps.LatLngBounds; } /** * Defines information about the opening hours of a Place. */ export interface PlaceOpeningHours { /** * Check whether the place is open now (when no date is passed), or at the * given date. If this place does not have {@link * google.maps.places.PlaceResult.utc_offset_minutes} or {@link * google.maps.places.PlaceOpeningHours.periods} then undefined * is returned ({@link google.maps.places.PlaceOpeningHours.periods} is only * available via {@link google.maps.places.PlacesService.getDetails}). This * method does not take exceptional hours, such as holiday hours, into * consideration. */ isOpen(date?: Date): boolean | undefined; /** * Whether the Place is open at the current time. * @deprecated open_now is deprecated as of November 2019. Use * the {@link google.maps.places.PlaceOpeningHours.isOpen} method from * a {@link google.maps.places.PlacesService.getDetails} result instead. * See https://goo.gle/js-open-now */ open_now?: boolean; /** * Opening periods covering for each day of the week, starting from Sunday, * in chronological order. Days in which the Place is not open are not * included. Only available with {@link * google.maps.places.PlacesService.getDetails}. */ periods?: google.maps.places.PlaceOpeningHoursPeriod[]; /** * An array of seven strings representing the formatted opening hours for * each day of the week. The Places Service will format and localize the * opening hours appropriately for the current language. The ordering of the * elements in this array depends on the language. Some languages start the * week on Monday while others start on Sunday. Only available with {@link * google.maps.places.PlacesService.getDetails}. Other calls may return an * empty array. */ weekday_text?: string[]; } /** * Defines structured information about the opening hours of a Place. * Note: If a Place is always open, the * close section will be missing from the response. Clients can * rely on always-open being represented as an open period * containing day with value 0 and time * with value "0000", and no close. */ export interface PlaceOpeningHoursPeriod { /** * The closing time for the Place. */ close?: google.maps.places.PlaceOpeningHoursTime; /** * The opening time for the Place. */ open: google.maps.places.PlaceOpeningHoursTime; } /** * Defines when a Place opens or closes. */ export interface PlaceOpeningHoursTime { /** * The days of the week, as a number in the range [0, * 6], starting on Sunday. For example, 2 means * Tuesday. */ day: number; /** * The hours of the {@link google.maps.places.PlaceOpeningHoursTime.time} as * a number, in the range [0, 23]. This will be * reported in the Place’s time zone. */ hours: number; /** * The minutes of the {@link google.maps.places.PlaceOpeningHoursTime.time} * as a number, in the range [0, 59]. This will be * reported in the Place’s time zone. */ minutes: number; /** * The timestamp (as milliseconds since the epoch, suitable for use with * new Date()) representing the next occurrence of this * PlaceOpeningHoursTime. It is calculated from the {@link * google.maps.places.PlaceOpeningHoursTime.day} of week, the {@link * google.maps.places.PlaceOpeningHoursTime.time}, and the {@link * google.maps.places.PlaceResult.utc_offset_minutes}. If the {@link * google.maps.places.PlaceResult.utc_offset_minutes} is * undefined, then nextDate will be * undefined. */ nextDate?: number; /** * The time of day in 24-hour "hhmm" format. Values are in the * range * ["0000", "2359"]. The time will be reported in * the Place’s time zone. */ time: string; } /** * Options for constructing a Place. */ export interface PlaceOptions { /** * The unique place id. */ id: string; /** * A language identifier for the language in which details should be * returned. See the list of * supported languages. */ requestedLanguage?: string | null; /** * A region code of the user's region. This can affect which photos may * be returned, and possibly other things. The region code accepts a ccTLD * ("top-level domain") two-character value. Most ccTLD codes * are identical to ISO 3166-1 codes, with some notable exceptions. For * example, the United Kingdom's ccTLD is "uk" * (.co.uk) while its ISO 3166-1 code is "gb" * (technically for the entity of "The United Kingdom of Great Britain * and Northern Ireland"). */ requestedRegion?: string | null; } /** * Represents a photo element of a Place. */ export interface PlacePhoto { /** * Returns the image URL corresponding to the specified options. */ getUrl(opts?: google.maps.places.PhotoOptions): string; /** * The height of the photo in pixels. */ height: number; /** * Attribution text to be displayed for this photo. */ html_attributions: string[]; /** * The width of the photo in pixels. */ width: number; } /** * Defines Open Location Codes or "plus * codes" for a Place. Plus codes can be used as a replacement for * street addresses in places where they do not exist (where buildings are not * numbered or streets are not named). */ export interface PlacePlusCode { /** * A plus code with a 1/8000th of a degree * by 1/8000th of a degree area where the first four characters (the area * code) are dropped and replaced with a locality description. For example, * "9G8F+5W Zurich, Switzerland". If no suitable locality that * can be found to shorten the code then this field is omitted. */ compound_code?: string; /** * A plus code with a 1/8000th of a degree * by 1/8000th of a degree area. For example, "8FVC9G8F+5W". */ global_code: string; } /** * Prediction results for a Place Autocomplete prediction. * * Access by calling `const {PlacePrediction} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class PlacePrediction { /** * The length of the geodesic in meters from origin if * origin is specified. */ distanceMeters: number | null; /** * Represents the name of the Place. */ mainText: google.maps.places.FormattableText | null; /** * The unique identifier of the suggested Place. This identifier can be used * in other APIs that accept Place IDs. */ placeId: string; /** * Represents additional disambiguating features (such as a city or region) * to further identify the Place. */ secondaryText: google.maps.places.FormattableText | null; /** * Contains the human-readable name for the returned result. For * establishment results, this is usually the business name and address. *

text is recommended for developers who wish to * show a single UI element. Developers who wish to show two separate, but * related, UI elements may want to use {@link * google.maps.places.PlacePrediction.mainText} and {@link * google.maps.places.PlacePrediction.secondaryText} instead. */ text: google.maps.places.FormattableText; /** * Returns a Place representation of this PlacePrediction. A subsequent call * to {@link google.maps.places.Place.fetchFields} is required to get full * Place details. */ toPlace(): google.maps.places.Place; /** * List of types that apply to this Place from Table A or Table B in https://developers.google.com/maps/documentation/places/web-service/place-types. */ types: string[]; } /** * Defines information about a Place. */ export interface PlaceResult { /** * The collection of address components for this Place’s location. Only * available with {@link google.maps.places.PlacesService.getDetails}. */ address_components?: google.maps.GeocoderAddressComponent[]; /** * The representation of the Place’s address in the adr microformat. Only * available with {@link google.maps.places.PlacesService.getDetails}. */ adr_address?: string; /** * The rated aspects of this Place, based on Google and Zagat user reviews. * The ratings are on a scale of 0 to 30. */ aspects?: google.maps.places.PlaceAspectRating[]; /** * A flag indicating the operational status of the Place, if it is a * business (indicates whether the place is operational, or closed either * temporarily or permanently). If no data is available, the flag is not * present in search or details responses. */ business_status?: google.maps.places.BusinessStatus; /** * The Place’s full address. */ formatted_address?: string; /** * The Place’s phone number, formatted according to the * number's regional convention. Only available with {@link * google.maps.places.PlacesService.getDetails}. */ formatted_phone_number?: string; /** * The Place’s geometry-related information. */ geometry?: google.maps.places.PlaceGeometry; /** * Attribution text to be displayed for this Place result. Available * html_attributions are always returned regardless of what * fields have been requested, and must be displayed. */ html_attributions?: string[]; /** * URL to an image resource that can be used to represent this Place’s * category. */ icon?: string; /** * Background color for use with a Place's icon. See also {@link * google.maps.places.PlaceResult.icon_mask_base_uri}. */ icon_background_color?: string; /** * A truncated URL to an icon mask. Access different icon types by appending * a file extension to the end (i.e. .svg or * .png). */ icon_mask_base_uri?: string; /** * The Place’s phone number in international format. International format * includes the country code, and is prefixed with the plus (+) sign. Only * available with {@link google.maps.places.PlacesService.getDetails}. */ international_phone_number?: string; /** * The Place’s name. Note: In the case of user entered Places, this is the * raw text, as typed by the user. Please exercise caution when using this * data, as malicious users may try to use it as a vector for code injection * attacks (See * http://en.wikipedia.org/wiki/Code_injection). */ name?: string; /** * Defines when the Place opens or closes. */ opening_hours?: google.maps.places.PlaceOpeningHours; /** * A flag indicating whether the Place is closed, either permanently or * temporarily. If the place is operational, or if no data is available, the * flag is absent from the response. * @deprecated permanently_closed is deprecated as of May 2020 * and will be turned off in May 2021. Use {@link * google.maps.places.PlaceResult.business_status} instead as * permanently_closed does not distinguish between * temporary and permanent closures. */ permanently_closed?: boolean; /** * Photos of this Place. The collection will contain up to ten {@link * google.maps.places.PlacePhoto} objects. */ photos?: google.maps.places.PlacePhoto[]; /** * A unique identifier for the Place. */ place_id?: string; /** * Defines Open Location Codes or "plus * codes" for the Place. */ plus_code?: google.maps.places.PlacePlusCode; /** * The price level of the Place, on a scale of 0 to 4. Price levels are * interpreted as follows:
    *
  • 0: Free
  • 1: Inexpensive *
  • 2: Moderate
  • 3: Expensive *
  • 4: Very Expensive *
*/ price_level?: number; /** * A rating, between 1.0 to 5.0, based on user reviews of this Place. */ rating?: number; /** * A list of reviews of this Place. Only available with {@link * google.maps.places.PlacesService.getDetails}. */ reviews?: google.maps.places.PlaceReview[]; /** * An array of * types for this Place (for example, ["political", * "locality"] or ["restaurant", "establishment"]). */ types?: string[]; /** * URL of the official Google page for this place. This is the Google-owned * page that contains the best available information about the Place. Only * available with {@link google.maps.places.PlacesService.getDetails}. */ url?: string; /** * The number of user ratings which contributed to this Place’s {@link * google.maps.places.PlaceResult.rating}. */ user_ratings_total?: number; /** * The offset from UTC of the Place’s current timezone, in minutes. For * example, Sydney, Australia in daylight savings is 11 hours ahead of UTC, * so the utc_offset will be 660. For timezones * behind UTC, the offset is negative. For example, the * utc_offset is -60 for Cape Verde. Only * available with {@link google.maps.places.PlacesService.getDetails}. * @deprecated utc_offset is deprecated as of November 2019. * Use {@link google.maps.places.PlaceResult.utc_offset_minutes} * instead. See https://goo.gle/js-open-now */ utc_offset?: number; /** * The offset from UTC of the Place’s current timezone, in minutes. For * example, Sydney, Australia in daylight savings is 11 hours ahead of UTC, * so the utc_offset_minutes will be 660. For * timezones behind UTC, the offset is negative. For example, the * utc_offset_minutes is -60 for Cape Verde. Only * available with {@link google.maps.places.PlacesService.getDetails}. */ utc_offset_minutes?: number; /** * The simplified address for the Place, including the street name, street * number, and locality, but not the province/state, postal code, or * country. For example, Google's Sydney, Australia office has a * vicinity value of "48 Pirrama Road, Pyrmont". Only available * with {@link google.maps.places.PlacesService.getDetails}. */ vicinity?: string; /** * The authoritative website for this Place, such as a business' * homepage. Only available with {@link * google.maps.places.PlacesService.getDetails}. */ website?: string; } /** * Represents a single review of a place. */ export interface PlaceReview { /** * The aspects rated by the review. The ratings on a scale of 0 to 3. * @deprecated This field is no longer available. */ aspects?: google.maps.places.PlaceAspectRating[]; /** * The name of the reviewer. */ author_name: string; /** * A URL to the reviewer's profile. This will be undefined * when the reviewer's profile is unavailable. */ author_url?: string; /** * An IETF language code indicating the language in which this review is * written. Note that this code includes only the main language tag without * any secondary tag indicating country or region. For example, all the * English reviews are tagged as 'en' rather than * 'en-AU' or * 'en-UK'. */ language: string; /** * A URL to the reviwer's profile image. */ profile_photo_url: string; /** * The rating of this review, a number between 1.0 and 5.0 (inclusive). */ rating?: number; /** * A string of formatted recent time, expressing the review time relative to * the current time in a form appropriate for the language and country. For * example "a month ago". */ relative_time_description: string; /** * The text of a review. */ text: string; /** * Timestamp for the review, expressed in seconds since epoch. */ time: number; } /** * An object used to fetch additional pages of Places results. */ export interface PlaceSearchPagination { /** * Indicates if further results are available. true when there * is an additional results page. */ hasNextPage: boolean; /** * Fetches the next page of results. Uses the same callback function that * was provided to the first search request. */ nextPage(): void; } /** * A Place search query to be sent to the PlacesService. */ export interface PlaceSearchRequest { /** * The bounds within which to search for Places. Both location * and radius will be ignored if bounds is set. */ bounds?: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral; /** * A term to be matched against all available fields, including but not * limited to name, type, and address, as well as customer reviews and other * third-party content. */ keyword?: string; /** * A language identifier for the language in which names and addresses * should be returned, when possible. See the list of * supported languages. */ language?: string | null; /** * The location around which to search for Places. */ location?: google.maps.LatLng | google.maps.LatLngLiteral; /** * Restricts results to only those places at the specified price level or * lower. Valid values are in the range from 0 (most affordable) to 4 (most * expensive), inclusive. Must be greater than or equal to minPrice * , if specified. */ maxPriceLevel?: number; /** * Restricts results to only those places at the specified price level or * higher. Valid values are in the range from 0 (most affordable) to 4 (most * expensive), inclusive. Must be less than or equal to * maxPrice, if specified. */ minPriceLevel?: number; /** * Equivalent to keyword. Values in this field are combined * with values in the keyword field and passed as part of the * same search string. * @deprecated Use keyword instead. */ name?: string; /** * Restricts results to only those places that are open right now. */ openNow?: boolean; /** * The distance from the given location within which to search for Places, * in meters. The maximum allowed value is 50 000. */ radius?: number; /** * Specifies the ranking method to use when returning results. Note that * when rankBy is set to DISTANCE, you must * specify a location but you cannot specify a * radius or bounds. * @defaultValue {@link google.maps.places.RankBy.PROMINENCE} */ rankBy?: google.maps.places.RankBy; /** * Searches for places of the given type. The type is translated to the * local language of the request's target location and used as a query * string. If a query is also provided, it is concatenated to the localized * type string. Results of a different type are dropped from the response. * Use this field to perform language and region independent categorical * searches. Valid types are given here. */ type?: string; } /** * Contains methods related to searching for places and retrieving details * about a place. * * Access by calling `const {PlacesService} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class PlacesService { /** * Contains methods related to searching for places and retrieving details * about a place. * * Access by calling `const {PlacesService} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(attrContainer: HTMLDivElement | google.maps.Map); /** * Retrieves a list of places based on a phone number. In most cases there * should be just one item in the result list, however if the request is * ambiguous more than one result may be returned. The {@link * google.maps.places.PlaceResult}s passed to the callback are subsets of a * full {@link google.maps.places.PlaceResult}. Your app can get a more * detailed {@link google.maps.places.PlaceResult} for each place by * calling {@link google.maps.places.PlacesService.getDetails} and passing * the {@link google.maps.places.PlaceResult.place_id} for the desired * place. */ findPlaceFromPhoneNumber( request: google.maps.places.FindPlaceFromPhoneNumberRequest, callback: ( a: google.maps.places.PlaceResult[] | null, b: google.maps.places.PlacesServiceStatus, ) => void, ): void; /** * Retrieves a list of places based on a query string. In most cases there * should be just one item in the result list, however if the request is * ambiguous more than one result may be returned. The {@link * google.maps.places.PlaceResult}s passed to the callback are subsets of a * full {@link google.maps.places.PlaceResult}. Your app can get a more * detailed {@link google.maps.places.PlaceResult} for each place by * calling {@link google.maps.places.PlacesService.getDetails} and passing * the {@link google.maps.places.PlaceResult.place_id} for the desired * place. */ findPlaceFromQuery( request: google.maps.places.FindPlaceFromQueryRequest, callback: ( a: google.maps.places.PlaceResult[] | null, b: google.maps.places.PlacesServiceStatus, ) => void, ): void; /** * Retrieves details about the place identified by the given * placeId. */ getDetails( request: google.maps.places.PlaceDetailsRequest, callback: ( a: google.maps.places.PlaceResult | null, b: google.maps.places.PlacesServiceStatus, ) => void, ): void; /** * Retrieves a list of places near a particular location, based on keyword * or type. Location must always be specified, either by passing a * LatLngBounds, or location and * radius parameters. The {@link * google.maps.places.PlaceResult}s passed to the callback are subsets of * the full {@link google.maps.places.PlaceResult}. Your app can get a more * detailed {@link google.maps.places.PlaceResult} for each place by sending * a Place * Details request passing the {@link * google.maps.places.PlaceResult.place_id} for the desired place. * The {@link google.maps.places.PlaceSearchPagination} object can be used * to fetch additional pages of results (null if this is the last page of * results or if there is only one page of results). */ nearbySearch( request: google.maps.places.PlaceSearchRequest, callback: ( a: google.maps.places.PlaceResult[] | null, b: google.maps.places.PlacesServiceStatus, c: google.maps.places.PlaceSearchPagination | null, ) => void, ): void; /** * Retrieves a list of places based on a query string (for example, * "pizza in New York", or "shoe stores near Ottawa"). * Location parameters are optional; when the location is specified, results * are only biased toward nearby results rather than restricted to places * inside the area. Use textSearch when you want to search for * places using an arbitrary string, and in cases where you may not want to * restrict search results to a particular location. The * PlaceSearchPagination object can be used to fetch additional * pages of results (null if this is the last page of results or if there is * only one page of results). */ textSearch( request: google.maps.places.TextSearchRequest, callback: ( a: google.maps.places.PlaceResult[] | null, b: google.maps.places.PlacesServiceStatus, c: google.maps.places.PlaceSearchPagination | null, ) => void, ): void; } /** * The status returned by the PlacesService on the completion of * its searches. Specify these by value, or by using the constant's name. * For example, 'OK' or * google.maps.places.PlacesServiceStatus.OK. * * Access by calling `const {PlacesServiceStatus} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum PlacesServiceStatus { /** * This request was invalid. */ INVALID_REQUEST = 'INVALID_REQUEST', /** * The place referenced was not found. */ NOT_FOUND = 'NOT_FOUND', /** * The response contains a valid result. */ OK = 'OK', /** * The application has gone over its request quota. */ OVER_QUERY_LIMIT = 'OVER_QUERY_LIMIT', /** * The application is not allowed to use the PlacesService. */ REQUEST_DENIED = 'REQUEST_DENIED', /** * The PlacesService request could not be processed due to a * server error. The request may succeed if you try again. */ UNKNOWN_ERROR = 'UNKNOWN_ERROR', /** * No result was found for this request. */ ZERO_RESULTS = 'ZERO_RESULTS', } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * * Access by calling `const {PlusCode} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class PlusCode { /** * A plus code with a 1/8000th of a degree by 1/8000th of a degree area * where the first four characters (the area code) are dropped and replaced * with a locality description. For example, "9G8F+5W Zurich, * Switzerland". */ compoundCode: string | null; /** * A plus code with a 1/8000th of a degree by 1/8000th of a degree area. For * example, "8FVC9G8F+5W". */ globalCode: string | null; } /** * Represents a prediction substring. */ export interface PredictionSubstring { /** * The length of the substring. */ length: number; /** * The offset to the substring's start within the description string. */ offset: number; } /** * Represents a prediction term. */ export interface PredictionTerm { /** * The offset, in unicode characters, of the start of this term in the * description of the place. */ offset: number; /** * The value of this term, for example, "Taco Bell". */ value: string; } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * Price level enum for Place objects. * * Access by calling `const {PriceLevel} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum PriceLevel { EXPENSIVE = 'EXPENSIVE', FREE = 'FREE', INEXPENSIVE = 'INEXPENSIVE', MODERATE = 'MODERATE', VERY_EXPENSIVE = 'VERY_EXPENSIVE', } /** * Represents a single Query Autocomplete prediction. */ export interface QueryAutocompletePrediction { /** * This is the unformatted version of the query suggested by the Places * service. */ description: string; /** * A set of substrings in the place's description that match elements in * the user's input, suitable for use in highlighting those substrings. * Each substring is identified by an offset and a length, expressed in * unicode characters. */ matched_substrings: google.maps.places.PredictionSubstring[]; /** * Only available if prediction is a place. A place ID that can be used to * retrieve details about this place using the place details service * (see {@link google.maps.places.PlacesService.getDetails}). */ place_id?: string; /** * Information about individual terms in the above description. Categorical * terms come first (for example, "restaurant"). Address terms * appear from most to least specific. For example, "San * Francisco", and "CA". */ terms: google.maps.places.PredictionTerm[]; } /** * A QueryAutocompletion request to be sent to the * QueryAutocompleteService. */ export interface QueryAutocompletionRequest { /** * Bounds for prediction biasing. Predictions will be biased towards, but * not restricted to, the given bounds. Both * location and radius will be ignored if * bounds is set. */ bounds?: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral; /** * The user entered input string. */ input: string; /** * Location for prediction biasing. Predictions will be biased towards the * given location and radius. Alternatively, * bounds can be used. */ location?: google.maps.LatLng; /** * The character position in the input term at which the service uses text * for predictions (the position of the cursor in the input field). */ offset?: number; /** * The radius of the area used for prediction biasing. The * radius is specified in meters, and must always be * accompanied by a location property. Alternatively, * bounds can be used. */ radius?: number; } /** * Ranking options for a PlaceSearchRequest. * * Access by calling `const {RankBy} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum RankBy { /** * Ranks place results by distance from the location. */ DISTANCE = 0.0, /** * Ranks place results by their prominence. */ PROMINENCE = 1.0, } /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * * * Access by calling `const {Review} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class Review { /** * The reviewer. */ authorAttribution: google.maps.places.AuthorAttribution | null; publishTime: Date | null; /** * The rating of this review, a number between 1.0 and 5.0 (inclusive). */ rating: number | null; /** * A string of formatted recent time, expressing the review time relative to * the current time in a form appropriate for the language and country. For * example * `"a month ago"'. */ relativePublishTimeDescription: string | null; /** * The text of a review. */ text: string | null; /** * An IETF language code indicating the language in which this review is * written. Note that this code includes only the main language tag without * any secondary tag indicating country or region. For example, all the * English reviews are tagged as 'en' rather than * 'en-AU' or * 'en-UK'. */ textLanguageCode: string | null; } /** * A widget that provides query predictions based on a user's text input. * It attaches to an input element of type text, and listens for * text entry in that field. The list of predictions is presented as a * drop-down list, and is updated as text is entered. * * Access by calling `const {SearchBox} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class SearchBox extends google.maps.MVCObject { /** * A widget that provides query predictions based on a user's text * input. It attaches to an input element of type text, and * listens for text entry in that field. The list of predictions is * presented as a drop-down list, and is updated as text is entered. * * Access by calling `const {SearchBox} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor( inputField: HTMLInputElement, opts?: google.maps.places.SearchBoxOptions | null, ); /** * Returns the bounds to which query predictions are biased. */ getBounds(): google.maps.LatLngBounds | undefined; /** * Returns the query selected by the user to be used with * places_changed event. */ getPlaces(): google.maps.places.PlaceResult[] | undefined; /** * Sets the region to use for biasing query predictions. Results will only * be biased towards this area and not be completely restricted to it. */ setBounds( bounds: google.maps.LatLngBounds | null | google.maps.LatLngBoundsLiteral, ): void; } /** * The options that can be set on a SearchBox object. */ export interface SearchBoxOptions { /** * The area towards which to bias query predictions. Predictions are biased * towards, but not restricted to, queries targeting these bounds. */ bounds?: google.maps.LatLngBounds | null | google.maps.LatLngBoundsLiteral; } /** * RankPreference enum for SearchByTextRequest. * * Access by calling `const {SearchByTextRankPreference} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum SearchByTextRankPreference { /** * Ranks results by distance. */ DISTANCE = 'DISTANCE', /** * Ranks results by relevance. */ RELEVANCE = 'RELEVANCE', } /** * Request interface for {@link google.maps.places.Place.searchByText}. */ export interface SearchByTextRequest { /** * EV-related options that can be specified for a place search request. */ evSearchOptions?: google.maps.places.EVSearchOptions; /** * Fields to be included in the response, which * will be billed for. If ['*'] is passed in, all * available fields will be returned and billed for (this is not recommended * for production deployments). You can request any property in the {@link * google.maps.places.Place} class as a field. */ fields: string[]; /** * The requested place type. Full list of types supported: https://developers.google.com/maps/documentation/places/web-service/place-types. * Only one included type is supported. See {@link * google.maps.places.SearchByTextRequest.useStrictTypeFiltering} */ includedType?: string; /** * Used to restrict the search to places that are currently open. * @defaultValue false */ isOpenNow?: boolean; /** * Place details will be displayed with the preferred language if available. * Will default to the browser's language preference. Current list of * supported languages: https://developers.google.com/maps/faq#languagesupport. */ language?: string; /** * The region to search. This location serves as a bias which means results * around given location might be returned. Cannot be set along with * locationRestriction. */ locationBias?: | google.maps.LatLng | google.maps.LatLngLiteral | google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral | google.maps.CircleLiteral | google.maps.Circle; /** * The region to search. This location serves as a restriction which means * results outside given location will not be returned. Cannot be set along * with locationBias. */ locationRestriction?: | google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral; /** * Maximum number of results to return. It must be between 1 and 20, * inclusively. */ maxResultCount?: number; /** * Filter out results whose average user rating is strictly less than this * limit. A valid value must be an float between 0 and 5 (inclusively) at a * 0.5 cadence i.e. [0, 0.5, 1.0, ... , 5.0] inclusively. The input rating * will be rounded up to the nearest 0.5(ceiling). For instance, a rating of * 0.6 will eliminate all results with a less than 1.0 rating. */ minRating?: number; /** * Used to restrict the search to places that are marked as certain price * levels. Any combinations of price levels can be chosen. Defaults to all * price levels. */ priceLevels?: google.maps.places.PriceLevel[]; /** * @deprecated Please use textQuery instead */ query?: string; /** * Available only in the v=beta channel: https://goo.gle/3oAthT3. * @deprecated Please use rankPreference instead. */ rankBy?: google.maps.places.SearchByTextRankPreference; /** * How results will be ranked in the response. * @defaultValue SearchByTextRankPreference.RELEVANCE */ rankPreference?: google.maps.places.SearchByTextRankPreference; /** * The Unicode country/region code (CLDR) of the location where the request * is coming from. This parameter is used to display the place details, like * region-specific place name, if available. The parameter can affect * results based on applicable law. For more information, see https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. * Note that 3-digit region codes are not currently supported. */ region?: string; /** * Required. The text query for textual search. */ textQuery?: string; /** * Used to set strict type filtering for {@link * google.maps.places.SearchByTextRequest.includedType}. If set to true, * only results of the same type will be returned. * @defaultValue false */ useStrictTypeFiltering?: boolean; } /** * RankPreference enum for SearchNearbyRequest. * * Access by calling `const {SearchNearbyRankPreference} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export enum SearchNearbyRankPreference { /** * Ranks results by distance. */ DISTANCE = 'DISTANCE', /** * Ranks results by popularity. */ POPULARITY = 'POPULARITY', } /** * Request interface for {@link google.maps.places.Place.searchNearby}. For * more information on the request, see Places * API reference. */ export interface SearchNearbyRequest { /** * Excluded primary place type. See the full * list of types supported. A place can only have a single primary type. * Up to 50 types may be specified. If you specify the same type in both * included and excluded lists, an * INVALID_ARGUMENT error is returned. */ excludedPrimaryTypes?: string[]; /** * Excluded place type. See the full * list of types supported. A place can have many different place types. * Up to 50 types may be specified. If you specify the same type in both * included and excluded lists, an * INVALID_ARGUMENT error is returned. */ excludedTypes?: string[]; /** * Fields to be included in the response, which * will be billed for. If ['*'] is passed in, all * available fields will be returned and billed for (this is not recommended * for production deployments). You can request any property in the {@link * google.maps.places.Place} class as a field. */ fields: string[]; /** * Included primary place type. See the full * list of types supported. A place can only have a single primary type. * Up to 50 types may be specified. If you specify the same type in both * included and excluded lists, an * INVALID_ARGUMENT error is returned. */ includedPrimaryTypes?: string[]; /** * Included place type. See the full * list of types supported. A place can have many different place types. * Up to 50 types may be specified. If you specify the same type in both * included and excluded lists, an * INVALID_ARGUMENT error is returned. */ includedTypes?: string[]; /** * Place details will be displayed with the preferred language if available. * Will default to the browser's language preference. Current list of * supported languages: https://developers.google.com/maps/faq#languagesupport. */ language?: string; /** * The region to search, specified as a circle with center and radius. * Results outside given location are not returned. */ locationRestriction: google.maps.Circle | google.maps.CircleLiteral; /** * Maximum number of results to return. It must be between 1 and 20, * inclusively. */ maxResultCount?: number; /** * How results will be ranked in the response. * @defaultValue SearchNearbyRankPreference.DISTANCE */ rankPreference?: google.maps.places.SearchNearbyRankPreference; /** * The Unicode country/region code (CLDR) of the location where the request * is coming from. This parameter is used to display the place details, like * region-specific place name, if available. The parameter can affect * results based on applicable law. For more information, see https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. * Note that 3-digit region codes are not currently supported. */ region?: string; } /** * Identifies a substring within a given text. * * Access by calling `const {StringRange} = await * google.maps.importLibrary("places")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class StringRange { /** * Zero-based offset of the last Unicode character of the substring * (exclusive). */ endOffset: number; /** * Zero-based offset of the first Unicode character of the substring * (inclusive). */ startOffset: number; } /** * Contains structured information about the place's description, divided * into a main text and a secondary text, including an array of matched * substrings from the autocomplete input, identified by an offset and a * length, expressed in unicode characters. */ export interface StructuredFormatting { /** * This is the main text part of the unformatted description of the place * suggested by the Places service. Usually the name of the place. */ main_text: string; /** * A set of substrings in the main text that match elements in the * user's input, suitable for use in highlighting those substrings. Each * substring is identified by an offset and a length, expressed in unicode * characters. */ main_text_matched_substrings: google.maps.places.PredictionSubstring[]; /** * This is the secondary text part of the unformatted description of the * place suggested by the Places service. Usually the location of the place. */ secondary_text: string; } /** * A text search request to be sent to the PlacesService. */ export interface TextSearchRequest { /** * Bounds used to bias results when searching for Places (optional). Both * location and radius will be ignored if * bounds is set. Results will not be restricted to those * inside these bounds; but, results inside it will rank higher. */ bounds?: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral; /** * A language identifier for the language in which names and addresses * should be returned, when possible. See the list of * supported languages. */ language?: string | null; /** * The center of the area used to bias results when searching for Places. */ location?: google.maps.LatLng | google.maps.LatLngLiteral; /** * The request's query term. For example, the name of a place * ('Eiffel Tower'), a category followed by the name of a location * ('pizza in New York'), or the name of a place followed by a * location disambiguator * ('Starbucks in Sydney'). */ query?: string; /** * The radius of the area used to bias results when searching for Places, in * meters. */ radius?: number; /** * A region code to bias results towards. The region code accepts a ccTLD * ("top-level domain") two-character value. Most ccTLD codes * are identical to ISO 3166-1 codes, with some notable exceptions. For * example, the United Kingdom's ccTLD is "uk" * (.co.uk) while its ISO 3166-1 code is "gb" * (technically for the entity of "The United Kingdom of Great Britain * and Northern Ireland"). */ region?: string | null; /** * Searches for places of the given type. The type is translated to the * local language of the request's target location and used as a query * string. If a query is also provided, it is concatenated to the localized * type string. Results of a different type are dropped from the response. * Use this field to perform language and region independent categorical * searches. Valid types are given here. */ type?: string; } } declare namespace google.maps.visualization { /** * A layer that provides a client-side rendered heatmap, depicting the * intensity of data at geographical points. * * Access by calling `const {HeatmapLayer} = await * google.maps.importLibrary("visualization")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ export class HeatmapLayer extends google.maps.MVCObject { /** * A layer that provides a client-side rendered heatmap, depicting the * intensity of data at geographical points. * * Access by calling `const {HeatmapLayer} = await * google.maps.importLibrary("visualization")`. See * https://developers.google.com/maps/documentation/javascript/libraries. */ constructor(opts?: google.maps.visualization.HeatmapLayerOptions | null); /** * Returns the data points currently displayed by this heatmap. */ getData(): google.maps.MVCArray< google.maps.LatLng | google.maps.visualization.WeightedLocation >; getMap(): google.maps.Map | undefined; /** * Sets the data points to be displayed by this heatmap. */ setData( data: | google.maps.MVCArray< google.maps.LatLng | google.maps.visualization.WeightedLocation > | (google.maps.LatLng | google.maps.visualization.WeightedLocation)[], ): void; /** * Renders the heatmap on the specified map. If map is set to * null, the heatmap will be removed. */ setMap(map: google.maps.Map | null): void; setOptions( options: google.maps.visualization.HeatmapLayerOptions | null, ): void; } /** * This object defines the properties that can be set on a * HeatmapLayer object. */ export interface HeatmapLayerOptions { /** * The data points to display. Required. */ data?: | google.maps.MVCArray< google.maps.LatLng | google.maps.visualization.WeightedLocation > | null | (google.maps.LatLng | google.maps.visualization.WeightedLocation)[]; /** * Specifies whether heatmaps dissipate on zoom. By default, the radius of * influence of a data point is specified by the radius option only. When * dissipating is disabled, the radius option is interpreted as a radius at * zoom level 0. */ dissipating?: boolean | null; /** * The color gradient of the heatmap, specified as an array of CSS color * strings. All CSS3 colors are supported except for extended named colors. */ gradient?: string[] | null; /** * The map on which to display the layer. */ map?: google.maps.Map | null; /** * The maximum intensity of the heatmap. By default, heatmap colors are * dynamically scaled according to the greatest concentration of points at * any particular pixel on the map. This property allows you to specify a * fixed maximum. */ maxIntensity?: number | null; /** * The opacity of the heatmap, expressed as a number between 0 and 1. * @defaultValue 0.6 */ opacity?: number | null; /** * The radius of influence for each data point, in pixels. */ radius?: number | null; } /** * A data point entry for a heatmap. This is a geographical data point with a * weight attribute. */ export interface WeightedLocation { /** * The location of the data point. */ location: google.maps.LatLng | null; /** * The weighting value of the data point. */ weight: number; } }