The externs file file can be used with the Closure Compiler to compile JavaScript that uses the Google Maps API as follows:
java -jar compiler.jar \ --compilation_level ADVANCED_OPTIMIZATIONS \ --externs maps-v2-externs.js \ --js my_maps_script.js \ --js_output_file my_maps_script_compiled.jsIf the content of
my_maps_script.js
were:
function setup() { var el = document.getElementById('map'); var map = new GMap2(el); map.enableDragging(); } window.onload = setup;then the result of the compilation would be:
function a(){var b=document.getElementById("map");(new GMap2(b)).enableDragging()}window.onload=a;In this example, the Maps symbols were externed (i.e., not renamed) appropriately. By comparison, if the
--externs maps-v2-externs.js
option were omitted, the output
would be:
function a(){var b=document.getElementById("map");(new GMap2(b)).a()}window.onload=a;
Notice that without the externs file, enableDragging
is incorrectly
renamed to a
when ADVANCED_OPTIMIZATIONS
is used.
An alternative would be to use a weaker compilation level, but that would
decrease the benefit of using the Compiler!
Google Code has
documentation on how to write JavaScript code so it will be compiled correctly
when using ADVANCED_OPTIMIZATIONS
. Including
maps-v2-externs.js
is an example of what is described in the
Declaring Externs section of the documentation.
This externs file was generated from the
online HTML reference for the Google Maps API V2 using
Chickenfoot.
The Chickenfoot script is available at
at generate-maps-v2-externs.js.
Note that you may be unable to run the Chickenfoot script because it was
developed using the upcoming version of Chickenfoot
which will include much of the
Closure Library and
make it available to Chickenfoot scripts.
You can see examples of how this will work by searching for the
references to goog
in
generate-maps-v2-externs.js
.
/** * @param {Node} container * @param {GMapOptions=} opts * @constructor */ var GMap2 = function(container, opts) {}; /** */ GMap2.prototype.enableDragging = function() {}; /** */ GMap2.prototype.disableDragging = function() {}; /** * @return {boolean} */ GMap2.prototype.draggingEnabled = function() {}; /** */ GMap2.prototype.enableInfoWindow = function() {}; /** */ GMap2.prototype.disableInfoWindow = function() {}; /** * @return {boolean} */ GMap2.prototype.infoWindowEnabled = function() {}; /** */ GMap2.prototype.enableDoubleClickZoom = function() {}; /** */ GMap2.prototype.disableDoubleClickZoom = function() {}; /** * @return {boolean} */ GMap2.prototype.doubleClickZoomEnabled = function() {}; /** */ GMap2.prototype.enableContinuousZoom = function() {}; /** */ GMap2.prototype.disableContinuousZoom = function() {}; /** * @return {boolean} */ GMap2.prototype.continuousZoomEnabled = function() {}; /** */ GMap2.prototype.enableGoogleBar = function() {}; /** */ GMap2.prototype.disableGoogleBar = function() {}; /** */ GMap2.prototype.enableScrollWheelZoom = function() {}; /** */ GMap2.prototype.disableScrollWheelZoom = function() {}; /** * @return {boolean} */ GMap2.prototype.scrollWheelZoomEnabled = function() {}; /** */ GMap2.prototype.enablePinchToZoom = function() {}; /** */ GMap2.prototype.disablePinchToZoom = function() {}; /** * @return {boolean} */ GMap2.prototype.pinchToZoomEnabled = function() {}; /** * @return {Object} */ GMap2.prototype.getDefaultUI = function() {}; /** */ GMap2.prototype.setUIToDefault = function() {}; /** * @param {GMapUIOptions} ui */ GMap2.prototype.setUI = function(ui) {}; /** * @param {GControl} control * @param {GControlPosition=} position */ GMap2.prototype.addControl = function(control, position) {}; /** * @param {GControl} control */ GMap2.prototype.removeControl = function(control) {}; /** * @return {Node} */ GMap2.prototype.getContainer = function() {}; /** * @return {Array.} */ GMap2.prototype.getMapTypes = function() {}; /** * @return {GMapType} */ GMap2.prototype.getCurrentMapType = function() {}; /** * @param {GMapType} type */ GMap2.prototype.setMapType = function(type) {}; /** * @param {GMapType} type */ GMap2.prototype.addMapType = function(type) {}; /** * @param {GMapType} type */ GMap2.prototype.removeMapType = function(type) {}; /** * @return {boolean} */ GMap2.prototype.isLoaded = function() {}; /** * @return {GLatLng} */ GMap2.prototype.getCenter = function() {}; /** * @return {GLatLngBounds} */ GMap2.prototype.getBounds = function() {}; /** * @param {GLatLngBounds} bounds * @return {number} */ GMap2.prototype.getBoundsZoomLevel = function(bounds) {}; /** * @return {GSize} */ GMap2.prototype.getSize = function() {}; /** * @return {number} */ GMap2.prototype.getZoom = function() {}; /** * @return {GDraggableObject} */ GMap2.prototype.getDragObject = function() {}; /** * @param {function(*)} callback */ GMap2.prototype.getEarthInstance = function(callback) {}; /** * @param {GLatLng} center * @param {number=} zoom * @param {GMapType=} type */ GMap2.prototype.setCenter = function(center, zoom, type) {}; /** * @param {GLatLng} center */ GMap2.prototype.panTo = function(center) {}; /** * @param {GSize} distance */ GMap2.prototype.panBy = function(distance) {}; /** * @param {number} dx * @param {number} dy */ GMap2.prototype.panDirection = function(dx, dy) {}; /** * @param {number} level */ GMap2.prototype.setZoom = function(level) {}; /** * @param {GLatLng=} latlng * @param {boolean=} doCenter * @param {boolean=} doContinuousZoom */ GMap2.prototype.zoomIn = function(latlng, doCenter, doContinuousZoom) {}; /** * @param {GLatLng=} latlng * @param {boolean=} doContinuousZoom */ GMap2.prototype.zoomOut = function(latlng, doContinuousZoom) {}; /** */ GMap2.prototype.savePosition = function() {}; /** */ GMap2.prototype.returnToSavedPosition = function() {}; /** */ GMap2.prototype.checkResize = function() {}; /** * @param {GOverlay} overlay */ GMap2.prototype.addOverlay = function(overlay) {}; /** * @param {GOverlay} overlay */ GMap2.prototype.removeOverlay = function(overlay) {}; /** */ GMap2.prototype.clearOverlays = function() {}; /** * @param {GMapPane} pane * @return {Node} */ GMap2.prototype.getPane = function(pane) {}; /** * @param {GLatLng} latlng * @param {Node} node * @param {GInfoWindowOptions=} opts */ GMap2.prototype.openInfoWindow = function(latlng, node, opts) {}; /** * @param {GLatLng} latlng * @param {string} html * @param {GInfoWindowOptions=} opts */ GMap2.prototype.openInfoWindowHtml = function(latlng, html, opts) {}; /** * @param {GLatLng} latlng * @param {Array. } tabs * @param {GInfoWindowOptions=} opts */ GMap2.prototype.openInfoWindowTabs = function(latlng, tabs, opts) {}; /** * @param {GLatLng} latlng * @param {Array. } tabs * @param {GInfoWindowOptions=} opts */ GMap2.prototype.openInfoWindowTabsHtml = function(latlng, tabs, opts) {}; /** * @param {GLatLng} latlng * @param {GInfoWindowOptions=} opts */ GMap2.prototype.showMapBlowup = function(latlng, opts) {}; /** * @param {Array. } tabs * @param {function(...[*]):*=} onupdate */ GMap2.prototype.updateInfoWindow = function(tabs, onupdate) {}; /** * @param {function(...[*]):*} modifier * @param {function(...[*]):*=} onupdate */ GMap2.prototype.updateCurrentTab = function(modifier, onupdate) {}; /** */ GMap2.prototype.closeInfoWindow = function() {}; /** * @return {GInfoWindow} */ GMap2.prototype.getInfoWindow = function() {}; /** * @param {GPoint} pixel * @return {GLatLng} */ GMap2.prototype.fromContainerPixelToLatLng = function(pixel) {}; /** * @param {GLatLng} latlng * @return {GPoint} */ GMap2.prototype.fromLatLngToContainerPixel = function(latlng) {}; /** * @param {GLatLng} latlng * @return {GPoint} */ GMap2.prototype.fromLatLngToDivPixel = function(latlng) {}; /** * @param {GPoint} pixel * @return {GLatLng} */ GMap2.prototype.fromDivPixelToLatLng = function(pixel) {}; /** * @param {Array. } points * @constructor */ var GBounds = function(points) {}; /** * @type {number} */ GBounds.prototype.minX; /** * @type {number} */ GBounds.prototype.minY; /** * @type {number} */ GBounds.prototype.maxX; /** * @type {number} */ GBounds.prototype.maxY; /** * @return {string} */ GBounds.prototype.toString = function() {}; /** * @param {GBounds} other * @return {boolean} */ GBounds.prototype.equals = function(other) {}; /** * @return {GPoint} */ GBounds.prototype.mid = function() {}; /** * @return {GPoint} */ GBounds.prototype.min = function() {}; /** * @return {GPoint} */ GBounds.prototype.max = function() {}; /** * @param {GBounds} other * @return {boolean} */ GBounds.prototype.containsBounds = function(other) {}; /** * @param {GPoint} point * @return {boolean} */ GBounds.prototype.containsPoint = function(point) {}; /** * @param {GPoint} point */ GBounds.prototype.extend = function(point) {}; /** * @return {boolean} */ var GBrowserIsCompatible = function() {}; /** * @param {Node} src * @param {GDraggableObjectOptions=} opts * @constructor */ var GDraggableObject = function(src, opts) {}; /** * @param {string} cursor */ GDraggableObject.setDraggableCursor = function(cursor) {}; /** * @param {string} cursor */ GDraggableObject.setDraggingCursor = function(cursor) {}; /** * @param {string} cursor */ GDraggableObject.prototype.setDraggableCursor = function(cursor) {}; /** * @param {string} cursor */ GDraggableObject.prototype.setDraggingCursor = function(cursor) {}; /** * @param {GPoint} point */ GDraggableObject.prototype.moveTo = function(point) {}; /** * @param {GSize} size */ GDraggableObject.prototype.moveBy = function(size) {}; /** * @constructor */ var GDraggableObjectOptions = function() {}; /** * @type {number} */ GDraggableObjectOptions.prototype.left; /** * @type {number} */ GDraggableObjectOptions.prototype.top; /** * @type {Node} */ GDraggableObjectOptions.prototype.container; /** * @type {string} */ GDraggableObjectOptions.prototype.draggableCursor; /** * @type {string} */ GDraggableObjectOptions.prototype.draggingCursor; /** * @type {boolean} */ GDraggableObjectOptions.prototype.delayDrag; /** * @constructor */ var GInfoWindow = function() {}; /** * @param {number} index */ GInfoWindow.prototype.selectTab = function(index) {}; /** */ GInfoWindow.prototype.hide = function() {}; /** */ GInfoWindow.prototype.show = function() {}; /** * @return {boolean} */ GInfoWindow.prototype.isHidden = function() {}; /** * @param {GLatLng} latlng * @param {Array. } tabs * @param {GSize} size * @param {GSize=} offset * @param {number=} selectedTab */ GInfoWindow.prototype.reset = function(latlng, tabs, size, offset, selectedTab) {}; /** * @return {GLatLng} */ GInfoWindow.prototype.getPoint = function() {}; /** * @return {GSize} */ GInfoWindow.prototype.getPixelOffset = function() {}; /** * @return {number} */ GInfoWindow.prototype.getSelectedTab = function() {}; /** * @return {Array. } */ GInfoWindow.prototype.getTabs = function() {}; /** * @return {Array. } */ GInfoWindow.prototype.getContentContainers = function() {}; /** */ GInfoWindow.prototype.enableMaximize = function() {}; /** */ GInfoWindow.prototype.disableMaximize = function() {}; /** */ GInfoWindow.prototype.maximize = function() {}; /** */ GInfoWindow.prototype.restore = function() {}; /** * @constructor */ var GInfoWindowOptions = function() {}; /** * @param {string} label * @param {Node|string} content * @constructor */ var GInfoWindowTab = function(label, content) {}; /** * @param {GMap2} map * @constructor */ var GKeyboardHandler = function(map) {}; var GLanguage = {}; /** * @return {string} */ GLanguage.getLanguageCode = function() {}; /** * @return {boolean} */ GLanguage.isRtl = function() {}; /** * @param {number} lat * @param {number} lng * @param {boolean=} unbounded * @constructor */ var GLatLng = function(lat, lng, unbounded) {}; /** * @param {string} latlng * @return {GLatLng} */ GLatLng.fromUrlValue = function(latlng) {}; /** * @return {number} */ GLatLng.prototype.lat = function() {}; /** * @return {number} */ GLatLng.prototype.lng = function() {}; /** * @return {number} */ GLatLng.prototype.latRadians = function() {}; /** * @return {number} */ GLatLng.prototype.lngRadians = function() {}; /** * @param {GLatLng} other * @return {boolean} */ GLatLng.prototype.equals = function(other) {}; /** * @param {GLatLng} other * @param {number=} radius * @return {number} */ GLatLng.prototype.distanceFrom = function(other, radius) {}; /** * @param {number=} precision * @return {string} */ GLatLng.prototype.toUrlValue = function(precision) {}; /** * @param {GLatLng=} sw * @param {GLatLng=} ne * @constructor */ var GLatLngBounds = function(sw, ne) {}; /** * @param {GLatLngBounds} other * @return {boolean} */ GLatLngBounds.prototype.equals = function(other) {}; /** * @param {GLatLng} latlng * @return {boolean} */ GLatLngBounds.prototype.containsLatLng = function(latlng) {}; /** * @param {GLatLngBounds} other * @return {boolean} */ GLatLngBounds.prototype.intersects = function(other) {}; /** * @param {GLatLngBounds} other * @return {boolean} */ GLatLngBounds.prototype.containsBounds = function(other) {}; /** * @param {GLatLng} latlng */ GLatLngBounds.prototype.extend = function(latlng) {}; /** * @return {GLatLng} */ GLatLngBounds.prototype.getSouthWest = function() {}; /** * @return {GLatLng} */ GLatLngBounds.prototype.getNorthEast = function() {}; /** * @return {GLatLng} */ GLatLngBounds.prototype.toSpan = function() {}; /** * @return {boolean} */ GLatLngBounds.prototype.isFullLat = function() {}; /** * @return {boolean} */ GLatLngBounds.prototype.isFullLng = function() {}; /** * @return {boolean} */ GLatLngBounds.prototype.isEmpty = function() {}; /** * @return {GLatLng} */ GLatLngBounds.prototype.getCenter = function() {}; var GLog = {}; /** * @param {string} message * @param {string=} color */ GLog.write = function(message, color) {}; /** * @param {string} url */ GLog.writeUrl = function(url) {}; /** * @param {string} html */ GLog.writeHtml = function(html) {}; /** * @constructor */ var GMapOptions = function() {}; /** * @type {GSize} */ GMapOptions.prototype.size; /** * @type {Array. } */ GMapOptions.prototype.mapTypes; /** * @type {string} */ GMapOptions.prototype.draggableCursor; /** * @type {string} */ GMapOptions.prototype.draggingCursor; /** * @type {GGoogleBarOptions} */ GMapOptions.prototype.googleBarOptions; /** * @type {string} */ GMapOptions.prototype.backgroundColor; /** @enum */ var GMapPane = {}; /** * @type {*} */ GMapPane.G_MAP_MAP_PANE; /** * @type {*} */ GMapPane.G_MAP_OVERLAY_LAYER_PANE; /** * @type {*} */ GMapPane.G_MAP_MARKER_SHADOW_PANE; /** * @type {*} */ GMapPane.G_MAP_MARKER_PANE; /** * @type {*} */ GMapPane.G_MAP_FLOAT_SHADOW_PANE; /** * @type {*} */ GMapPane.G_MAP_MARKER_MOUSE_TARGET_PANE; /** * @type {*} */ GMapPane.G_MAP_FLOAT_PANE; /** * @param {number} x * @param {number} y * @constructor */ var GPoint = function(x, y) {}; /** * @type {number} */ GPoint.prototype.x; /** * @type {number} */ GPoint.prototype.y; /** * @param {GPoint} other * @return {boolean} */ GPoint.prototype.equals = function(other) {}; /** * @return {string} */ GPoint.prototype.toString = function() {}; /** * @type {*} */ GPoint.ORIGIN; /** * @param {number} width * @param {number} height * @constructor */ var GSize = function(width, height) {}; /** * @type {number} */ GSize.prototype.width; /** * @type {number} */ GSize.prototype.height; /** * @param {GSize} other * @return {boolean} */ GSize.prototype.equals = function(other) {}; /** * @return {string} */ GSize.prototype.toString = function() {}; /** * @type {*} */ GSize.ZERO; /** */ var GUnload = function() {}; var G_API_VERSION; var GEvent = {}; /** * @param {Object} source * @param {string} event * @param {function(...[*]):*} handler * @return {GEventListener} */ GEvent.addListener = function(source, event, handler) {}; /** * @param {Node} source * @param {string} event * @param {function(...[*]):*} handler * @return {GEventListener} */ GEvent.addDomListener = function(source, event, handler) {}; /** * @param {GEventListener} handle */ GEvent.removeListener = function(handle) {}; /** * @param {Object|Node} source * @param {string} event */ GEvent.clearListeners = function(source, event) {}; /** * @param {Object|Node} source */ GEvent.clearInstanceListeners = function(source) {}; /** * @param {Node} source */ GEvent.clearNode = function(source) {}; /** * @param {Object} source * @param {string} event * @param {...*} var_args */ GEvent.trigger = function(source, event, var_args) {}; /** * @param {Object} source * @param {string} event * @param {Object} object * @param {function(...[*]):*} method * @return {GEventListener} */ GEvent.bind = function(source, event, object, method) {}; /** * @param {Node} source * @param {string} event * @param {Object} object * @param {function(...[*]):*} method * @return {GEventListener} */ GEvent.bindDom = function(source, event, object, method) {}; /** * @param {Object} object * @param {function(...[*]):*} method * @return {function(...[*]):*} */ GEvent.callback = function(object, method) {}; /** * @param {Object} object * @param {function(...[*]):*} method * @param {...*} var_args * @return {function(...[*]):*} */ GEvent.callbackArgs = function(object, method, var_args) {}; /** * @constructor */ var GEventListener = function() {}; /** * @param {boolean=} printable * @param {boolean=} selectable * @constructor */ var GControl = function(printable, selectable) {}; /** * @return {boolean} */ GControl.prototype.printable = function() {}; /** * @return {boolean} */ GControl.prototype.selectable = function() {}; /** * @param {GMap2} map * @return {Node} */ GControl.prototype.initialize = function(map) {}; /** * @return {GControlPosition} */ GControl.prototype.getDefaultPosition = function() {}; /** @enum */ var GControlAnchor = {}; /** * @type {*} */ GControlAnchor.G_ANCHOR_TOP_RIGHT; /** * @type {*} */ GControlAnchor.G_ANCHOR_TOP_LEFT; /** * @type {*} */ GControlAnchor.G_ANCHOR_BOTTOM_RIGHT; /** * @type {*} */ GControlAnchor.G_ANCHOR_BOTTOM_LEFT; /** * @param {GControlAnchor} anchor * @param {GSize} offset * @constructor */ var GControlPosition = function(anchor, offset) {}; /** * @constructor */ var GHierarchicalMapTypeControl = function() {}; /** * @param {GMapType} parentType * @param {GMapType} childType * @param {string=} childText * @param {boolean=} isDefault */ GHierarchicalMapTypeControl.prototype.addRelationship = function(parentType, childType, childText, isDefault) {}; /** * @param {GMapType} mapType */ GHierarchicalMapTypeControl.prototype.removeRelationship = function(mapType) {}; /** */ GHierarchicalMapTypeControl.prototype.clearRelationships = function() {}; /** * @param {Array. } layers * @param {GProjection} projection * @param {string} name * @param {GMapTypeOptions=} opts * @constructor */ var GMapType = function(layers, projection, name, opts) {}; /** * @param {GLatLng} center * @param {GLatLng} span * @param {GSize} viewSize * @return {number} */ GMapType.prototype.getSpanZoomLevel = function(center, span, viewSize) {}; /** * @param {GLatLngBounds} bounds * @param {GSize} viewSize */ GMapType.prototype.getBoundsZoomLevel = function(bounds, viewSize) {}; /** * @param {boolean=} short * @return {string} */ GMapType.prototype.getName = function(short) {}; /** * @return {GProjection} */ GMapType.prototype.getProjection = function() {}; /** * @return {number} */ GMapType.prototype.getTileSize = function() {}; /** * @return {Array. } */ GMapType.prototype.getTileLayers = function() {}; /** * @return {number} */ GMapType.prototype.getMinimumResolution = function() {}; /** * @return {number} */ GMapType.prototype.getMaximumResolution = function() {}; /** * @param {GLatLng} latlng * @param {function(...[*]):*} callback * @param {number} opt_targetZoom */ GMapType.prototype.getMaxZoomAtLatLng = function(latlng, callback, opt_targetZoom) {}; /** * @return {string} */ GMapType.prototype.getTextColor = function() {}; /** * @return {string} */ GMapType.prototype.getLinkColor = function() {}; /** * @return {string} */ GMapType.prototype.getErrorMessage = function() {}; /** * @param {GLatLngBounds} bounds * @param {number} zoom * @return {Array. } */ GMapType.prototype.getCopyrights = function(bounds, zoom) {}; /** * @return {string} */ GMapType.prototype.getUrlArg = function() {}; /** * @return {string} */ GMapType.prototype.getAlt = function() {}; /** * @type {*} */ GMapType.G_NORMAL_MAP; /** * @type {*} */ GMapType.G_SATELLITE_MAP; /** * @type {*} */ GMapType.G_HYBRID_MAP; /** * @type {*} */ GMapType.G_PHYSICAL_MAP; /** * @type {*} */ GMapType.G_MAPMAKER_NORMAL_MAP; /** * @type {*} */ GMapType.G_MAPMAKER_HYBRID_MAP; /** * @type {*} */ GMapType.G_MOON_ELEVATION_MAP; /** * @type {*} */ GMapType.G_MOON_VISIBLE_MAP; /** * @type {*} */ GMapType.G_MARS_ELEVATION_MAP; /** * @type {*} */ GMapType.G_MARS_VISIBLE_MAP; /** * @type {*} */ GMapType.G_MARS_INFRARED_MAP; /** * @type {*} */ GMapType.G_SKY_VISIBLE_MAP; /** * @type {*} */ GMapType.G_SATELLITE_3D_MAP; /** * @type {*} */ GMapType.G_DEFAULT_MAP_TYPES; /** * @type {*} */ GMapType.G_MAPMAKER_MAP_TYPES; /** * @type {*} */ GMapType.G_MOON_MAP_TYPES; /** * @type {*} */ GMapType.G_MARS_MAP_TYPES; /** * @type {*} */ GMapType.G_SKY_MAP_TYPES; /** * @param {boolean=} useShortNames * @constructor */ var GMapTypeControl = function(useShortNames) {}; /** * @constructor */ var GMapTypeOptions = function() {}; /** * @type {string} */ GMapTypeOptions.prototype.shortName; /** * @type {string} */ GMapTypeOptions.prototype.urlArg; /** * @type {number} */ GMapTypeOptions.prototype.maxResolution; /** * @type {number} */ GMapTypeOptions.prototype.minResolution; /** * @type {number} */ GMapTypeOptions.prototype.tileSize; /** * @type {string} */ GMapTypeOptions.prototype.textColor; /** * @type {string} */ GMapTypeOptions.prototype.linkColor; /** * @type {string} */ GMapTypeOptions.prototype.errorMessage; /** * @type {string} */ GMapTypeOptions.prototype.alt; /** * @type {number} */ GMapTypeOptions.prototype.radius; /** * @param {GSize} opt_size * @constructor */ var GMapUIOptions = function(opt_size) {}; /** * @type {boolean} */ GMapUIOptions.prototype.maptypes.normal; /** * @type {boolean} */ GMapUIOptions.prototype.maptypes.satellite; /** * @type {boolean} */ GMapUIOptions.prototype.maptypes.hybrid; /** * @type {boolean} */ GMapUIOptions.prototype.maptypes.physical; /** * @type {boolean} */ GMapUIOptions.prototype.zoom.scrollwheel; /** * @type {boolean} */ GMapUIOptions.prototype.zoom.doubleclick; /** * @type {boolean} */ GMapUIOptions.prototype.keyboard; /** * @type {boolean} */ GMapUIOptions.prototype.controls.largemapcontrol3d; /** * @type {boolean} */ GMapUIOptions.prototype.controls.smallzoomcontrol3d; /** * @type {boolean} */ GMapUIOptions.prototype.controls.maptypecontrol; /** * @type {boolean} */ GMapUIOptions.prototype.controls.menumaptypecontrol; /** * @type {boolean} */ GMapUIOptions.prototype.controls.scalecontrol; /** * @param {boolean=} useShortNames * @constructor */ var GMenuMapTypeControl = function(useShortNames) {}; /** * @constructor */ var GNavLabelControl = function() {}; /** * @param {number} level */ GNavLabelControl.prototype.setMinAddressLinkLevel = function(level) {}; /** * @param {number} id * @param {GLatLngBounds} bounds * @param {number} minZoom * @param {string} text * @constructor */ var GCopyright = function(id, bounds, minZoom, text) {}; /** * @type {number} */ GCopyright.prototype.id; /** * @type {number} */ GCopyright.prototype.minZoom; /** * @type {GLatLngBounds} */ GCopyright.prototype.bounds; /** * @type {string} */ GCopyright.prototype.text; /** * @param {string=} prefix * @constructor */ var GCopyrightCollection = function(prefix) {}; /** * @param {GCopyright} copyright */ GCopyrightCollection.prototype.addCopyright = function(copyright) {}; /** * @param {GLatLngBounds} bounds * @param {number} zoom * @return {Array. } */ GCopyrightCollection.prototype.getCopyrights = function(bounds, zoom) {}; /** * @param {GLatLngBounds} bounds * @param {number} zoom * @return {string} */ GCopyrightCollection.prototype.getCopyrightNotice = function(bounds, zoom) {}; /** * @param {string} imageUrl * @param {GLatLngBounds} bounds * @constructor */ var GGroundOverlay = function(imageUrl, bounds) {}; /** */ GGroundOverlay.prototype.hide = function() {}; /** * @return {boolean} */ GGroundOverlay.prototype.isHidden = function() {}; /** */ GGroundOverlay.prototype.show = function() {}; /** * @return {boolean} */ GGroundOverlay.prototype.supportsHide = function() {}; /** * @param {GIcon=} copy * @param {string=} image * @constructor */ var GIcon = function(copy, image) {}; /** * @type {string} */ GIcon.prototype.image; /** * @type {string} */ GIcon.prototype.shadow; /** * @type {GSize} */ GIcon.prototype.iconSize; /** * @type {GSize} */ GIcon.prototype.shadowSize; /** * @type {GPoint} */ GIcon.prototype.iconAnchor; /** * @type {GPoint} */ GIcon.prototype.infoWindowAnchor; /** * @type {string} */ GIcon.prototype.printImage; /** * @type {string} */ GIcon.prototype.mozPrintImage; /** * @type {string} */ GIcon.prototype.printShadow; /** * @type {string} */ GIcon.prototype.transparent; /** * @type {Array. } */ GIcon.prototype.imageMap; /** * @type {number} */ GIcon.prototype.maxHeight; /** * @type {string} */ GIcon.prototype.dragCrossImage; /** * @type {GSize} */ GIcon.prototype.dragCrossSize; /** * @type {GPoint} */ GIcon.prototype.dragCrossAnchor; /** * @type {*} */ GIcon.G_DEFAULT_ICON; /** * @param {string} layerId * @constructor */ var GLayer = function(layerId) {}; /** * @param {string} layerId */ GLayer.isHidden = function(layerId) {}; /** */ GLayer.prototype.hide = function() {}; /** */ GLayer.prototype.show = function() {}; /** * @param {GLatLng} latlng * @param {GIcon=} icon * @param {boolean=} inert * @constructor */ var GMarker = function(latlng, icon, inert) {}; /** * @param {Node} content * @param {GInfoWindowOptions=} opts */ GMarker.prototype.openInfoWindow = function(content, opts) {}; /** * @param {string} content * @param {GInfoWindowOptions=} opts */ GMarker.prototype.openInfoWindowHtml = function(content, opts) {}; /** * @param {Array. } tabs * @param {GInfoWindowOptions=} opts */ GMarker.prototype.openInfoWindowTabs = function(tabs, opts) {}; /** * @param {Array. } tabs * @param {GInfoWindowOptions=} opts */ GMarker.prototype.openInfoWindowTabsHtml = function(tabs, opts) {}; /** * @param {Node} content * @param {GInfoWindowOptions=} opts */ GMarker.prototype.bindInfoWindow = function(content, opts) {}; /** * @param {string} content * @param {GInfoWindowOptions=} opts */ GMarker.prototype.bindInfoWindowHtml = function(content, opts) {}; /** * @param {Array. } tabs * @param {GInfoWindowOptions=} opts */ GMarker.prototype.bindInfoWindowTabs = function(tabs, opts) {}; /** * @param {Array. } tabs * @param {GInfoWindowOptions=} opts */ GMarker.prototype.bindInfoWindowTabsHtml = function(tabs, opts) {}; /** */ GMarker.prototype.closeInfoWindow = function() {}; /** * @param {GInfoWindowOptions=} opts */ GMarker.prototype.showMapBlowup = function(opts) {}; /** * @return {GIcon} */ GMarker.prototype.getIcon = function() {}; /** * @return {string} */ GMarker.prototype.getTitle = function() {}; /** * @return {GLatLng} */ GMarker.prototype.getLatLng = function() {}; /** * @param {GLatLng} latlng */ GMarker.prototype.setLatLng = function(latlng) {}; /** */ GMarker.prototype.enableDragging = function() {}; /** */ GMarker.prototype.disableDragging = function() {}; /** * @return {boolean} */ GMarker.prototype.draggable = function() {}; /** * @return {boolean} */ GMarker.prototype.draggingEnabled = function() {}; /** * @param {string} url */ GMarker.prototype.setImage = function(url) {}; /** */ GMarker.prototype.hide = function() {}; /** */ GMarker.prototype.show = function() {}; /** * @return {boolean} */ GMarker.prototype.isHidden = function() {}; /** * @param {GMap2} map * @param {GMarkerManagerOptions=} opts * @constructor */ var GMarkerManager = function(map, opts) {}; /** * @param {Array. } markers * @param {number} minZoom * @param {number=} maxZoom */ GMarkerManager.prototype.addMarkers = function(markers, minZoom, maxZoom) {}; /** * @param {GMarker} marker * @param {number} minZoom * @param {number=} maxZoom */ GMarkerManager.prototype.addMarker = function(marker, minZoom, maxZoom) {}; /** */ GMarkerManager.prototype.refresh = function() {}; /** * @param {number} zoom * @return {number} */ GMarkerManager.prototype.getMarkerCount = function(zoom) {}; /** * @constructor */ var GMarkerManagerOptions = function() {}; /** * @type {number} */ GMarkerManagerOptions.prototype.borderPadding; /** * @type {number} */ GMarkerManagerOptions.prototype.maxZoom; /** * @type {boolean} */ GMarkerManagerOptions.prototype.trackMarkers; /** * @constructor */ var GMarkerOptions = function() {}; /** * @param {number} zoomlevels * @constructor */ var GMercatorProjection = function(zoomlevels) {}; /** * @param {GLatLng} latlng * @param {number} zoom * @return {GPoint} */ GMercatorProjection.prototype.fromLatLngToPixel = function(latlng, zoom) {}; /** * @param {GPoint} pixel * @param {number} zoom * @param {boolean=} unbounded * @return {GLatLng} */ GMercatorProjection.prototype.fromPixelToLatLng = function(pixel, zoom, unbounded) {}; /** * @param {GPoint} tile * @param {number} zoom * @param {number} tilesize */ GMercatorProjection.prototype.tileCheckRange = function(tile, zoom, tilesize) {}; /** * @param {number} zoom */ GMercatorProjection.prototype.getWrapWidth = function(zoom) {}; /** * @constructor */ var GOverlay = function() {}; /** * @param {number} latitude * @return {number} */ GOverlay.getZIndex = function(latitude) {}; /** * @constructor */ var GPolyEditingOptions = function() {}; /** * @constructor */ var GPolyStyleOptions = function() {}; /** * @param {Array. } latlngs * @param {string=} strokeColor * @param {number=} strokeWeight * @param {number=} strokeOpacity * @param {number=} fillColor * @param {number=} fillOpacity * @param {GPolygonOptions=} opts * @constructor */ var GPolygon = function(latlngs, strokeColor, strokeWeight, strokeOpacity, fillColor, fillOpacity, opts) {}; /** * @param {Array.