google-closure-compiler
Version:
Check, compile, optimize and compress Javascript with Closure-Compiler
1,588 lines (1,403 loc) • 727 kB
JavaScript
/*
* Copyright 2010 The Closure Compiler Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Externs for the Google Maps v3 API.
* @see https://developers.google.com/maps/documentation/javascript/reference
* @externs
*/
/**
* @const
* @suppress {const,duplicate,strictMissingProperties}
*/
var google = {};
/**
* @const
* @suppress {const,duplicate,strictMissingProperties}
*/
google.maps = {};
/**
* Loads a <a
* href="https://developers.google.com/maps/documentation/javascript/libraries">library</a>
* of the Maps JavaScript API, resolving with the direct members of that API
* (without namespacing). (When loaded, libraries also add themselves to the
* global <code>google.maps</code> namespace, though using the global namespace
* is not generally recommended.)
* @param {string} libraryName
* @return {!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.importLibrary = function(libraryName) {};
/**
* Google Maps JavaScript API version loaded by the browser. See <a
* href="https://developers.google.com/maps/documentation/javascript/versions">https://developers.google.com/maps/documentation/javascript/versions</a>
* @const
* @type {string}
*/
google.maps.version;
/**
* 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.
* @record
*/
google.maps.AddressDescriptor = function() {};
/**
* A ranked list of containing or adjacent areas. The most useful (recognizable
* and precise) areas are ranked first.
* @type {!Array<!google.maps.Area>}
*/
google.maps.AddressDescriptor.prototype.areas;
/**
* A ranked list of nearby landmarks. The most useful (recognizable and nearby)
* landmarks are ranked first.
* @type {!Array<!google.maps.Landmark>}
*/
google.maps.AddressDescriptor.prototype.landmarks;
/**
* @record
*/
google.maps.AirQualityLibrary = function() {};
/**
* @type {typeof google.maps.airQuality.AirQualityMeterElement}
*/
google.maps.AirQualityLibrary.prototype.AirQualityMeterElement;
/**
* 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.
* @enum {number}
*/
google.maps.Animation = {
/**
* Marker bounces until animation is stopped by calling {@link
* google.maps.Marker.setAnimation} with <code>null</code>.
*/
BOUNCE: 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 <code>null</code>. This type
* of animation is usually specified during creation of the marker.
*/
DROP: 1,
};
/**
* 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.
* @record
*/
google.maps.Area = function() {};
/**
* Defines the spatial relationship between the target location and the area.
* @type {!google.maps.Containment}
*/
google.maps.Area.prototype.containment;
/**
* The name for the area.
* @type {string}
*/
google.maps.Area.prototype.display_name;
/**
* The language of the name for the area.
* @type {string}
*/
google.maps.Area.prototype.display_name_language_code;
/**
* The Place ID of the underlying area. Can be used to resolve more information
* about the area through Place Details or Place ID Lookup.
* @type {string}
*/
google.maps.Area.prototype.place_id;
/**
* 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.
* @extends {google.maps.MVCObject}
* @constructor
*/
google.maps.BicyclingLayer = function() {};
/**
* Returns the map on which this layer is displayed.
* @return {!google.maps.Map|null}
*/
google.maps.BicyclingLayer.prototype.getMap = function() {};
/**
* Renders the layer on the specified map. If map is set to <code>null</code>,
* the layer will be removed.
* @param {!google.maps.Map|null} map
* @return {void}
*/
google.maps.BicyclingLayer.prototype.setMap = function(map) {};
/**
* The display options for the Camera control.
* @record
*/
google.maps.CameraControlOptions = function() {};
/**
* Position id. Used to specify the position of the control on the map.
* @default {@link google.maps.ControlPosition.INLINE_START_BLOCK_END}
* @type {!google.maps.ControlPosition|null|undefined}
*/
google.maps.CameraControlOptions.prototype.position;
/**
* Available only in the v=beta channel: https://goo.gle/3oAthT3.
*
* Used for setting the map's camera options.
* @record
*/
google.maps.CameraOptions = function() {};
/**
* @type {!google.maps.LatLngLiteral|!google.maps.LatLng|undefined}
*/
google.maps.CameraOptions.prototype.center;
/**
* @type {number|undefined}
*/
google.maps.CameraOptions.prototype.heading;
/**
* @type {number|undefined}
*/
google.maps.CameraOptions.prototype.tilt;
/**
* @type {number|undefined}
*/
google.maps.CameraOptions.prototype.zoom;
/**
* Used for retrieving camera parameters, such as that of the GL camera used for
* the {@link google.maps.WebGLOverlayView}.
* @extends {google.maps.CameraOptions}
* @record
*/
google.maps.CameraParams = function() {};
/**
* @type {!google.maps.LatLng}
*/
google.maps.CameraParams.prototype.center;
/**
* @type {number}
*/
google.maps.CameraParams.prototype.heading;
/**
* @type {number}
*/
google.maps.CameraParams.prototype.tilt;
/**
* @type {number}
*/
google.maps.CameraParams.prototype.zoom;
/**
* 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.
* @param {(!google.maps.Circle|!google.maps.CircleLiteral|!google.maps.CircleOptions|null)=}
* circleOrCircleOptions
* @extends {google.maps.MVCObject}
* @constructor
*/
google.maps.Circle = function(circleOrCircleOptions) {};
/**
* Gets the <code>LatLngBounds</code> of this Circle.
* @return {!google.maps.LatLngBounds|null}
*/
google.maps.Circle.prototype.getBounds = function() {};
/**
* Returns the center of this circle.
* @return {!google.maps.LatLng|null}
*/
google.maps.Circle.prototype.getCenter = function() {};
/**
* Returns whether this circle can be dragged by the user.
* @return {boolean}
*/
google.maps.Circle.prototype.getDraggable = function() {};
/**
* Returns whether this circle can be edited by the user.
* @return {boolean}
*/
google.maps.Circle.prototype.getEditable = function() {};
/**
* Returns the map on which this circle is displayed.
* @return {!google.maps.Map|null}
*/
google.maps.Circle.prototype.getMap = function() {};
/**
* Returns the radius of this circle (in meters).
* @return {number}
*/
google.maps.Circle.prototype.getRadius = function() {};
/**
* Returns whether this circle is visible on the map.
* @return {boolean}
*/
google.maps.Circle.prototype.getVisible = function() {};
/**
* Sets the center of this circle.
* @param {!google.maps.LatLng|!google.maps.LatLngLiteral|null} center
* @return {undefined}
*/
google.maps.Circle.prototype.setCenter = function(center) {};
/**
* If set to <code>true</code>, the user can drag this circle over the map.
* @param {boolean} draggable
* @return {undefined}
*/
google.maps.Circle.prototype.setDraggable = function(draggable) {};
/**
* If set to <code>true</code>, the user can edit this circle by dragging the
* control points shown at the center and around the circumference of the
* circle.
* @param {boolean} editable
* @return {undefined}
*/
google.maps.Circle.prototype.setEditable = function(editable) {};
/**
* Renders the circle on the specified map. If map is set to <code>null</code>,
* the circle will be removed.
* @param {!google.maps.Map|null} map
* @return {undefined}
*/
google.maps.Circle.prototype.setMap = function(map) {};
/**
* @param {!google.maps.CircleOptions|null} options
* @return {undefined}
*/
google.maps.Circle.prototype.setOptions = function(options) {};
/**
* Sets the radius of this circle (in meters).
* @param {number} radius
* @return {undefined}
*/
google.maps.Circle.prototype.setRadius = function(radius) {};
/**
* Hides this circle if set to <code>false</code>.
* @param {boolean} visible
* @return {undefined}
*/
google.maps.Circle.prototype.setVisible = function(visible) {};
/**
* Object literal which represents a circle.
* @extends {google.maps.CircleOptions}
* @record
*/
google.maps.CircleLiteral = function() {};
/**
* The center of the Circle.
* @type {!google.maps.LatLng|!google.maps.LatLngLiteral}
*/
google.maps.CircleLiteral.prototype.center;
/**
* The radius in meters on the Earth's surface.
* @type {number}
*/
google.maps.CircleLiteral.prototype.radius;
/**
* CircleOptions object used to define the properties that can be set on a
* Circle.
* @record
*/
google.maps.CircleOptions = function() {};
/**
* The center of the Circle.
* @type {!google.maps.LatLng|!google.maps.LatLngLiteral|null|undefined}
*/
google.maps.CircleOptions.prototype.center;
/**
* Indicates whether this <code>Circle</code> handles mouse events.
* @default <code>true</code>
* @type {boolean|null|undefined}
*/
google.maps.CircleOptions.prototype.clickable;
/**
* If set to <code>true</code>, the user can drag this circle over the map.
* @default <code>false</code>
* @type {boolean|null|undefined}
*/
google.maps.CircleOptions.prototype.draggable;
/**
* If set to <code>true</code>, the user can edit this circle by dragging the
* control points shown at the center and around the circumference of the
* circle.
* @default <code>false</code>
* @type {boolean|null|undefined}
*/
google.maps.CircleOptions.prototype.editable;
/**
* The fill color. All CSS3 colors are supported except for extended named
* colors.
* @type {string|null|undefined}
*/
google.maps.CircleOptions.prototype.fillColor;
/**
* The fill opacity between 0.0 and 1.0.
* @type {number|null|undefined}
*/
google.maps.CircleOptions.prototype.fillOpacity;
/**
* Map on which to display the Circle.
* @type {!google.maps.Map|null|undefined}
*/
google.maps.CircleOptions.prototype.map;
/**
* The radius in meters on the Earth's surface.
* @type {number|null|undefined}
*/
google.maps.CircleOptions.prototype.radius;
/**
* The stroke color. All CSS3 colors are supported except for extended named
* colors.
* @type {string|null|undefined}
*/
google.maps.CircleOptions.prototype.strokeColor;
/**
* The stroke opacity between 0.0 and 1.0.
* @type {number|null|undefined}
*/
google.maps.CircleOptions.prototype.strokeOpacity;
/**
* The stroke position.
* @default {@link google.maps.StrokePosition.CENTER}
* @type {!google.maps.StrokePosition|null|undefined}
*/
google.maps.CircleOptions.prototype.strokePosition;
/**
* The stroke width in pixels.
* @type {number|null|undefined}
*/
google.maps.CircleOptions.prototype.strokeWeight;
/**
* Whether this circle is visible on the map.
* @default <code>true</code>
* @type {boolean|null|undefined}
*/
google.maps.CircleOptions.prototype.visible;
/**
* The zIndex compared to other polys.
* @type {number|null|undefined}
*/
google.maps.CircleOptions.prototype.zIndex;
/**
*
* Access by calling `const {CollisionBehavior} = await
* google.maps.importLibrary("marker")`. See
* https://developers.google.com/maps/documentation/javascript/libraries.
* @enum {string}
*/
google.maps.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, <code>'FOLLOW_SYSTEM'</code> or
* <code>google.maps.ColorScheme.FOLLOW_SYSTEM</code>.
*
* Access by calling `const {ColorScheme} = await
* google.maps.importLibrary("core")`. See
* https://developers.google.com/maps/documentation/javascript/libraries.
* @enum {string}
*/
google.maps.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.
* @enum {string}
*/
google.maps.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 <a
* href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical_properties_and_values">https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical_properties_and_values</a>)
* is recommended in order to be able to automatically support both
* left-to-right (LTR) and right-to-left (RTL) layout contexts.<br> <br>Logical
* values in LTR: <br> <pre>+----------------+
* <br>| BSIS BSIC BSIE |
* <br>| ISBS IEBS |
* <br>| |
* <br>| ISBC IEBC |
* <br>| |
* <br>| ISBE IEBE |
* <br>| BEIS BEIC BEIE | <br>+----------------+</pre><br>
* Logical values in RTL:<br> <pre>+----------------+
* <br>| BSIE BSIC BSIS |
* <br>| IEBS ISBS |
* <br>| |
* <br>| IEBC ISBC |
* <br>| |
* <br>| IEBE ISBE |
* <br>| BEIE BEIC BEIS | <br>+----------------+</pre><br> Legacy
* values:<br> <pre>+----------------+
* <br>| TL TC TR |
* <br>| LT RT |
* <br>| |
* <br>| LC RC |
* <br>| |
* <br>| LB RB |
* <br>| BL BC BR |
* <br>+----------------+</pre><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.
* @enum {number}
*/
google.maps.ControlPosition = {
/**
* Equivalent to BOTTOM_CENTER in both LTR and RTL.
*/
BLOCK_END_INLINE_CENTER: 0,
/**
* Equivalent to BOTTOM_RIGHT in LTR, or BOTTOM_LEFT in RTL.
*/
BLOCK_END_INLINE_END: 1,
/**
* Equivalent to BOTTOM_LEFT in LTR, or BOTTOM_RIGHT in RTL.
*/
BLOCK_END_INLINE_START: 2,
/**
* Equivalent to TOP_CENTER in both LTR and RTL.
*/
BLOCK_START_INLINE_CENTER: 3,
/**
* Equivalent to TOP_RIGHT in LTR, or TOP_LEFT in RTL.
*/
BLOCK_START_INLINE_END: 4,
/**
* Equivalent to TOP_LEFT in LTR, or TOP_RIGHT in RTL.
*/
BLOCK_START_INLINE_START: 5,
/**
* Elements are positioned in the center of the bottom row. Consider using
* BLOCK_END_INLINE_CENTER instead.
*/
BOTTOM_CENTER: 6,
/**
* 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,
/**
* 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,
/**
* Equivalent to RIGHT_CENTER in LTR, or LEFT_CENTER in RTL.
*/
INLINE_END_BLOCK_CENTER: 9,
/**
* Equivalent to RIGHT_BOTTOM in LTR, or LEFT_BOTTOM in RTL.
*/
INLINE_END_BLOCK_END: 10,
/**
* Equivalent to RIGHT_TOP in LTR, or LEFT_TOP in RTL.
*/
INLINE_END_BLOCK_START: 11,
/**
* Equivalent to LEFT_CENTER in LTR, or RIGHT_CENTER in RTL.
*/
INLINE_START_BLOCK_CENTER: 12,
/**
* Equivalent to LEFT_BOTTOM in LTR, or RIGHT_BOTTOM in RTL.
*/
INLINE_START_BLOCK_END: 13,
/**
* Equivalent to LEFT_TOP in LTR, or RIGHT_TOP in RTL.
*/
INLINE_START_BLOCK_START: 14,
/**
* Elements are positioned on the left, above bottom-left elements, and flow
* upwards. Consider using INLINE_START_BLOCK_END instead.
*/
LEFT_BOTTOM: 15,
/**
* Elements are positioned in the center of the left side. Consider using
* INLINE_START_BLOCK_CENTER instead.
*/
LEFT_CENTER: 16,
/**
* Elements are positioned on the left, below top-left elements, and flow
* downwards. Consider using INLINE_START_BLOCK_START instead.
*/
LEFT_TOP: 17,
/**
* Elements are positioned on the right, above bottom-right elements, and flow
* upwards. Consider using INLINE_END_BLOCK_END instead.
*/
RIGHT_BOTTOM: 18,
/**
* Elements are positioned in the center of the right side. Consider using
* INLINE_END_BLOCK_CENTER instead.
*/
RIGHT_CENTER: 19,
/**
* Elements are positioned on the right, below top-right elements, and flow
* downwards. Consider using INLINE_END_BLOCK_START instead.
*/
RIGHT_TOP: 20,
/**
* Elements are positioned in the center of the top row. Consider using
* BLOCK_START_INLINE_CENTER instead.
*/
TOP_CENTER: 21,
/**
* Elements are positioned in the top left and flow towards the middle.
* Consider using BLOCK_START_INLINE_START instead.
*/
TOP_LEFT: 22,
/**
* Elements are positioned in the top right and flow towards the middle.
* Consider using BLOCK_START_INLINE_END instead.
*/
TOP_RIGHT: 23,
};
/**
* This interface provides convenience methods for generating matrices to use
* for rendering WebGL scenes on top of the Google base map. <br><br>Note: A
* reference to this object should <b>not</b> be held outside of the scope of
* the encapsulating {@link google.maps.WebGLOverlayView.onDraw} call.
* @record
*/
google.maps.CoordinateTransformer = function() {};
/**
* @param {!google.maps.LatLngAltitude|!google.maps.LatLngAltitudeLiteral}
* latLngAltitude Latitude, longitude, and altitude.
* @param {!Float32Array=} rotations An array that contains an Euler rotation
* angle in degrees, in the XYZ convention.
* @param {!Float32Array=} scale Array that contains an XYZ scalar array to
* apply to the cardinal axis.
* @return {!Float64Array} MVP matrix to use with WebGL.
*/
google.maps.CoordinateTransformer.prototype.fromLatLngAltitude = function(
latLngAltitude, rotations, scale) {};
/**
* @return {!google.maps.CameraParams} camera parameters
*/
google.maps.CoordinateTransformer.prototype.getCameraParams = function() {};
/**
* @record
*/
google.maps.CoreLibrary = function() {};
/**
* @type {typeof google.maps.ColorScheme}
*/
google.maps.CoreLibrary.prototype.ColorScheme;
/**
* @type {typeof google.maps.ControlPosition}
*/
google.maps.CoreLibrary.prototype.ControlPosition;
/**
* @type {typeof google.maps.event}
*/
google.maps.CoreLibrary.prototype.event;
/**
* @type {typeof google.maps.LatLng}
*/
google.maps.CoreLibrary.prototype.LatLng;
/**
* @type {typeof google.maps.LatLngAltitude}
*/
google.maps.CoreLibrary.prototype.LatLngAltitude;
/**
* @type {typeof google.maps.LatLngBounds}
*/
google.maps.CoreLibrary.prototype.LatLngBounds;
/**
* @type {typeof google.maps.MapsNetworkError}
*/
google.maps.CoreLibrary.prototype.MapsNetworkError;
/**
* @type {typeof google.maps.MapsNetworkErrorEndpoint}
*/
google.maps.CoreLibrary.prototype.MapsNetworkErrorEndpoint;
/**
* @type {typeof google.maps.MapsRequestError}
*/
google.maps.CoreLibrary.prototype.MapsRequestError;
/**
* @type {typeof google.maps.MapsServerError}
*/
google.maps.CoreLibrary.prototype.MapsServerError;
/**
* @type {typeof google.maps.MVCArray}
*/
google.maps.CoreLibrary.prototype.MVCArray;
/**
* @type {typeof google.maps.MVCObject}
*/
google.maps.CoreLibrary.prototype.MVCObject;
/**
* @type {typeof google.maps.Orientation3D}
*/
google.maps.CoreLibrary.prototype.Orientation3D;
/**
* @type {typeof google.maps.Point}
*/
google.maps.CoreLibrary.prototype.Point;
/**
* @type {typeof google.maps.Settings}
*/
google.maps.CoreLibrary.prototype.Settings;
/**
* @type {typeof google.maps.Size}
*/
google.maps.CoreLibrary.prototype.Size;
/**
* @type {typeof google.maps.SymbolPath}
*/
google.maps.CoreLibrary.prototype.SymbolPath;
/**
* @type {typeof google.maps.UnitSystem}
*/
google.maps.CoreLibrary.prototype.UnitSystem;
/**
* @type {typeof google.maps.Vector3D}
*/
google.maps.CoreLibrary.prototype.Vector3D;
/**
* A layer for displaying geospatial data. Points, line-strings and polygons can
* be displayed. <p> Every <code>Map</code> has a <code>Data</code> object by
* default, so most of the time there is no need to construct one. For example:
* <pre> var myMap = new google.maps.Map(...);<br>
* myMap.data.addGeoJson(...);<br> myMap.data.setStyle(...); </pre> The
* <code>Data</code> object is a collection of <a
* href="#Data.Feature"><code>Features</code></a>.
*
* Access by calling `const {Data} = await google.maps.importLibrary("maps")`.
* See https://developers.google.com/maps/documentation/javascript/libraries.
* @param {google.maps.Data.DataOptions=} options
* @extends {google.maps.MVCObject}
* @constructor
*/
google.maps.Data = function(options) {};
/**
* Adds a feature to the collection, and returns the added feature. <p> 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 <code>FeatureOptions</code> are given, a
* new feature will be created with the specified properties. <p> Note that the
* IDs <code>1234</code> and <code>'1234'</code> are equivalent. Adding a
* feature with ID <code>1234</code> will replace a feature with ID
* <code>'1234'</code>, and vice versa.
* @param {(google.maps.Data.Feature|google.maps.Data.FeatureOptions)=} feature
* @return {!google.maps.Data.Feature}
*/
google.maps.Data.prototype.add = function(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.
* @param {!Object} geoJson
* @param {google.maps.Data.GeoJsonOptions=} options
* @return {!Array<!google.maps.Data.Feature>}
*/
google.maps.Data.prototype.addGeoJson = function(geoJson, options) {};
/**
* Checks whether the given feature is in the collection.
* @param {!google.maps.Data.Feature} feature
* @return {boolean}
*/
google.maps.Data.prototype.contains = function(feature) {};
/**
* 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.
* @param {function(!google.maps.Data.Feature): void} callback
* @return {undefined}
*/
google.maps.Data.prototype.forEach = function(callback) {};
/**
* Returns the position of the drawing controls on the map.
* @return {google.maps.ControlPosition}
*/
google.maps.Data.prototype.getControlPosition = function() {};
/**
* Returns which drawing modes are available for the user to select, in the
* order they are displayed. This does not include the <code>null</code> drawing
* mode, which is added by default. Possible drawing modes are
* <code>"Point"</code>, <code>"LineString"</code> or <code>"Polygon"</code>.
* @return {Array<string>}
*/
google.maps.Data.prototype.getControls = function() {};
/**
* Returns the current drawing mode of the given Data layer. A drawing mode of
* <code>null</code> means that the user can interact with the map as normal,
* and clicks do not draw anything. Possible drawing modes are
* <code>null</code>, <code>"Point"</code>, <code>"LineString"</code> or
* <code>"Polygon"</code>.
* @return {?string}
*/
google.maps.Data.prototype.getDrawingMode = function() {};
/**
* Returns the feature with the given ID, if it exists in the collection.
* Otherwise returns <code>undefined</code>. <p> Note that the IDs
* <code>1234</code> and <code>'1234'</code> are equivalent. Either can be used
* to look up the same feature.
* @param {number|string} id
* @return {!google.maps.Data.Feature|undefined}
*/
google.maps.Data.prototype.getFeatureById = function(id) {};
/**
* Returns the map on which the features are displayed.
* @return {google.maps.Map}
*/
google.maps.Data.prototype.getMap = function() {};
/**
* Gets the style for all features in the collection.
* @return {google.maps.Data.StylingFunction|google.maps.Data.StyleOptions}
*/
google.maps.Data.prototype.getStyle = function() {};
/**
* Loads GeoJSON from a URL, and adds the features to the collection. <p> 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 <code>addGeoJson()</code>.
* @param {string} url
* @param {google.maps.Data.GeoJsonOptions=} options
* @param {(function(!Array<!google.maps.Data.Feature>): void)=} callback
* @return {undefined}
*/
google.maps.Data.prototype.loadGeoJson = function(url, options, callback) {};
/**
* Changes the style of a feature. These changes are applied on top of the style
* specified by <code>setStyle()</code>. Style properties set to
* <code>null</code> revert to the value specified via <code>setStyle()</code>.
* @param {!google.maps.Data.Feature} feature
* @param {!google.maps.Data.StyleOptions} style
* @return {undefined}
*/
google.maps.Data.prototype.overrideStyle = function(feature, style) {};
/**
* Removes a feature from the collection.
* @param {!google.maps.Data.Feature} feature
* @return {undefined}
*/
google.maps.Data.prototype.remove = function(feature) {};
/**
* Removes the effect of previous <code>overrideStyle()</code> calls. The style
* of the given feature reverts to the style specified by
* <code>setStyle()</code>. <p>If no feature is given, all features have their
* style reverted.</p>
* @param {google.maps.Data.Feature=} feature
* @return {undefined}
*/
google.maps.Data.prototype.revertStyle = function(feature) {};
/**
* Sets the position of the drawing controls on the map.
* @param {google.maps.ControlPosition} controlPosition
* @return {undefined}
*/
google.maps.Data.prototype.setControlPosition = function(controlPosition) {};
/**
* Sets which drawing modes are available for the user to select, in the order
* they are displayed. This should not include the <code>null</code> drawing
* mode, which is added by default. If <code>null</code>, drawing controls are
* disabled and not displayed. Possible drawing modes are <code>"Point"</code>,
* <code>"LineString"</code> or <code>"Polygon"</code>.
* @param {Array<string>} controls
* @return {undefined}
*/
google.maps.Data.prototype.setControls = function(controls) {};
/**
* Sets the current drawing mode of the given Data layer. A drawing mode of
* <code>null</code> means that the user can interact with the map as normal,
* and clicks do not draw anything. Possible drawing modes are
* <code>null</code>, <code>"Point"</code>, <code>"LineString"</code> or
* <code>"Polygon"</code>.
* @param {?string} drawingMode
* @return {undefined}
*/
google.maps.Data.prototype.setDrawingMode = function(drawingMode) {};
/**
* Renders the features on the specified map. If map is set to
* <code>null</code>, the features will be removed from the map.
* @param {google.maps.Map} map
* @return {undefined}
*/
google.maps.Data.prototype.setMap = function(map) {};
/**
* Sets the style for all features in the collection. Styles specified on a
* per-feature basis via <code>overrideStyle()</code> continue to apply. <p>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.
* @param {google.maps.Data.StylingFunction|google.maps.Data.StyleOptions} style
* @return {undefined}
*/
google.maps.Data.prototype.setStyle = function(style) {};
/**
* Exports the features in the collection to a GeoJSON object.
* @param {function(!Object): void} callback
* @return {undefined}
*/
google.maps.Data.prototype.toGeoJson = function(callback) {};
/**
* The properties of a <code>addfeature</code> event.
* @record
*/
google.maps.Data.AddFeatureEvent = function() {};
/**
* The feature that was added to the <code>FeatureCollection</code>.
* @type {!google.maps.Data.Feature}
*/
google.maps.Data.AddFeatureEvent.prototype.feature;
/**
* DataOptions object used to define the properties that a developer can set on
* a <code>Data</code> object.
* @record
*/
google.maps.Data.DataOptions = function() {};
/**
* The position of the drawing controls on the map.
* @default {@link google.maps.ControlPosition.TOP_LEFT}
* @type {!google.maps.ControlPosition|undefined}
*/
google.maps.Data.DataOptions.prototype.controlPosition;
/**
* Describes which drawing modes are available for the user to select, in the
* order they are displayed. This should not include the <code>null</code>
* drawing mode, which is added by default. If <code>null</code>, drawing
* controls are disabled and not displayed. Possible drawing modes are
* <code>"Point"</code>, <code>"LineString"</code> or <code>"Polygon"</code>.
* @default <code>null</code>
* @type {!Array<string>|null|undefined}
*/
google.maps.Data.DataOptions.prototype.controls;
/**
* The current drawing mode of the given Data layer. A drawing mode of
* <code>null</code> means that the user can interact with the map as normal,
* and clicks do not draw anything. Possible drawing modes are
* <code>null</code>, <code>"Point"</code>, <code>"LineString"</code> or
* <code>"Polygon"</code>.
* @default <code>null</code>
* @type {string|null|undefined}
*/
google.maps.Data.DataOptions.prototype.drawingMode;
/**
* 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 <code>null</code>.
* @type {(function(!google.maps.Data.Geometry):
* !google.maps.Data.Feature)|null|undefined}
*/
google.maps.Data.DataOptions.prototype.featureFactory;
/**
* Map on which to display the features in the collection.
* @type {!google.maps.Map}
*/
google.maps.Data.DataOptions.prototype.map;
/**
* Style for all features in the collection. For more details, see the <code><a
* href='#Data'>setStyle()</a></code> method above.
* @type {!google.maps.Data.StylingFunction|!google.maps.Data.StyleOptions|undefined}
*/
google.maps.Data.DataOptions.prototype.style;
/**
* 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.
* @param {google.maps.Data.FeatureOptions=} options
* @constructor
*/
google.maps.Data.Feature = function(options) {};
/**
* Repeatedly invokes the given function, passing a property value and name on
* each invocation. The order of iteration through the properties is undefined.
* @param {function(*, string): void} callback
* @return {undefined}
*/
google.maps.Data.Feature.prototype.forEachProperty = function(callback) {};
/**
* Returns the feature's geometry.
* @return {google.maps.Data.Geometry}
*/
google.maps.Data.Feature.prototype.getGeometry = function() {};
/**
* Returns the feature ID.
* @return {number|string|undefined}
*/
google.maps.Data.Feature.prototype.getId = function() {};
/**
* Returns the value of the requested property, or <code>undefined</code> if the
* property does not exist.
* @param {string} name
* @return {*}
*/
google.maps.Data.Feature.prototype.getProperty = function(name) {};
/**
* Removes the property with the given name.
* @param {string} name
* @return {undefined}
*/
google.maps.Data.Feature.prototype.removeProperty = function(name) {};
/**
* Sets the feature's geometry.
* @param {google.maps.Data.Geometry|google.maps.LatLng|google.maps.LatLngLiteral}
* newGeometry
* @return {undefined}
*/
google.maps.Data.Feature.prototype.setGeometry = function(newGeometry) {};
/**
* Sets the value of the specified property. If <code>newValue</code> is
* <code>undefined</code> this is equivalent to calling
* <code>removeProperty</code>.
* @param {string} name
* @param {*} newValue
* @return {undefined}
*/
google.maps.Data.Feature.prototype.setProperty = function(name, newValue) {};
/**
* Exports the feature to a GeoJSON object.
* @param {function(!Object): void} callback
* @return {undefined}
*/
google.maps.Data.Feature.prototype.toGeoJson = function(callback) {};
/**
* Optional parameters for creating <code>Data.Feature</code> objects.
* @record
*/
google.maps.Data.FeatureOptions = function() {};
/**
* The feature geometry. If none is specified when a feature is constructed, the
* feature's geometry will be <code>null</code>. If a <code>LatLng</code>
* object or <code>LatLngLiteral</code> is given, this will be converted to a
* <code>Data.Point</code> geometry.
* @type {!google.maps.Data.Geometry|!google.maps.LatLng|!google.maps.LatLngLiteral|null|undefined}
*/
google.maps.Data.FeatureOptions.prototype.geometry;
/**
* Feature ID is optional. If provided, it can be used to look up the feature in
* a <code>Data</code> object using the <code>getFeatureById()</code> method.
* Note that a feature's ID cannot be subsequently changed.
* @type {number|string|undefined}
*/
google.maps.Data.FeatureOptions.prototype.id;
/**
* The feature properties. This is an arbitrary mapping of property names to
* values.
* @type {!Object|null|undefined}
*/
google.maps.Data.FeatureOptions.prototype.properties;
/**
* Optional parameters for importing GeoJSON.
* @record
*/
google.maps.Data.GeoJsonOptions = function() {};
/**
* The name of the Feature property to use as the feature ID. If not specified,
* the GeoJSON Feature id will be used.
* @type {string|null|undefined}
*/
google.maps.Data.GeoJsonOptions.prototype.idPropertyName;
/**
* A superclass for the various geometry objects.
* @record
*/
google.maps.Data.Geometry = function() {};
/**
* Repeatedly invokes the given function, passing a point from the geometry to
* the function on each invocation.
* @param {function(!google.maps.LatLng): void} callback
* @return {undefined}
*/
google.maps.Data.Geometry.prototype.forEachLatLng = function(callback) {};
/**
* Returns the type of the geometry object. Possibilities are
* <code>"Point"</code>, <code>"MultiPoint"</code>, <code>"LineString"</code>,
* <code>"MultiLineString"</code>, <code>"LinearRing"</code>,
* <code>"Polygon"</code>, <code>"MultiPolygon"</code>, or
* <code>"GeometryCollection"</code>.
* @return {string}
*/
google.maps.Data.Geometry.prototype.getType = function() {};
/**
* A GeometryCollection contains a number of geometry objects. Any
* <code>LatLng</code> or <code>LatLngLiteral</code> objects are automatically
* converted to <code>Data.Point</code> geometry objects.
*
* Access by calling `const {Data} = await google.maps.importLibrary("maps")`.
* See https://developers.google.com/maps/documentation/javascript/libraries.
* @param {!Array<!google.maps.Data.Geometry|!google.maps.LatLng|!google.maps.LatLngLiteral>}
* elements
* @implements {google.maps.Data.Geometry}
* @constructor
*/
google.maps.Data.GeometryCollection = function(elements) {};
/**
* @param {function(!google.maps.LatLng): void} callback
* @return {undefined}
* @override
*/
google.maps.Data.GeometryCollection.prototype.forEachLatLng = function(
callback) {};
/**
* Returns an array of the contained geometry objects. A new array is returned
* each time <code>getArray()</code> is called.
* @return {!Array<!google.maps.Data.Geometry>}
*/
google.maps.Data.GeometryCollection.prototype.getArray = function() {};
/**
* Returns the <code>n</code>-th contained geometry object.
* @param {number} n
* @return {!google.maps.Data.Geometry}
*/
google.maps.Data.GeometryCollection.prototype.getAt = function(n) {};
/**
* Returns the number of contained geometry objects.
* @return {number}
*/
google.maps.Data.GeometryCollection.prototype.getLength = function() {};
/**
* Returns the string <code>"GeometryCollection"</code>.
* @return {string}
* @override
*/
google.maps.Data.GeometryCollection.prototype.getType = function() {};
/**
* A LineString geometry contains a number of <code>LatLng</code>s.
*
* Access by calling `const {Data} = await google.maps.importLibrary("maps")`.
* See https://developers.google.com/maps/documentation/javascript/libraries.
* @param {!Array<!google.maps.LatLng|!google.maps.LatLngLiteral>} elements
* @implements {google.maps.Data.Geometry}
* @constructor
*/
google.maps.Data.LineString = function(elements) {};
/**
* @param {function(!google.maps.LatLng): void} callback
* @return {undefined}
* @override
*/
google.maps.Data.LineString.prototype.forEachLatLng = function(callback) {};
/**
* Returns an array of the contained <code>LatLngs</code>. A new array is
* returned each time <code>getArray()</code> is called.
* @return {!Array<!google.maps.LatLng>}
*/
google.maps.Data.LineString.prototype.getArray = function() {};
/**
* Returns the <code>n</code>-th contained <code>LatLng</code>.
* @param {number} n
* @return {!google.maps.LatLng}
*/
google.maps.Data.LineString.prototype.getAt = function(n) {};
/**
* Returns the number of contained <code>LatLng</code>s.
* @return {number}
*/
google.maps.Data.LineString.prototype.getLength = function() {};
/**
* Returns the string <code>"LineString"</code>.
* @return {string}
* @override
*/
google.maps.Data.LineString.prototype.getType = function() {};
/**
* A LinearRing geometry contains a number of <code>LatLng</code>s, representing
* a closed LineString. There is no need to make the first <code>LatLng</code>
* equal to the last <code>LatLng</code>. The LinearRing is closed implicitly.
*
* Access by calling `const {Data} = await google.maps.importLibrary("maps")`.
* See https://developers.google.com/maps/documentation/javascript/libraries.
* @param {!Array<!google.maps.LatLng|!google.maps.LatLngLiteral>} elements
* @implements {google.maps.Data.Geometry}
* @constructor
*/
google.maps.Data.LinearRing = function(elements) {};
/**
* @param {function(!google.maps.LatLng): void} callback
* @return {undefined}
* @override
*/
google.maps.Data.LinearRing.prototype.forEachLatLng = function(callback) {};
/**
* Returns an array of the contained <code>LatLng</code>s. A new array is
* returned each time <code>getArray()</code> is called.
* @return {!Array<!google.maps.LatLng>}
*/
google.maps.Data.LinearRing.prototype.getArray = function() {};
/**
* Returns the <code>n</code>-th contained <code>LatLng</code>.
* @param {number} n
* @return {!google.maps.LatLng}
*/
google.maps.Data.LinearRing.prototype.getAt = function(n) {};
/**
* Returns the number of contained <code>LatLng</code>s.
* @return {number}
*/
google.maps.Data.LinearRing.prototype.getLength = function() {};
/**
* Returns the string <code>"LinearRing"</code>.
* @return {string}
* @override
*/
google.maps.Data.LinearRing.prototype.getType = function() {};
/**
* This object is passed to mouse event handlers on a <code>Data</code> object.
* @extends {google.maps.MapMouseEvent}
* @record
*/
google.maps.Data.MouseEvent = function() {};
/**
* The feature which generated the mouse event.
* @type {!google.maps.Data.Feature}
*/
google.maps.Data.MouseEvent.prototype.feature;
/**
* A MultiLineString geometry contains a number of <code>LineString</code>s.
*
* Access by calling `const {Data} = await google.maps.importLibrary("maps")`.
* See https://developers.google.com/maps/documentation/javascript/libraries.
* @param {!Array<!google.maps.Data.LineString|!Array<!google.maps.LatLng|!google.maps.LatLngLiteral>>}
* elements
* @implements {google.maps.Data.Geometry}
* @constructor
*/
google.maps.Data.MultiLineString = function(elements) {};
/**
* @param {function(!google.maps.LatLng): void} callback
* @return {undefined}
* @override
*/
google.maps.Data.MultiLineString.prototype.forEachLatLng = function(
callback) {};
/**
* Returns an array of the contained <code>Data.LineString</code>s. A new array
* is returned each time <code>getArray()</code> is called.
* @return {!Array<!google.maps.Data.LineString>}
*/
google.maps.Data.MultiLineString.prototype.getArray = function() {};
/**
* Returns the <code>n</code>-th contained <code>Data.LineString</code>.
* @param {number} n
* @return {!google.maps.Data.LineString}
*/
google.maps.Data.MultiLineString.prototype.getAt = function(n) {};
/**
* Returns the number of contained <code>Data.LineString</code>s.
* @return {number}
*/
google.maps.Data.MultiLineString.prototype.getLength = function() {};
/**
* Returns the string <code>"MultiLineString"</code>.
* @return {string}
* @override
*/
google.maps.Data.MultiLineString.prototype.getType = function() {};
/**
* A MultiPoint geometry contains a number of <code>LatLng</code>s.
*
* Access by calling `const {Data} = await google.maps.importLibrary("maps")`.
* See https://developers.google.com/maps/documentation/javascript/libraries.
* @param {!Array<!google.maps.LatLng|!google.maps.LatLngLiteral>} elements
* @implements {google.maps.Data.Geometry}
* @constructor
*/
google.maps.Data.MultiPoint = function(elements) {};
/**
* @param {function(!google.maps.LatLng): void} callback
* @return {undefined}
* @override
*/
google.maps.Data.MultiPoint.prototype.forEachLatLng = function(callback) {};
/**
* Returns an array of the contained <code>LatLng</code>s. A new array is
* returned each time <code>getArray()</code> is called.
* @return {!Array<!google.maps.LatLng>}
*/
google.maps.Data.MultiPoint.prototype.getArray = function() {};
/**
* Returns the <code>n</code>-th contained <code>LatLng</code>.
* @param {number} n
* @return {!google.maps.LatLng}
*/
google.maps.Data.MultiPoint.prototype.getAt = function(n) {};
/**
* Returns the number of contained <code>LatLng</code>s.
* @return {number}
*/
google.maps.Data.MultiPoint.prototype.getLength = function() {};
/**
* Returns the string <code>"MultiPoint"</code>.
* @return {string}
* @override
*/
google.maps.Data.MultiPoint.prototype.getType = function() {};
/**
* A MultiPolygon geometry contains a number of <code>Data.Polygon</code>s.
*
* Access by calling `const {Data} = await google.maps.importLibrary("maps")`.
* See https://developers.google.com/maps/documentation/javascript/libraries.
* @param {!Array<!google.maps.Data.Polygon|!Array<!google.maps.Data.LinearRing|!Array<!google.maps.LatLng|!google.maps.LatLngLiteral>>>}
* elements
* @implements {google.maps.Data.Geometry}
* @constructor
*/
google.maps.Data.MultiPolygon = function(elements) {};
/**
* @param {function(!google.maps.LatLng): void} callback
* @return {undefined}
* @override
*/
google.maps.Data.MultiPolygon.prototype.forEachLatLng = function(callback) {};
/**
* Returns an array of the contained <code>Data.Polygon</code>s. A new array is
* returned each time <code>getArray()</code> is called.
* @return {!Array<!google.maps.Data.Polygon>}
*/
google.maps.Data.MultiPolygon.prototype.getArray = function() {};
/**
* Returns the <code>n</code>-th contained <code>Data.Polygon</code>.
* @param {number} n
* @return {!google.maps.Data.Polygon}
*/
google.maps.Data.MultiPolygon.prototype.getAt = function(n) {};
/**
* Returns the number of contained <code>Data.Polygon</code>s.
* @return {number}
*/
google.maps.Data.MultiPolygon.prototype.getLength = function() {};
/**
* Returns the string <code>"MultiPolygon"</code>.
* @return {string}
* @override
*/
google.maps.Data.MultiPolygon.prototype.getType = function() {};
/**
* A Point geometry contains a single <code>LatLng</code>.
*
* Access by calling `const {Data} = await google.maps.importLibrary("maps")`.
* See https://developers.google.com/maps/documentation/javascript/libraries.
* @param {!google.maps.LatLng|!google.maps.LatLngLiteral} latLng
* @implements {google.maps.Data.Geometry}
* @constructor
*/
google.maps.Data.Point = function(latLng) {};
/**
* @param {function(!google.maps.LatLng): void} callback
* @return {undefined}
* @override
*/
google.maps.Data.Point.prototype.forEachLatLng = function(callback) {};
/**
* Returns the contained <code>LatLng</code>.
* @return {!google.maps.LatLng}
*/
google.maps.Data.Point.prototype.get = function() {};
/**
* Returns the string <code>"Point"</code>.
* @return {string}
* @override
*/
google.maps.Data.Point.prototype.getType = function() {};
/**
* A Polygon geometry contains a number of <code>Data.LinearRing</code>s. The
* first linear-ring must be the polygon exterior boundary and subsequent
* linear-rings must be interior boundaries, also known as holes. See the <a
* href="https://developers.google.com/maps/documentation/javascript/examples/layer-data-polygon">sample
* polygon with a hole</a>.
*
* Access by calling `const {Data} = await google.maps.importLibrary("maps")`.
* See https://developers.google.com/maps/documentation/javascript/libraries.
* @param {!Array<!google.maps.Data.LinearRing|!Array<!google.maps.LatLng|!google.maps.LatLngLiteral>>}
* elements
* @implements {google.maps.Data.Geometry}
* @constructor
*/
google.maps.Data.Polygon = function(elements) {};
/**
* @param {function(!google.maps.LatLng): void} callback
* @return {undefined}
* @override
*/
google.maps.Data.Polygon.prototype.forEachLatLng = function(callback) {};
/**
* Returns an array of the contained <code>Data.LinearRing</code>s. A new array
* is returned each time <code>getArray()</code> is called.
* @return {!Array<!google.maps.Data.LinearRing>}
*/
google.maps.Data.Polygon.prototype.getArray = function() {};
/**
* Returns the <code>n</code>-th contained <code>Data.LinearRing</code>.
* @param {number} n
* @return {!google.maps.Data.Linear