### initialize() Source: https://googlemaps.github.io/v3-utility-library/modules/_googlemaps_jest_mocks.html Initializes the Google Maps Jest mocks environment. ```APIDOC ## initialize() ### Description Initializes the Google Maps Jest mocks environment for use in test suites. ### Method Function Call ### Endpoint initialize() ### Response - **Returns** (void) - Initializes the mock environment. ``` -------------------------------- ### MVCObject get Mock Source: https://googlemaps.github.io/v3-utility-library/classes/_googlemaps_jest_mocks.mvcobject.html Mock implementation for the get method of MVCObject. Used to retrieve property values. ```typescript get: Mock = jest.fn().mockImplementation((key: string): any => {}) ``` -------------------------------- ### Constructor new Marker() Source: https://googlemaps.github.io/v3-utility-library/classes/_googlemaps_jest_mocks.marker.html Initializes a new instance of the Marker mock class. ```APIDOC ## Constructor new Marker ### Description Creates a new Marker mock instance using the provided options. ### Parameters #### Request Body - **opts** (ReadonlyMarkerOptions) - Optional - Configuration options for the marker. ``` -------------------------------- ### MarkerManager Class Documentation Source: https://googlemaps.github.io/v3-utility-library/classes/_googlemaps_markermanager.markermanager.html Detailed documentation for the MarkerManager class, including its constructor, properties, and methods. ```APIDOC ## Class MarkerManager ### Hierarchy * MarkerManager ## Index ### Constructors * constructor ### Properties * shown * shownMarkers ### Methods * addMarker * addMarkers * clearMarkers * getMarker * getMarkerCount * hide * isHidden * refresh * removeMarker * resetManager * show * toggle * visible ## Constructors ### constructor * new MarkerManager(map: Map, __namedParameters: object): MarkerManager * #### Parameters * ##### map: Map * ##### __namedParameters: object * ##### borderPadding: number * ##### maxZoom: number * ##### shown: boolean * ##### trackMarkers: boolean #### Returns MarkerManager ## Properties ### shown shown: boolean ### shownMarkers shownMarkers: number ## Methods ### addMarker * addMarker(marker: Marker, minZoom: number, maxZoom: number): void * #### Parameters * ##### marker: Marker * ##### minZoom: number * ##### maxZoom: number #### Returns void ### addMarkers * addMarkers(markers: Marker[], minZoom: number, maxZoom: number): void * #### Parameters * ##### markers: Marker[] * ##### minZoom: number * ##### maxZoom: number #### Returns void ### clearMarkers * clearMarkers(): void * #### Returns void ### getMarker * getMarker(lat: number, lng: number, zoom: number): Marker * #### Parameters * ##### lat: number * ##### lng: number * ##### zoom: number #### Returns Marker marker - the marker found at lat and lng ### getMarkerCount * getMarkerCount(zoom: number): number * #### Parameters * ##### zoom: number #### Returns number ### hide * hide(): void * #### Returns void ### isHidden * isHidden(): boolean * #### Returns boolean Hidden ### refresh * refresh(): void * #### Returns void ### removeMarker * removeMarker(marker: Marker): void * #### Parameters * ##### marker: Marker #### Returns void ### resetManager * resetManager(): void * #### Returns void ### show * show(): void * #### Returns void ### toggle * toggle(): void * #### Returns void ### visible * visible(): boolean * #### Returns boolean Visible ``` -------------------------------- ### Loader Constructor Source: https://googlemaps.github.io/v3-utility-library/classes/_googlemaps_loader.loader.html Initializes a new instance of the Loader class with configuration parameters. ```APIDOC ## Constructor ### Description Creates a new Loader instance to manage Google Maps API loading. ### Parameters - **apiKey** (string) - Optional - The API key for authentication. - **channel** (string) - Optional - The channel for usage tracking. - **clientId** (string) - Optional - The client ID for enterprise customers. - **language** (string) - Optional - The language for the API. - **libraries** (string[]) - Optional - Array of libraries to load. - **region** (string) - Optional - The region code. - **version** (string) - Optional - The version of the API to load. ``` -------------------------------- ### LatLng Class Documentation Source: https://googlemaps.github.io/v3-utility-library/classes/_googlemaps_jest_mocks.latlng.html Detailed documentation for the LatLng class, including its constructor and properties. ```APIDOC ## Class LatLng ### Hierarchy * LatLng ### Implements * LatLng ## Constructors ### constructor * new LatLng(literal: LatLngLiteral, noWrap: boolean): LatLng * #### Parameters * ##### literal: LatLngLiteral * ##### Optional noWrap: boolean #### Returns LatLng ## Properties ### equals equals: Mock = jest.fn().mockImplementation((other: google.maps.LatLng): boolean => false) ### lat lat: Mock = jest.fn().mockImplementation((): number => 0) ### lng lng: Mock = jest.fn().mockImplementation((): number => 0) ### toJSON toJSON: Mock = jest.fn().mockImplementation((): google.maps.LatLngLiteral => {return { lat: 0, lng: 0 };}) ### toString toString: Mock = jest.fn().mockImplementation((): string => "") ### toUrlValue toUrlValue: Mock = jest.fn().mockImplementation((precision?: number): string => "") ``` -------------------------------- ### Marker Property Methods Source: https://googlemaps.github.io/v3-utility-library/classes/_googlemaps_jest_mocks.marker.html Methods for interacting with and configuring the Marker mock instance. ```APIDOC ## Marker Property Methods ### Description Methods to get or set properties of the Marker mock, such as position, visibility, and animation. ### Methods - **getPosition()** - Returns the current LatLng of the marker. - **setPosition(latlng)** - Sets the position of the marker. - **getVisible()** - Returns the visibility status of the marker. - **setVisible(flag)** - Sets the visibility of the marker. - **setOptions(options)** - Sets multiple options for the marker at once. ``` -------------------------------- ### MVCArray Constructor Source: https://googlemaps.github.io/v3-utility-library/classes/_googlemaps_jest_mocks.mvcarray.html Initializes a new instance of the MVCArray class. ```APIDOC ## Constructor ### Description Creates a new MVCArray instance, optionally initialized with an array of elements. ### Parameters #### Request Body - **array** (T[]) - Optional - An initial array of elements to populate the MVCArray. ``` -------------------------------- ### Polyline Class Documentation Source: https://googlemaps.github.io/v3-utility-library/classes/_googlemaps_jest_mocks.polyline.html Detailed documentation for the Polyline class, including its constructor and properties. ```APIDOC ## Class Polyline ### Hierarchy * MVCObject * Polyline ### Implements * MVCObject * Polyline ## Constructors ### constructor * new Polyline(opts: __type): Polyline * #### Parameters * ##### Optional opts: __type #### Returns Polyline ## Properties ### addListener addListener: Mock = jest.fn().mockImplementation((eventName: string, handler: (...args: any[]) => void): void => {}) ### bindTo bindTo: Mock = jest.fn().mockImplementation((key: string,target: MVCObject,targetKey?: string,noNotify?: boolean): void => {}) ### changed changed: Mock = jest.fn().mockImplementation((key: string): void => {}) ### get get: Mock = jest.fn().mockImplementation((key: string): any => {}) ### getDraggable getDraggable: Mock = jest.fn().mockImplementation((): boolean => false) ### getEditable getEditable: Mock = jest.fn().mockImplementation((): boolean => false) ### getMap getMap: Mock = jest.fn().mockImplementation((): google.maps.Map => ({} as google.maps.Map)) ### getPath getPath: Mock = jest.fn().mockImplementation((): google.maps.MVCArray =>({} as google.maps.MVCArray)) ### getVisible getVisible: Mock = jest.fn().mockImplementation((): boolean => false) ### notify notify: Mock = jest.fn().mockImplementation((key: string): void => {}) ### set set: Mock = jest.fn().mockImplementation((key: string, value: any): void => {}) ### setDraggable setDraggable: Mock = jest.fn().mockImplementation((draggable: boolean): void => {}) ### setEditable setEditable: Mock = jest.fn().mockImplementation((editable: boolean): void => {}) ### setMap setMap: Mock = jest.fn().mockImplementation((map: google.maps.Map): void => {}) ### setOptions setOptions: Mock = jest.fn().mockImplementation((options: google.maps.PolylineOptions): void => {}) ### setPath setPath: Mock = jest.fn().mockImplementation((path:| google.maps.MVCArray| google.maps.LatLng[]| google.maps.LatLngLiteral[]): void => {}) ### setValues setValues: Mock = jest.fn().mockImplementation((values: any): void => {}) ### setVisible setVisible: Mock = jest.fn().mockImplementation((visible: boolean): void => {}) ### unbind unbind: Mock = jest.fn().mockImplementation((key: string): void => {}) ### unbindAll unbindAll: Mock = jest.fn().mockImplementation(() => {}) ``` -------------------------------- ### Interface: LoaderOptions Source: https://googlemaps.github.io/v3-utility-library/interfaces/_googlemaps_loader.loaderoptions.html Configuration options for initializing the Google Maps JavaScript API loader. ```APIDOC ## Interface LoaderOptions ### Description Defines the configuration properties required to load the Google Maps JavaScript API. ### Properties - **apiKey** (string) - Required - The API key for authentication. - **channel** (string) - Optional - A channel identifier for tracking usage. - **clientId** (string) - Optional - The client ID for premium plan users. - **language** (string) - Optional - The language to use for map elements. - **libraries** (string[]) - Optional - An array of additional libraries to load. - **region** (string) - Optional - The region code for localization. - **version** (string) - Optional - The specific version of the API to load. ``` -------------------------------- ### Cluster Class Documentation Source: https://googlemaps.github.io/v3-utility-library/classes/_google_markerclustererplus.cluster.html Detailed documentation for the Cluster class, including its constructor and methods. ```APIDOC ## Class Cluster ### Hierarchy * Cluster ## Constructors ### constructor * new Cluster(markerClusterer_: MarkerClusterer): Cluster * #### Parameters * ##### markerClusterer_ (MarkerClusterer) - Description: The MarkerClusterer instance. #### Returns Cluster ## Methods ### getCenter * getCenter(): LatLng * #### Returns LatLng The center of the cluster. ### getMarkers * getMarkers(): Marker[] * #### Returns Marker[] The array of markers in the cluster. ### getSize * getSize(): number * #### Returns number The number of markers in the cluster. ### updateIcon * updateIcon(): void * #### Returns void ``` -------------------------------- ### Marker Configuration Methods Source: https://googlemaps.github.io/v3-utility-library/interfaces/_google_markerclustererplus.clusteraugmentedmarker.html A collection of methods to set properties such as draggable state, icon, label, map association, opacity, options, position, shape, title, visibility, and z-index. ```APIDOC ## setDraggable ### Description Sets whether the marker is draggable. ### Parameters - **flag** (boolean | null) - Required - The draggable state. ## setIcon ### Description Sets the icon for the marker. ### Parameters - **icon** (string | ReadonlyIcon | ReadonlySymbol | null) - Required - The icon definition. ## setLabel ### Description Sets the label for the marker. ### Parameters - **label** (string | ReadonlyMarkerLabel | null) - Required - The label text or object. ## setMap ### Description Sets the map or street view panorama on which the marker is displayed. ### Parameters - **map** (Map | StreetViewPanorama | null) - Required - The map or panorama instance. ## setOpacity ### Description Sets the opacity of the marker. ### Parameters - **opacity** (number | null) - Required - The opacity value. ## setOptions ### Description Sets multiple options for the marker at once. ### Parameters - **options** (ReadonlyMarkerOptions) - Required - The marker options object. ## setPosition ### Description Sets the position of the marker. ### Parameters - **latlng** (LatLng | ReadonlyLatLngLiteral | null) - Required - The coordinates. ## setShape ### Description Sets the shape of the marker. ### Parameters - **shape** (MarkerShape | null) - Required - The shape definition. ## setTitle ### Description Sets the title of the marker. ### Parameters - **title** (string | null) - Required - The title string. ## setVisible ### Description Sets the visibility of the marker. ### Parameters - **visible** (boolean) - Required - The visibility state. ## setZIndex ### Description Sets the z-index of the marker. ### Parameters - **zIndex** (number | null) - Required - The z-index value. ``` -------------------------------- ### ClusterIcon Methods Source: https://googlemaps.github.io/v3-utility-library/classes/_google_markerclustererplus.clustericon.html Provides documentation for various methods available on the ClusterIcon class. ```APIDOC ## Methods ### addListener #### Description Adds an event listener to the object. #### Method addListener #### Parameters - **eventName** (string) - The name of the event to listen for. - **handler** (function) - The callback function to execute when the event is fired. - **Rest args** (any[]) - Any arguments passed to the event handler. #### Returns - **MapsEventListener** - An object that can be used to remove the event listener. ### bindTo #### Description Binds a property to another object's property. #### Method bindTo #### Parameters - **key** (string) - The key of the property to bind. - **target** (MVCObject) - The object to bind to. - **targetKey** (string) - Optional. The key of the property on the target object. - **noNotify** (boolean) - Optional. If true, the binding will not trigger a notification. #### Returns - **void** ### changed #### Description Called when a property has changed. #### Method changed #### Parameters - **key** (string) - The key of the changed property. #### Returns - **void** ### draw #### Description Draws the overlay on the map. #### Method draw #### Returns - **void** ### get #### Description Gets the value of a property. #### Method get #### Parameters - **key** (string) - The key of the property to get. #### Returns - **any** - The value of the property. ### getMap #### Description Returns the map that the overlay is currently on. #### Method getMap #### Returns - **Map | StreetViewPanorama** - The map or StreetViewPanorama object. ### getPanes #### Description Returns the map panes that the overlay is currently in. #### Method getPanes #### Returns - **MapPanes** - The map panes. ### getProjection #### Description Returns the map's projection. #### Method getProjection #### Returns - **MapCanvasProjection** - The map's projection. ### hide #### Description Hides the overlay. #### Method hide #### Returns - **void** ### notify #### Description Notifies the object that a property has changed. #### Method notify #### Parameters - **key** (string) - The key of the property that has changed. #### Returns - **void** ### onAdd #### Description Called when the overlay is added to the map. #### Method onAdd #### Returns - **void** ### onRemove #### Description Called when the overlay is removed from the map. #### Method onRemove #### Returns - **void** ### set #### Description Sets the value of a property. #### Method set #### Parameters - **key** (string) - The key of the property to set. - **value** (any) - The value to set. #### Returns - **void** ### setCenter #### Description Sets the center of the overlay. #### Method setCenter #### Parameters - **center** (LatLng) - The new center of the overlay. #### Returns - **void** ### setMap #### Description Sets the map that the overlay is currently on. #### Method setMap #### Parameters - **map** (Map | StreetViewPanorama | null) - The map to set. #### Returns - **void** ### setValues #### Description Sets the values of the overlay's properties. #### Method setValues #### Parameters - **values** (any) - The values to set. #### Returns - **void** ### show #### Description Shows the overlay. #### Method show #### Returns - **void** ### unbind #### Description Unbinds a property from another object's property. #### Method unbind #### Parameters - **key** (string) - The key of the property to unbind. #### Returns - **void** ### unbindAll #### Description Unbinds all properties from the object. #### Method unbindAll #### Returns - **void** ``` -------------------------------- ### ClusterIcon Constructor Source: https://googlemaps.github.io/v3-utility-library/classes/_google_markerclustererplus.clustericon.html Initializes a new instance of the ClusterIcon class. ```APIDOC ## constructor ClusterIcon ### Description Initializes a new instance of the ClusterIcon class. ### Method constructor ### Parameters #### cluster_ - **cluster_** (Cluster) - Description of the cluster parameter. #### styles_ - **styles_** (ClusterIconStyle[]) - Description of the styles parameter. ### Returns - **ClusterIcon** - A new instance of ClusterIcon. ``` -------------------------------- ### Constructor LatLngBounds Source: https://googlemaps.github.io/v3-utility-library/classes/_googlemaps_jest_mocks.latlngbounds.html Creates a new instance of LatLngBounds defined by the southwest and northeast corners. ```APIDOC ## Constructor LatLngBounds ### Description Creates a new LatLngBounds instance representing a rectangular area on the map. ### Parameters #### Path Parameters - **sw** (LatLng | LatLngLiteral) - Optional - The southwest corner of the bounds. - **ne** (LatLng | LatLngLiteral) - Optional - The northeast corner of the bounds. ### Response - **Returns** (LatLngBounds) - A new instance of the LatLngBounds class. ``` -------------------------------- ### LatLngBounds Methods Source: https://googlemaps.github.io/v3-utility-library/classes/_googlemaps_jest_mocks.latlngbounds.html Utility methods for interacting with LatLngBounds objects. ```APIDOC ## LatLngBounds Methods ### contains - **Description**: Returns true if the given LatLng is inside the bounds. - **Parameters**: latLng (LatLng | LatLngLiteral) ### equals - **Description**: Returns true if the bounds are equal to the provided bounds. - **Parameters**: other (LatLngBounds | LatLngBoundsLiteral) ### extend - **Description**: Extends the bounds to contain the given point. - **Parameters**: point (LatLng | LatLngLiteral) ### getCenter - **Description**: Returns the center of the bounds. ### intersects - **Description**: Returns true if the bounds intersect with the provided bounds. - **Parameters**: other (LatLngBounds | LatLngBoundsLiteral) ### toJSON - **Description**: Returns a JSON representation of the bounds. ### toUrlValue - **Description**: Returns a string representation of the bounds for URL usage. - **Parameters**: precision (number) - Optional ``` -------------------------------- ### MarkerManager Module Overview Source: https://googlemaps.github.io/v3-utility-library/modules/_googlemaps_markermanager.html Overview of the MarkerManager class and Options interface provided by the @googlemaps/markermanager module. ```APIDOC ## Module @googlemaps/markermanager ### Description The MarkerManager module provides utilities for managing markers on a Google Map, allowing for efficient handling of marker visibility and grouping. ### Classes - **MarkerManager**: The primary class for managing marker instances on the map. ### Interfaces - **Options**: Configuration options for initializing the MarkerManager. ``` -------------------------------- ### Method: addListener Source: https://googlemaps.github.io/v3-utility-library/interfaces/_google_markerclustererplus.clusteraugmentedmarker.html Attaches an event listener to the marker for specific event types. ```APIDOC ## Method addListener ### Description Adds an event listener to the marker. ### Parameters - **eventName** (string) - Required - The name of the event to listen for. - **handler** (function) - Required - The callback function to execute when the event triggers. ### Response - **Returns** (MapsEventListener) - An object representing the event listener. ``` -------------------------------- ### Initialize LatLng Constructor Source: https://googlemaps.github.io/v3-utility-library/classes/_googlemaps_jest_mocks.latlng.html Defines the constructor signature for the LatLng mock class. ```typescript new LatLng(literal: LatLngLiteral, noWrap: boolean): LatLng ``` -------------------------------- ### Binding Management Methods Source: https://googlemaps.github.io/v3-utility-library/interfaces/_google_markerclustererplus.clusteraugmentedmarker.html Methods for managing property bindings on the marker object. ```APIDOC ## unbind ### Description Removes a binding for a specific key. ### Parameters - **key** (string) - Required - The property key to unbind. ## unbindAll ### Description Removes all bindings from the object. ``` -------------------------------- ### Point Constructor Source: https://googlemaps.github.io/v3-utility-library/classes/_googlemaps_jest_mocks.point.html Initializes a new Point object with x and y coordinates. Use when creating a new point. ```typescript new Point(x: number, y: number): Point ``` -------------------------------- ### Constructor: ClusterAugmentedMarker Source: https://googlemaps.github.io/v3-utility-library/interfaces/_google_markerclustererplus.clusteraugmentedmarker.html Initializes a new instance of the ClusterAugmentedMarker. ```APIDOC ## Constructor ClusterAugmentedMarker ### Description Creates a new ClusterAugmentedMarker instance. ### Parameters #### Request Body - **opts** (ReadonlyMarkerOptions) - Optional - Configuration options for the marker. ### Response - **Returns** (ClusterAugmentedMarker) - The newly created marker instance. ``` -------------------------------- ### Marker Constructor Source: https://googlemaps.github.io/v3-utility-library/classes/_googlemaps_jest_mocks.marker.html Initializes a new instance of the Marker class. ```typescript new Marker(opts: ReadonlyMarkerOptions): Marker ``` -------------------------------- ### MVCObject Methods Source: https://googlemaps.github.io/v3-utility-library/classes/_googlemaps_jest_mocks.mvcobject.html A collection of methods for managing properties and event listeners on MVCObject instances. ```APIDOC ## MVCObject Methods ### Description Methods for binding properties, managing event listeners, and notifying changes on MVCObject instances. ### Methods - **addListener(eventName, handler)**: Adds an event listener. - **bindTo(key, target, targetKey, noNotify)**: Binds a property to a target object. - **changed(key)**: Triggered when a property changes. - **get(key)**: Returns the value of a property. - **notify(key)**: Notifies observers of a property change. - **set(key, value)**: Sets the value of a property. - **setValues(values)**: Sets multiple property values. - **unbind(key)**: Removes a property binding. - **unbindAll()**: Removes all property bindings. ``` -------------------------------- ### Options Interface Properties Source: https://googlemaps.github.io/v3-utility-library/interfaces/_googlemaps_markermanager.options.html Defines the configuration properties for the Options interface used in the utility library. ```APIDOC ## Interface Options ### Description The Options interface provides configuration settings for utility components, allowing control over map markers and zoom behavior. ### Properties - **borderPadding** (number) - Optional - Padding applied to the border. - **maxZoom** (number) - Optional - The maximum zoom level allowed. - **shown** (boolean) - Optional - Indicates whether the element is currently shown. - **trackMarkers** (boolean) - Optional - Whether to track markers automatically. ``` -------------------------------- ### Loader Methods Source: https://googlemaps.github.io/v3-utility-library/classes/_googlemaps_loader.loader.html Methods available on the Loader class to generate URLs and handle the loading process. ```APIDOC ## Methods ### createUrl - **Description**: Generates the URL for the Google Maps API script. - **Returns**: (string) The generated script URL. ### load - **Description**: Loads the Google Maps API. - **Returns**: (Promise) ### loadCallback - **Description**: Loads the API and executes a callback function. - **Parameters**: - **fn** (function) - The callback function to execute. ### loadPromise - **Description**: Loads the API and returns a promise. - **Returns**: (Promise) ``` -------------------------------- ### Static CALCULATOR Source: https://googlemaps.github.io/v3-utility-library/classes/_google_markerclustererplus.markerclusterer.html A static utility function for calculating cluster information. ```APIDOC ## CALCULATOR ### Description Calculates cluster information based on markers and the number of styles. ### Method POST ### Endpoint /CALCULATOR ### Parameters #### Path Parameters - **markers** (Marker[]) - Required - An array of markers. - **numStyles** (number) - Required - The number of available icon styles. ### Returns - ClusterIconInfo: An object containing cluster information. ``` -------------------------------- ### Point Class Documentation Source: https://googlemaps.github.io/v3-utility-library/classes/_googlemaps_jest_mocks.point.html Detailed documentation for the Point class. ```APIDOC ## Class Point ### Hierarchy * Point ### Implements * Point ## Index ### Constructors * constructor ### Properties * toString * x * y ### Methods * equals ## Constructors ### constructor * new Point(x: number, y: number): Point * #### Parameters * ##### x: number * ##### y: number #### Returns Point ## Properties ### toString tostring: Mock = jest.fn().mockImplementation((): string => { return ""; }) ### x x: number ### y y: number ## Methods ### equals * equals(other: Point): boolean * #### Parameters * ##### other: Point #### Returns boolean ``` -------------------------------- ### setTitle Method Source: https://googlemaps.github.io/v3-utility-library/classes/_googlemaps_jest_mocks.marker.html Sets the title for an object. Accepts a string or null. ```APIDOC ## setTitle Method ### Description Sets the title for an object. Accepts a string or null. ### Method (Not specified, likely part of a class) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **title** (string | null) - Required - The title to set. ### Request Example ```json { "title": "New Title" } ``` ### Response #### Success Response (200) (No specific response details provided, likely void) #### Response Example (No example provided) ``` -------------------------------- ### MarkerClusterer Constructor Source: https://googlemaps.github.io/v3-utility-library/classes/_google_markerclustererplus.markerclusterer.html Initializes a new MarkerClusterer instance. It takes a Google Map object, an optional array of markers, and optional configuration options. ```APIDOC ## Constructor MarkerClusterer ### Description Initializes a new MarkerClusterer instance. ### Parameters - **map** (Map) - The Google Map object to attach the clusterer to. - **markers** (Marker[]) - Optional. An array of Marker objects to be clustered. Defaults to an empty array. - **options** (MarkerClustererOptions) - Optional. Configuration options for the clusterer. Defaults to an empty object. ### Returns MarkerClusterer - The newly created MarkerClusterer instance. ``` -------------------------------- ### Map_ Class Constructor Source: https://googlemaps.github.io/v3-utility-library/classes/_googlemaps_jest_mocks.map_.html Initializes a new instance of the Map_ class. This constructor is used to create a map object associated with a specific HTML element. ```APIDOC ## constructor Map_() ### Description Initializes a new instance of the Map_ class. ### Method constructor ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) N/A #### Response Example N/A ### Details `new Map_(mapDiv: Element | null, opts: MapOptions): Map_` #### Parameters - **mapDiv** (Element | null) - The HTML element to which the map will be attached. - **opts** (MapOptions) - Optional. Configuration options for the map. #### Returns - **Map_** - An instance of the Map_ class. ``` -------------------------------- ### MarkerClusterer Methods Source: https://googlemaps.github.io/v3-utility-library/classes/_google_markerclustererplus.markerclusterer.html Documentation for the various methods available on the MarkerClusterer class, including adding/removing markers, map interaction, and configuration. ```APIDOC ## Methods ### addListener - **Description**: Adds an event listener to the MarkerClusterer. - **Parameters**: - **eventName** (string) - The name of the event to listen for. - **handler** (function) - The callback function to execute when the event is triggered. - **Parameters**: - **Rest args** (any[]) - Arguments passed to the event handler. - **Returns**: `MapsEventListener` - An object representing the event listener that can be used to remove it. ### addMarker - **Description**: Adds a single marker to the clusterer. - **Parameters**: - **marker** (Marker) - The Marker object to add. - **nodraw** (boolean) - Optional. If true, the map will not be redrawn immediately. - **Returns**: `void` ### addMarkers - **Description**: Adds an array of markers to the clusterer. - **Parameters**: - **markers** (Marker[]) - An array of Marker objects to add. - **nodraw** (boolean) - Optional. If true, the map will not be redrawn immediately. - **Returns**: `void` ### bindTo - **Description**: Binds a property of this object to another object's property. - **Parameters**: - **key** (string) - The name of the property to bind. - **target** (MVCObject) - The object to bind to. - **targetKey** (string) - Optional. The name of the property on the target object to bind to. Defaults to the same key. - **noNotify** (boolean) - Optional. If true, the binding will not notify the target object immediately. - **Returns**: `void` ### changed - **Description**: Called when a property has changed. - **Parameters**: - **key** (string) - The name of the property that has changed. - **Returns**: `void` ### clearMarkers - **Description**: Removes all markers from the clusterer and redraws the map. - **Returns**: `void` ### fitMapToMarkers - **Description**: Adjusts the map's viewport to fit all the markers. - **Parameters**: - **padding** (number | Padding) - Optional. Padding around the markers. - **Returns**: `void` ### get - **Description**: Gets the value of a property. - **Parameters**: - **key** (string) - The name of the property to get. - **Returns**: `any` - The value of the property. ### getAverageCenter - **Description**: Gets whether the average center is used for clustering. - **Returns**: `boolean` - True if the average center property is set. ### getBatchSizeIE - **Description**: Gets the batch size for processing markers in Internet Explorer. - **Returns**: `number` - The value of the batchSizeIE property. ### getCalculator - **Description**: Gets the calculator function used for determining cluster properties. - **Returns**: `Calculator` - The value of the calculator property. ### getClusterClass - **Description**: Gets the CSS class name for clusters. - **Returns**: `string` - The value of the clusterClass property. ### getClusters - **Description**: Gets the array of current clusters. - **Returns**: `Cluster[]` - The array of clusters formed by the clusterer. ### getEnableRetinaIcons - **Description**: Gets whether retina icons are enabled. - **Returns**: `boolean` - True if enableRetinaIcons property is set. ### getGridSize - **Description**: Gets the grid size for clustering. - **Returns**: `number` - The grid size. ### getIgnoreHidden - **Description**: Gets whether hidden markers are ignored during clustering. - **Returns**: `boolean` - True if ignoreHidden property is set. ### getImageExtension - **Description**: Gets the file extension for cluster images. - **Returns**: `string` - The value of the imageExtension property. ### getImagePath - **Description**: Gets the base path for cluster images. - **Returns**: `string` - The value of the imagePath property. ### getImageSizes - **Description**: Gets the array of image sizes for clusters. - **Returns**: `number[]` - The value of the imageSizes property. ### getMap - **Description**: Gets the Google Map object associated with the clusterer. - **Returns**: `Map` - The map object. ### getMarkers - **Description**: Gets the array of markers managed by the clusterer. - **Returns**: `Marker[]` - The array of markers. ### getMaxZoom - **Description**: Gets the maximum zoom level at which clusters are displayed. - **Returns**: `number` - The maximum zoom level. ### getMinimumClusterSize - **Description**: Gets the minimum number of markers required to form a cluster. - **Returns**: `number` - The minimum cluster size. ### getPanes - **Description**: Gets the map panes object. - **Returns**: `MapPanes` - The map panes. ### getProjection - **Description**: Gets the map projection object. - **Returns**: `MapProjection` - The map projection. ### getStyles - **Description**: Gets the custom styles for the clusters. - **Returns**: `ClusterStyle[]` - The array of cluster styles. ### getTitle - **Description**: Gets the title attribute for the cluster elements. - **Returns**: `string` - The value of the title property. ### getTotalClusters - **Description**: Gets the total number of clusters currently displayed. - **Returns**: `number` - The total number of clusters. ### getTotalMarkers - **Description**: Gets the total number of markers managed by the clusterer. - **Returns**: `number` - The total number of markers. ### getZIndex - **Description**: Gets the z-index of the cluster elements. - **Returns**: `number` - The z-index value. ### getZoomOnClick - **Description**: Gets whether zooming in on a cluster zooms to the appropriate level. - **Returns**: `boolean` - True if zoomOnClick property is set. ### notify - **Description**: Notifies a property that has changed. - **Parameters**: - **key** (string) - The name of the property that has changed. - **Returns**: `void` ### removeMarker - **Description**: Removes a single marker from the clusterer. - **Parameters**: - **marker** (Marker) - The Marker object to remove. - **Returns**: `void` ### removeMarkers - **Description**: Removes an array of markers from the clusterer. - **Parameters**: - **markers** (Marker[]) - An array of Marker objects to remove. - **Returns**: `void` ### repaint - **Description**: Forces the clusterer to redraw the clusters. - **Returns**: `void` ### set - **Description**: Sets the value of a property. - **Parameters**: - **key** (string) - The name of the property to set. - **value** (any) - The value to set the property to. - **Returns**: `void` ### setAverageCenter - **Description**: Sets whether the average center is used for clustering. - **Parameters**: - **averageCenter** (boolean) - True to use the average center. - **Returns**: `void` ### setBatchSizeIE - **Description**: Sets the batch size for processing markers in Internet Explorer. - **Parameters**: - **batchSizeIE** (number) - The batch size value. - **Returns**: `void` ### setCalculator - **Description**: Sets the calculator function used for determining cluster properties. - **Parameters**: - **calculator** (Calculator) - The calculator function. - **Returns**: `void` ### setClusterClass - **Description**: Sets the CSS class name for clusters. - **Parameters**: - **clusterClass** (string) - The CSS class name. - **Returns**: `void` ### setEnableRetinaIcons - **Description**: Sets whether retina icons are enabled. - **Parameters**: - **enableRetinaIcons** (boolean) - True to enable retina icons. - **Returns**: `void` ### setGridSize - **Description**: Sets the grid size for clustering. - **Parameters**: - **gridSize** (number) - The grid size value. - **Returns**: `void` ### setIgnoreHidden - **Description**: Sets whether hidden markers are ignored during clustering. - **Parameters**: - **ignoreHidden** (boolean) - True to ignore hidden markers. - **Returns**: `void` ### setImageExtension - **Description**: Sets the file extension for cluster images. - **Parameters**: - **imageExtension** (string) - The image extension. - **Returns**: `void` ### setImagePath - **Description**: Sets the base path for cluster images. - **Parameters**: - **imagePath** (string) - The image path. - **Returns**: `void` ### setImageSizes - **Description**: Sets the array of image sizes for clusters. - **Parameters**: - **imageSizes** (number[]) - An array of image sizes. - **Returns**: `void` ### setMap - **Description**: Sets the Google Map object for the clusterer. - **Parameters**: - **map** (Map) - The map object. - **Returns**: `void` ### setMaxZoom - **Description**: Sets the maximum zoom level at which clusters are displayed. - **Parameters**: - **maxZoom** (number) - The maximum zoom level. - **Returns**: `void` ### setMinimumClusterSize - **Description**: Sets the minimum number of markers required to form a cluster. - **Parameters**: - **minimumClusterSize** (number) - The minimum cluster size. - **Returns**: `void` ### setStyles - **Description**: Sets the custom styles for the clusters. - **Parameters**: - **styles** (ClusterStyle[]) - An array of cluster styles. - **Returns**: `void` ### setTitle - **Description**: Sets the title attribute for the cluster elements. - **Parameters**: - **title** (string) - The title value. - **Returns**: `void` ### setValues - **Description**: Sets the values for the clusterer. - **Parameters**: - **values** (any) - The values to set. - **Returns**: `void` ### setZIndex - **Description**: Sets the z-index of the cluster elements. - **Parameters**: - **zIndex** (number) - The z-index value. - **Returns**: `void` ### setZoomOnClick - **Description**: Sets whether zooming in on a cluster zooms to the appropriate level. - **Parameters**: - **zoomOnClick** (boolean) - True to enable zooming on click. - **Returns**: `void` ### unbind - **Description**: Unbinds a property from this object. - **Parameters**: - **key** (string) - The name of the property to unbind. - **Returns**: `void` ### unbindAll - **Description**: Unbinds all properties from this object. - **Returns**: `void` ### CALCULATOR - **Type**: `function` - **Description**: A static property representing the default calculator function. ### withDefaultStyle - **Description**: A static method that returns the default cluster style configuration. ``` -------------------------------- ### Point toString Method Source: https://googlemaps.github.io/v3-utility-library/classes/_googlemaps_jest_mocks.point.html Returns a string representation of the Point. Mocked using jest.fn(). ```typescript toString: Mock = jest.fn().mockImplementation((): string => { return ""; }) ``` -------------------------------- ### LatLngBounds Constructor Source: https://googlemaps.github.io/v3-utility-library/classes/_googlemaps_jest_mocks.latlngbounds.html Initializes a new LatLngBounds object. Accepts two LatLng or LatLngLiteral objects representing the southwest and northeast corners. ```typescript new LatLngBounds(sw: LatLng | LatLngLiteral, ne: LatLng | LatLngLiteral): LatLngBounds ``` -------------------------------- ### LatLngBounds toString Method Source: https://googlemaps.github.io/v3-utility-library/classes/_googlemaps_jest_mocks.latlngbounds.html Mock implementation of the toString method. Returns an empty string. ```typescript toString: Mock = jest.fn().mockImplementation((): string => "") ``` -------------------------------- ### MVCArray Methods Source: https://googlemaps.github.io/v3-utility-library/classes/_googlemaps_jest_mocks.mvcarray.html Methods for manipulating and retrieving data from the MVCArray instance. ```APIDOC ## MVCArray Methods ### Description Standard methods for array manipulation including insertion, removal, and retrieval of elements. ### Methods - **push(elem: T)**: Adds an element to the end of the array. - **pop()**: Removes the last element from the array. - **getAt(i: number)**: Retrieves the element at the specified index. - **insertAt(i: number, elem: T)**: Inserts an element at the specified index. - **removeAt(i: number)**: Removes the element at the specified index. - **getLength()**: Returns the number of elements in the array. - **getArray()**: Returns the underlying array. ``` -------------------------------- ### setValues Method Source: https://googlemaps.github.io/v3-utility-library/classes/_googlemaps_jest_mocks.marker.html Sets the values for an object. Accepts any type of value. ```APIDOC ## setValues Method ### Description Sets the values for an object. Accepts any type of value. ### Method (Not specified, likely part of a class) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **values** (any) - Required - The values to set. ### Request Example ```json { "values": [ 1, 2, 3 ] } ``` ### Response #### Success Response (200) (No specific response details provided, likely void) #### Response Example (No example provided) ``` -------------------------------- ### MVCArray Constructor Source: https://googlemaps.github.io/v3-utility-library/classes/_googlemaps_jest_mocks.mvcarray.html Initializes a new instance of the MVCArray class with an optional array of elements. ```typescript new MVCArray(array: T[]): MVCArray ``` -------------------------------- ### LatLngBounds toSpan Method Source: https://googlemaps.github.io/v3-utility-library/classes/_googlemaps_jest_mocks.latlngbounds.html Mock implementation of the toSpan method. Returns a new google.maps.LatLng object representing the span (width and height) of the bounds, defaulting to {lat: 0, lng: 0}. ```typescript toSpan: Mock = jest.fn().mockImplementation((): google.maps.LatLng => new google.maps.LatLng({ lat: 0, lng: 0 })) ``` -------------------------------- ### LatLngBounds toUrlValue Method Source: https://googlemaps.github.io/v3-utility-library/classes/_googlemaps_jest_mocks.latlngbounds.html Mock implementation of the toUrlValue method. Returns an empty string, optionally accepting a precision argument. ```typescript toUrlValue: Mock = jest.fn().mockImplementation((precision?: number): string => "") ``` -------------------------------- ### Function: xyzToBounds Source: https://googlemaps.github.io/v3-utility-library/modules/_googlemaps_ogc.html Converts XYZ tile coordinates to geographic bounds. ```APIDOC ## Function xyzToBounds ### Description Calculates the geographic bounds for a given XYZ tile coordinate. ### Parameters - **x** (number) - Required - The x coordinate. - **y** (number) - Required - The y coordinate. - **zoom** (number) - Required - The zoom level. ### Returns - **number[]** - An array containing [minx, miny, maxx, maxy]. ``` -------------------------------- ### Class Size Source: https://googlemaps.github.io/v3-utility-library/classes/_googlemaps_jest_mocks.size.html Represents a size with width and height, and their respective units. ```APIDOC ## Class Size ### Hierarchy * Size ### Implements * Size ## Index ### Constructors * constructor ### Properties * height * toString * width ### Methods * equals ## Constructors ### constructor * new Size(width: number, height: number, widthUnit: string, heightUnit: string): Size * #### Parameters * ##### width: number * ##### height: number * ##### Optional widthUnit: string * ##### Optional heightUnit: string #### Returns Size ## Properties ### height height: number ### toString tostring: Mock = jest.fn().mockImplementation((): string => { return ""; }) ### width width: number ## Methods ### equals * equals(other: Size): boolean * #### Parameters * ##### other: Size #### Returns boolean ``` -------------------------------- ### Polyline Method Mock Implementations Source: https://googlemaps.github.io/v3-utility-library/classes/_googlemaps_jest_mocks.polyline.html Mock implementations for Polyline class methods using Jest. These are intended for unit testing components that interact with the Google Maps Polyline API. ```typescript addListener: Mock = jest.fn().mockImplementation((eventName: string, handler: (...args: any[]) => void): void => {}) ``` ```typescript bindTo: Mock = jest.fn().mockImplementation((key: string,target: MVCObject,targetKey?: string,noNotify?: boolean): void => {}) ``` ```typescript changed: Mock = jest.fn().mockImplementation((key: string): void => {}) ``` ```typescript get: Mock = jest.fn().mockImplementation((key: string): any => {}) ``` ```typescript getDraggable: Mock = jest.fn().mockImplementation((): boolean => false) ``` ```typescript getEditable: Mock = jest.fn().mockImplementation((): boolean => false) ``` ```typescript getMap: Mock = jest.fn().mockImplementation((): google.maps.Map => ({} as google.maps.Map)) ``` ```typescript getPath: Mock = jest.fn().mockImplementation((): google.maps.MVCArray =>({} as google.maps.MVCArray)) ``` ```typescript getVisible: Mock = jest.fn().mockImplementation((): boolean => false) ``` ```typescript notify: Mock = jest.fn().mockImplementation((key: string): void => {}) ``` ```typescript set: Mock = jest.fn().mockImplementation((key: string, value: any): void => {}) ``` ```typescript setDraggable: Mock = jest.fn().mockImplementation((draggable: boolean): void => {}) ``` ```typescript setEditable: Mock = jest.fn().mockImplementation((editable: boolean): void => {}) ``` ```typescript setMap: Mock = jest.fn().mockImplementation((map: google.maps.Map): void => {}) ``` ```typescript setOptions: Mock = jest.fn().mockImplementation((options: google.maps.PolylineOptions): void => {}) ``` ```typescript setPath: Mock = jest.fn().mockImplementation((path:| google.maps.MVCArray| google.maps.LatLng[]| google.maps.LatLngLiteral[]): void => {}) ``` ```typescript setValues: Mock = jest.fn().mockImplementation((values: any): void => {}) ``` ```typescript setVisible: Mock = jest.fn().mockImplementation((visible: boolean): void => {}) ``` ```typescript unbind: Mock = jest.fn().mockImplementation((key: string): void => {}) ``` ```typescript unbindAll: Mock = jest.fn().mockImplementation(() => {}) ```