1616
1717import { StreetViewPanorama } from "../../street-view/rendering/panorama" ;
1818import { LatLng , LatLngBounds } from "../coordinates/latlng" ;
19+ import { MapsEventListener } from "../event/event" ;
1920import { MVCObject } from "../event/mvcobject" ;
2021import { FeatureLayer } from "./featurelayer" ;
2122
@@ -25,26 +26,17 @@ export class Map_ extends MVCObject implements google.maps.Map {
2526 public mapTypes : google . maps . MapTypeRegistry ;
2627 public overlayMapTypes : google . maps . MVCArray < google . maps . MapType > ;
2728
28- constructor ( mapDiv : Element | null , opts ?: google . maps . MapOptions ) {
29- super ( ) ;
30- this . data = new google . maps . Data ( ) ;
31- this . controls = [
32- new google . maps . MVCArray < HTMLElement > ( ) , // BOTTOM_CENTER
33- new google . maps . MVCArray < HTMLElement > ( ) , // BOTTOM_LEFT
34- new google . maps . MVCArray < HTMLElement > ( ) , // BOTTOM_RIGHT
35- new google . maps . MVCArray < HTMLElement > ( ) , // LEFT_BOTTOM
36- new google . maps . MVCArray < HTMLElement > ( ) , // LEFT_CENTER
37- new google . maps . MVCArray < HTMLElement > ( ) , // LEFT_TOP
38- new google . maps . MVCArray < HTMLElement > ( ) , // RIGHT_BOTTOM
39- new google . maps . MVCArray < HTMLElement > ( ) , // RIGHT_CENTER
40- new google . maps . MVCArray < HTMLElement > ( ) , // RIGHT_TOP
41- new google . maps . MVCArray < HTMLElement > ( ) , // TOP_CENTER
42- new google . maps . MVCArray < HTMLElement > ( ) , // TOP_LEFT
43- new google . maps . MVCArray < HTMLElement > ( ) , // TOP_RIGHT
44- ] ;
45- this . mapTypes = new google . maps . MVCObject ( ) ;
46- this . overlayMapTypes = new google . maps . MVCArray ( ) ;
47- }
29+ public getFeatureLayer = jest . fn (
30+ ( featureType : google . maps . FeatureType ) => new FeatureLayer ( )
31+ ) ;
32+
33+ public getMapCapabilities = jest . fn ( ( ) => {
34+ return {
35+ isAdvancedMarkersAvailable : false ,
36+ isDataDrivenStylingAvailable : false ,
37+ } ;
38+ } ) ;
39+
4840 public fitBounds = jest
4941 . fn ( )
5042 . mockImplementation (
@@ -147,13 +139,25 @@ export class Map_ extends MVCObject implements google.maps.Map {
147139 . mockImplementation ( ( clickable : boolean ) : void => {
148140 return null ;
149141 } ) ;
150- public getFeatureLayer = jest . fn (
151- ( featureType : google . maps . FeatureType ) => new FeatureLayer ( )
152- ) ;
153- public getMapCapabilities = jest . fn ( ( ) => {
154- return {
155- isAdvancedMarkersAvailable : false ,
156- isDataDrivenStylingAvailable : false ,
157- } ;
158- } ) ;
142+
143+ constructor ( mapDiv : Element | null , opts ?: google . maps . MapOptions ) {
144+ super ( ) ;
145+ this . data = new google . maps . Data ( ) ;
146+ this . controls = [
147+ new google . maps . MVCArray < HTMLElement > ( ) , // BOTTOM_CENTER
148+ new google . maps . MVCArray < HTMLElement > ( ) , // BOTTOM_LEFT
149+ new google . maps . MVCArray < HTMLElement > ( ) , // BOTTOM_RIGHT
150+ new google . maps . MVCArray < HTMLElement > ( ) , // LEFT_BOTTOM
151+ new google . maps . MVCArray < HTMLElement > ( ) , // LEFT_CENTER
152+ new google . maps . MVCArray < HTMLElement > ( ) , // LEFT_TOP
153+ new google . maps . MVCArray < HTMLElement > ( ) , // RIGHT_BOTTOM
154+ new google . maps . MVCArray < HTMLElement > ( ) , // RIGHT_CENTER
155+ new google . maps . MVCArray < HTMLElement > ( ) , // RIGHT_TOP
156+ new google . maps . MVCArray < HTMLElement > ( ) , // TOP_CENTER
157+ new google . maps . MVCArray < HTMLElement > ( ) , // TOP_LEFT
158+ new google . maps . MVCArray < HTMLElement > ( ) , // TOP_RIGHT
159+ ] ;
160+ this . mapTypes = new google . maps . MVCObject ( ) ;
161+ this . overlayMapTypes = new google . maps . MVCArray ( ) ;
162+ }
159163}
0 commit comments