google-closure-compiler
Version:
Check, compile, optimize and compress Javascript with Closure-Compiler
1,625 lines (1,418 loc) • 417 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 = {};
/**
* Google Maps JavaScript API version loaded by the browser.
* @see https://developers.google.com/maps/documentation/javascript/versions
*
* @type {string}
* @const
*/
google.maps.version;
/**
* 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.
* @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,
};
/**
* A layer showing bike lanes and paths.
* @extends {google.maps.MVCObject}
* @constructor
*/
google.maps.BicyclingLayer = function() {};
/**
* Returns the map on which this layer is displayed.
* @return {google.maps.Map}
*/
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} map
* @return {undefined}
*/
google.maps.BicyclingLayer.prototype.setMap = function(map) {};
/**
* 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".
* @param {(?google.maps.Circle|?google.maps.CircleLiteral|?google.maps.CircleOptions)=}
* circleOrCircleOptions
* @extends {google.maps.MVCObject}
* @constructor
*/
google.maps.Circle = function(circleOrCircleOptions) {};
/**
* Gets the <code>LatLngBounds</code> of this Circle.
* @return {google.maps.LatLngBounds}
*/
google.maps.Circle.prototype.getBounds = function() {};
/**
* Returns the center of this circle.
* @return {google.maps.LatLng}
*/
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}
*/
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} 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} map
* @return {undefined}
*/
google.maps.Circle.prototype.setMap = function(map) {};
/**
* @param {google.maps.CircleOptions} 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|undefined}
*/
google.maps.CircleOptions.prototype.center;
/**
* Indicates whether this <code>Circle</code> handles mouse events. Defaults to
* <code>true</code>.
* @type {?boolean|undefined}
*/
google.maps.CircleOptions.prototype.clickable;
/**
* If set to <code>true</code>, the user can drag this circle over the map.
* Defaults to <code>false</code>.
* @type {?boolean|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. Defaults to <code>false</code>.
* @type {?boolean|undefined}
*/
google.maps.CircleOptions.prototype.editable;
/**
* The fill color. All CSS3 colors are supported except for extended named
* colors.
* @type {?string|undefined}
*/
google.maps.CircleOptions.prototype.fillColor;
/**
* The fill opacity between 0.0 and 1.0.
* @type {?number|undefined}
*/
google.maps.CircleOptions.prototype.fillOpacity;
/**
* Map on which to display the Circle.
* @type {?google.maps.Map|undefined}
*/
google.maps.CircleOptions.prototype.map;
/**
* The radius in meters on the Earth's surface.
* @type {?number|undefined}
*/
google.maps.CircleOptions.prototype.radius;
/**
* The stroke color. All CSS3 colors are supported except for extended named
* colors.
* @type {?string|undefined}
*/
google.maps.CircleOptions.prototype.strokeColor;
/**
* The stroke opacity between 0.0 and 1.0.
* @type {?number|undefined}
*/
google.maps.CircleOptions.prototype.strokeOpacity;
/**
* The stroke position. Defaults to CENTER. This property is not supported on
* Internet Explorer 8 and earlier.
* @type {?google.maps.StrokePosition|undefined}
*/
google.maps.CircleOptions.prototype.strokePosition;
/**
* The stroke width in pixels.
* @type {?number|undefined}
*/
google.maps.CircleOptions.prototype.strokeWeight;
/**
* Whether this circle is visible on the map. Defaults to <code>true</code>.
* @type {?boolean|undefined}
*/
google.maps.CircleOptions.prototype.visible;
/**
* The zIndex compared to other polys.
* @type {?number|undefined}
*/
google.maps.CircleOptions.prototype.zIndex;
/**
* Available only in the v=beta channel: https://goo.gle/3oAthT3.
* @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 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.
* <code> <br> +----------------+
* <br> + TL TC TR
* +
* <br> + LT RT
* +
* <br> + +
* <br> + LC RC
* +
* <br> + +
* <br> + LB RB
* +
* <br> + BL BC BR
* + <br> +----------------+ <br></code> 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.
* @enum {number}
*/
google.maps.ControlPosition = {
/**
* Elements are positioned in the center of the bottom row.
*/
BOTTOM_CENTER: 0,
/**
* Elements are positioned in the bottom left and flow towards the middle.
* Elements are positioned to the right of the Google logo.
*/
BOTTOM_LEFT: 1,
/**
* Elements are positioned in the bottom right and flow towards the middle.
* Elements are positioned to the left of the copyrights.
*/
BOTTOM_RIGHT: 2,
/**
* Elements are positioned on the left, above bottom-left elements, and flow
* upwards.
*/
LEFT_BOTTOM: 3,
/**
* Elements are positioned in the center of the left side.
*/
LEFT_CENTER: 4,
/**
* Elements are positioned on the left, below top-left elements, and flow
* downwards.
*/
LEFT_TOP: 5,
/**
* Elements are positioned on the right, above bottom-right elements, and flow
* upwards.
*/
RIGHT_BOTTOM: 6,
/**
* Elements are positioned in the center of the right side.
*/
RIGHT_CENTER: 7,
/**
* Elements are positioned on the right, below top-right elements, and flow
* downwards.
*/
RIGHT_TOP: 8,
/**
* Elements are positioned in the center of the top row.
*/
TOP_CENTER: 9,
/**
* Elements are positioned in the top left and flow towards the middle.
*/
TOP_LEFT: 10,
/**
* Elements are positioned in the top right and flow towards the middle.
*/
TOP_RIGHT: 11,
};
/**
* 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() {};
/**
* 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>.
* @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. The default position is
* 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. Defaults to <code>null</code>.
* Possible drawing modes are <code>"Point"</code>, <code>"LineString"</code> or
* <code>"Polygon"</code>.
* @type {?Array<string>|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. Defaults to <code>null</code>. Possible
* drawing modes are <code>null</code>, <code>"Point"</code>,
* <code>"LineString"</code> or <code>"Polygon"</code>.
* @type {?string|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)|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.
* @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|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|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|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.
* @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.
* @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.
* @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.
* @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.
* @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.
* @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>.
* @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>.
* @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.LinearRing}
*/
google.maps.Data.Polygon.prototype.getAt = function(n) {};
/**
* Returns the number of contained <code>Data.LinearRing</code>s.
* @return {number}
*/
google.maps.Data.Polygon.prototype.getLength = function() {};
/**
* Returns the string <code>"Polygon"</code>.
* @return {string}
* @override
*/
google.maps.Data.Polygon.prototype.getType = function() {};
/**
* The properties of a <code>removefeature</code> event.
* @record
*/
google.maps.Data.RemoveFeatureEvent = function() {};
/**
* The feature that was removed from the <code>FeatureCollection</code>.
* @type {!google.maps.Data.Feature}
*/
google.maps.Data.RemoveFeatureEvent.prototype.feature;
/**
* The properties of a <code>removeproperty</code> event.
* @record
*/
google.maps.Data.RemovePropertyEvent = function() {};
/**
* The feature whose property was removed.
* @type {!google.maps.Data.Feature}
*/
google.maps.Data.RemovePropertyEvent.prototype.feature;
/**
* The property name.
* @type {string}
*/
google.maps.Data.RemovePropertyEvent.prototype.name;
/**
* The previous value.
* @type {*}
*/
google.maps.Data.RemovePropertyEvent.prototype.oldValue;
/**
* The properties of a <code>setgeometry</code> event.
* @record
*/
google.maps.Data.SetGeometryEvent = function() {};
/**
* The feature whose geometry was set.
* @type {!google.maps.Data.Feature}
*/
google.maps.Data.SetGeometryEvent.prototype.feature;
/**
* The new feature geometry.
* @type {!google.maps.Data.Geometry|undefined}
*/
google.maps.Data.SetGeometryEvent.prototype.newGeometry;
/**
* The previous feature geometry.
* @type {!google.maps.Data.Geometry|undefined}
*/
google.maps.Data.SetGeometryEvent.prototype.oldGeometry;
/**
* The properties of a <code>setproperty</code> event.
* @record
*/
google.maps.Data.SetPropertyEvent = function() {};
/**
* The feature whose property was set.
* @type {!google.maps.Data.Feature}
*/
google.maps.Data.SetPropertyEvent.prototype.feature;
/**
* The property name.
* @type {string}
*/
google.maps.Data.SetPropertyEvent.prototype.name;
/**
* The new value.
* @type {*}
*/
google.maps.Data.SetPropertyEvent.prototype.newValue;
/**
* The previous value. Will be <code>undefined</code> if the property was added.
* @type {*}
*/
google.maps.Data.SetPropertyEvent.prototype.oldValue;
/**
* These options specify the way a Feature should appear when displayed on a
* map.
* @record
*/
google.maps.Data.StyleOptions = function() {};
/**
* The animation to play when marker is added to a map. Only applies to point
* geometries.
* @type {!google.maps.Animation|undefined}
*/
google.maps.Data.StyleOptions.prototype.animation;
/**
* If <code>true</code>, the marker receives mouse and touch events. Default
* value is <code>true</code>.
* @type {boolean|undefined}
*/
google.maps.Data.StyleOptions.prototype.clickable;
/**
* Mouse cursor to show on hover. Only applies to point geometries.
* @type {string|undefined}
*/
google.maps.Data.StyleOptions.prototype.cursor;
/**
* If <code>true</code>, the object can be dragged across the map and the
* underlying feature will have its geometry updated. Default value is
* <code>false</code>.
* @type {boolean|undefined}
*/
google.maps.Data.StyleOptions.prototype.draggable;
/**
* If <code>true</code>, 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. Default value is <code>false</code>.
* @type {boolean|undefined}
*/
google.maps.Data.StyleOptions.prototype.editable;
/**
* The fill color. All CSS3 colors are supported except for extended named
* colors. Only applies to polygon geometries.
* @type {string|undefined}
*/
google.maps.Data.StyleOptions.prototype.fillColor;
/**
* The fill opacity between 0.0 and 1.0. Only applies to polygon geometries.
* @type {number|undefined}
*/
google.maps.Data.StyleOptions.prototype.fillOpacity;
/**
* Icon for the foreground. If a string is provided, it is treated as though it
* were an <code>Icon</code> with the string as <code>url</code>. Only applies
* to point geometries.
* @type {string|!google.maps.Icon|!google.maps.Symbol|undefined}
*/
google.maps.Data.StyleOptions.prototype.icon;
/**
* The icons to be rendered along a polyline. Only applies to line geometries.
* @type {!Array<!google.maps.IconSequence>|undefined}
*/
google.maps.Data.StyleOptions.prototype.icons;
/**
* Adds a label to the marker. The label can either be a string, or a
* <code>MarkerLabel</code> object. Only applies to point geometries.
* @type {string|!google.maps.MarkerLabel|undefined}
*/
google.maps.Data.StyleOptions.prototype.label;
/**
* The marker's opacity between 0.0 and 1.0. Only applies to point
* geometries.
* @type {number|undefined}
*/
google.maps.Data.StyleOptions.prototype.opacity;
/**
* Defines the image map used for hit detection. Only applies to point
* geometries.
* @type {!google.maps.MarkerShape|undefined}
*/
google.maps.Data.StyleOptions.prototype.shape;
/**
* The stroke color. All CSS3 colors are supported except for extended named
* colors. Only applies to line and polygon geometries.
* @type {string|undefined}
*/
google.maps.Data.StyleOptions.prototype.strokeColor;
/**
* The stroke opacity between 0.0 and 1.0. Only applies to line and polygon
* geometries.
* @type {number|undefined}
*/
google.maps.Data.StyleOptions.prototype.strokeOpacity;
/**
* The stroke width in pixels. Only applies to line and polygon geometries.
* @type {number|undefined}
*/
google.maps.Data.StyleOptions.prototype.strokeWeight;
/**
* Rollover text. Only applies to point geometries.
* @type {string|undefined}
*/
google.maps.Data.StyleOptions.prototype.title;
/**
* Whether the feature is visible. Defaults to <code>true</code>.
* @type {boolean|undefined}
*/
google.maps.Data.StyleOptions.prototype.visible;
/**
* 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.
* @type {number|undefined}
*/
google.maps.Data.StyleOptions.prototype.zIndex;
/**
* @typedef {function(!google.maps.Data.Feature):
* !google.maps.Data.StyleOptions}
*/
google.maps.Data.StylingFunction;
/**
* A single geocoded waypoint.
* @record
*/
google.maps.DirectionsGeocodedWaypoint = function() {};
/**
* Whether the geocoder did not return an exact match for the original waypoint,
* though it was able to match part of the requested address.
* @type {boolean|undefined}
*/
google.maps.DirectionsGeocodedWaypoint.prototype.partial_match;
/**
* 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 <a
* href="https://developers.google.com/maps/documentation/places/web-service/place-id">Place
* IDs</a> in the Places API developer guide.
* @type {string|undefined}
*/
google.maps.DirectionsGeocodedWaypoint.prototype.place_id;
/**
* An array of strings denoting the type of the returned geocoded element. For a
* list of possible strings, refer to the <a href=
* "https://developers.google.com/maps/documentation/javascript/geocoding#GeocodingAddressTypes">
* Address Component Types</a> section of the Developer's Guide.
* @type {!Array<string>|undefined}
*/
google.maps.DirectionsGeocodedWaypoint.prototype.types;
/**
* A single leg consisting of a set of steps in a <code><a
* href="#DirectionsResult">DirectionsResult</a></code>. 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 <code>LatLng</code> objects.
* @record
*/
google.maps.DirectionsLeg = function() {};
/**
* An estimated arrival time for this leg. Only applicable for TRANSIT requests.
* @type {!google.maps.Time|undefined}
*/
google.maps.DirectionsLeg.prototype.arrival_time;
/**
* An estimated departure time for this leg. Only applicable for TRANSIT
* requests.
* @type {!google.maps.Time|undefined}
*/
google.maps.DirectionsLeg.prototype.departure_time;
/**
* The total distance covered by this leg. This property may be undefined as the
* distance may be unknown.
* @type {!google.maps.Distance|undefined}
*/
google.maps.DirectionsLeg.prototype.distance;
/**
* The total duration of this leg. This property may be <code>undefined</code>
* as the duration may be unknown.
* @type {!google.maps.Duration|undefined}
*/
google.maps.DirectionsLeg.prototype.duration;
/**
* The total duration of this leg, taking into account the traffic conditions
* indicated by the <code>trafficModel</code> property. This property may be
* <code>undefined</code> as the duration may be unknown.
* @type {!google.maps.Duration|undefined}
*/
google.maps.DirectionsLeg.prototype.duration_in_traffic;
/**
* The address of the destination of this leg. This content is meant to be read
* as-is. Do not programmatically parse the formatted address.
* @type {string}
*/
google.maps.DirectionsLeg.prototype.end_address;
/**
* The <code>DirectionsService</code> calculates directions between locations by
* using the nearest transportation option (usually a road) at the start and end
* locations. <code>end_location</code> indicates the actual geocoded
* destination, which may be different than the <code>end_location</code> of the
* last step if, for example, the road is not near the destination of this leg.
* @type {!google.maps.LatLng}
*/
google.maps.DirectionsLeg.prototype.end_location;
/**
* The address of the origin of this leg. This content is meant to be read
* as-is. Do not programmatically parse the formatted address.
* @type {string}
*/
google.maps.DirectionsLeg.prototype.start_address;
/**
* The <code>DirectionsService</code> calculates directions between locations by
* using the nearest transportation option (usually a road) at the start and end
* locations. <code>start_location</code> indicates the actual geocoded origin,
* which may be different than the <code>start_location</code> of the first step
* if, for example, the road is not near the origin of this leg.
* @type {!google.maps.LatLng}
*/
google.maps.DirectionsLeg.prototype.start_location;
/**
* An array of <code>DirectionsStep</code>s, each of which contains information
* about the individual steps in this leg.
* @type {!Array<!google.maps.DirectionsStep>}
*/
google.maps.DirectionsLeg.prototype.steps;
/**
* Information about traffic speed along the leg.
* @type {!Array<?>}
* @deprecated This array will always be empty.
*/
google.maps.DirectionsLeg.prototype.traffic_speed_entry;
/**
* An array of non-stopover waypoints along this leg, which were specified in
* the original request. <p> <strong>Deprecated in alternative routes</strong>.
* Version 3.27 will be the last version of the API that adds extra
* <code>via_waypoints</code> in alternative routes. <p> 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.
* @type {!Array<!google.maps.LatLng>}
*/
google.maps.DirectionsLeg.prototype.via_waypoints;
/**
* An object containing a <code>points</code> property to describe the polyline
* of a {@link google.maps.DirectionsStep}.
* @record
*/
google.maps.DirectionsPolyline = function() {};
/**
* An <a
* href="https://developers.google.com/maps/documentation/utilities/polylinealgorithm">encoded
* polyline</a>.
* @type {string}
*/
google.maps.DirectionsPolyline.prototype.points;
/**
* Renders directions obtained from the <code><a
* href="#DirectionsService">DirectionsService</a></code>.
* @param {google.maps.DirectionsRendererOptions=} opts
* @extends {google.maps.MVCObject}
* @constructor
*/
google.maps.DirectionsRenderer = function(opts)