123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448
  1. import { IonicNativePlugin } from '@ionic-native/core';
  2. import { Observable } from 'rxjs/Observable';
  3. import 'rxjs/add/observable/fromEvent';
  4. export declare type MapType = 'MAP_TYPE_NORMAL' | 'MAP_TYPE_ROADMAP' | 'MAP_TYPE_SATELLITE' | 'MAP_TYPE_HYBRID' | 'MAP_TYPE_TERRAIN' | 'MAP_TYPE_NONE';
  5. /**
  6. * @hidden
  7. */
  8. export declare class LatLng implements ILatLng {
  9. lat: number;
  10. lng: number;
  11. constructor(lat: number, lng: number);
  12. equals(other: ILatLng): boolean;
  13. toString(): string;
  14. toUrlValue(precision?: number): string;
  15. }
  16. export interface ILatLngBounds {
  17. northeast: ILatLng;
  18. southwest: ILatLng;
  19. }
  20. /**
  21. * @hidden
  22. */
  23. export declare class LatLngBounds implements ILatLngBounds {
  24. private _objectInstance;
  25. northeast: ILatLng;
  26. southwest: ILatLng;
  27. type: string;
  28. constructor(points?: ILatLng[]);
  29. /**
  30. * Converts to string
  31. * @return {string}
  32. */
  33. toString(): string;
  34. /**
  35. * Returns a string of the form "lat_sw,lng_sw,lat_ne,lng_ne" for this bounds, where "sw" corresponds to the southwest corner of the bounding box, while "ne" corresponds to the northeast corner of that box.
  36. * @param precision {number}
  37. * @return {string}
  38. */
  39. toUrlValue(precision?: number): string;
  40. /**
  41. * Extends this bounds to contain the given point.
  42. * @param LatLng {ILatLng}
  43. */
  44. extend(latLng: ILatLng): void;
  45. /**
  46. * Returns true if the given lat/lng is in this bounds.
  47. * @param LatLng {ILatLng}
  48. */
  49. contains(LatLng: ILatLng): boolean;
  50. /**
  51. * Computes the center of this LatLngBounds
  52. * @return {LatLng}
  53. */
  54. getCenter(): LatLng;
  55. }
  56. export interface GoogleMapControlOptions {
  57. /**
  58. * Turns the compass on or off.
  59. */
  60. compass?: boolean;
  61. /**
  62. * Turns the myLocation button on or off. If turns on this button, the application displays a permission dialog to obtain the geolocation data.
  63. */
  64. myLocationButton?: boolean;
  65. /**
  66. * Turns the myLocation control(blue dot) on or off. If turns on this control, the application displays a permission dialog to obtain the geolocation data.
  67. */
  68. myLocation?: boolean;
  69. /**
  70. * Turns the indoor picker on or off.
  71. */
  72. indoorPicker?: boolean;
  73. /**
  74. * **Android**
  75. * Turns the map toolbar on or off.
  76. */
  77. mapToolbar?: boolean;
  78. /**
  79. * **Android**
  80. * Turns the zoom controller on or off.
  81. */
  82. zoom?: boolean;
  83. /**
  84. * Accept extra properties for future updates
  85. */
  86. [key: string]: any;
  87. }
  88. export interface GoogleMapGestureOptions {
  89. /**
  90. * Set false to disable the scroll gesture (default: true)
  91. */
  92. scroll?: boolean;
  93. /**
  94. * Set false to disable the tilt gesture (default: true)
  95. */
  96. tilt?: boolean;
  97. /**
  98. * Set false to disable the zoom gesture (default: true)
  99. */
  100. zoom?: boolean;
  101. /**
  102. * Set false to disable the rotate gesture (default: true)
  103. */
  104. rotate?: boolean;
  105. /**
  106. * Accept extra properties for future updates
  107. */
  108. [key: string]: any;
  109. }
  110. export interface GoogleMapZoomOptions {
  111. minZoom?: number;
  112. maxZoom?: number;
  113. }
  114. export interface GoogleMapPaddingOptions {
  115. left?: number;
  116. top?: number;
  117. bottom?: number;
  118. right?: number;
  119. }
  120. export interface GoogleMapPreferenceOptions {
  121. /**
  122. * Minimum and maximum zoom levels for zooming gestures.
  123. */
  124. zoom?: GoogleMapZoomOptions;
  125. /**
  126. * Paddings of controls.
  127. */
  128. padding?: GoogleMapPaddingOptions;
  129. /**
  130. * Turns the 3D buildings layer on or off.
  131. */
  132. building?: boolean;
  133. /**
  134. * Accept extra properties for future updates
  135. */
  136. [key: string]: any;
  137. }
  138. export interface GoogleMapOptions {
  139. /**
  140. * mapType [options]
  141. */
  142. mapType?: MapType | string;
  143. /**
  144. * controls [options]
  145. */
  146. controls?: GoogleMapControlOptions;
  147. /**
  148. * gestures [options]
  149. */
  150. gestures?: GoogleMapGestureOptions;
  151. /**
  152. * Map styles [options]
  153. * @ref https://developers.google.com/maps/documentation/javascript/style-reference
  154. */
  155. styles?: any[];
  156. /**
  157. * Initial camera position [options]
  158. */
  159. camera?: CameraPosition<any>;
  160. /**
  161. * preferences [options]
  162. */
  163. preferences?: GoogleMapPreferenceOptions;
  164. /**
  165. * Accept extra properties for future updates
  166. */
  167. [key: string]: any;
  168. }
  169. export interface CameraPosition<T> {
  170. /**
  171. * The center location of the camera view.
  172. *
  173. * [usage 1]
  174. *
  175. * let cameraPos: CameraPosition<ILatLng> = {
  176. * target: {lat: ..., lng: ...},
  177. * zoom: 10
  178. * }
  179. *
  180. * [usage 2] The zoom property is ignored when you specify multiple position
  181. *
  182. * let cameraPos: CameraPosition<ILatLng[]> = {
  183. * target: [
  184. * {lat: ..., lng: ...},
  185. * {lat: ..., lng: ...},
  186. * {lat: ..., lng: ...}
  187. * ]
  188. * }
  189. */
  190. target?: T;
  191. /**
  192. * View angle
  193. */
  194. tilt?: number;
  195. /**
  196. * Zoom level
  197. */
  198. zoom?: number;
  199. /**
  200. * Map orientation
  201. */
  202. bearing?: number;
  203. /**
  204. * The duration of animation in milliseconds
  205. */
  206. duration?: number;
  207. /**
  208. * Camera padding in pixel
  209. */
  210. padding?: number;
  211. }
  212. export interface CircleOptions {
  213. /**
  214. * Center position of circle
  215. */
  216. center: ILatLng;
  217. /**
  218. * Radius of circle in meter
  219. */
  220. radius: number;
  221. /**
  222. * Set the stroke color
  223. * (rgb, rgba, #RRGGBB, "colorname", ...etc)
  224. */
  225. strokeColor?: string;
  226. /**
  227. * Set the stroke width in pixel
  228. */
  229. strokeWidth?: number;
  230. /**
  231. * Set the inside color of circle
  232. * (rgb, rgba, #RRGGBB, "colorname", ...etc)
  233. */
  234. fillColor?: string;
  235. /**
  236. * Set to true to receive the CIRCLE_CLICK event
  237. * (default: false)
  238. */
  239. clickable?: boolean;
  240. /**
  241. * Set to false to hide
  242. */
  243. visible?: boolean;
  244. /**
  245. * Z-index
  246. */
  247. zIndex?: number;
  248. /**
  249. * Accept own properties
  250. * You can get the property later using `get()` method.
  251. */
  252. [key: string]: any;
  253. }
  254. export interface GeocoderRequest {
  255. /**
  256. * The address property or position property is required.
  257. * You can not specify both property at the same time.
  258. *
  259. * [geocoding usage1]
  260. * let request: GeocoderRequest = {
  261. * address: "Los Angeles, California, USA"
  262. * };
  263. *
  264. * [geocoding usage2]
  265. * let request: GeocoderRequest = {
  266. * address: [
  267. * "Los Angeles, California, USA",
  268. * "San Francisco, California, USA",
  269. * ]
  270. * };
  271. */
  272. address?: string | string[];
  273. /**
  274. *
  275. * [reverse-geocoding usage1]
  276. * let request: GeocoderRequest = {
  277. * position: {"lat": 37.421655, "lng": -122.085637}
  278. * };
  279. *
  280. * [reverse-geocoding usage2]
  281. * let request: GeocoderRequest = {
  282. * position: [
  283. * {"lat": 37.421655, "lng": -122.085637},
  284. * {"lat": 37.332, "lng": -122.030781}
  285. * ]
  286. * };
  287. */
  288. position?: ILatLng | ILatLng[];
  289. }
  290. export interface GeocoderResult {
  291. adminArea?: string;
  292. country?: string;
  293. countryCode?: string;
  294. extra?: {
  295. featureName?: string;
  296. lines?: Array<string>;
  297. permises?: string;
  298. phone?: string;
  299. url?: string;
  300. };
  301. locale?: string;
  302. locality?: string;
  303. position?: ILatLng;
  304. postalCode?: string;
  305. subAdminArea?: string;
  306. subLocality?: string;
  307. subThoroughfare?: string;
  308. thoroughfare?: string;
  309. }
  310. export interface GroundOverlayOptions {
  311. /**
  312. * URL of overlay
  313. */
  314. url: string;
  315. /**
  316. * Bounds, array of ILatLng
  317. */
  318. bounds: Array<ILatLng>;
  319. /**
  320. * Set to true to receive the GROUND_OVERLAY_CLICK event
  321. * (default: false)
  322. */
  323. clickable?: boolean;
  324. /**
  325. * Set to false to hide
  326. */
  327. visible?: boolean;
  328. /**
  329. * Opacity. From 0.0 to 1.0 .
  330. */
  331. opacity?: number;
  332. /**
  333. * Bearing
  334. */
  335. bearing?: number;
  336. /**
  337. * Z-index
  338. */
  339. zIndex?: number;
  340. /**
  341. * Accept own properties
  342. * You can get the property later using `get()` method.
  343. */
  344. [key: string]: any;
  345. }
  346. export interface ILatLng {
  347. lat: number;
  348. lng: number;
  349. }
  350. export interface MarkerIcon {
  351. url?: string;
  352. size?: {
  353. width?: number;
  354. height?: number;
  355. };
  356. }
  357. export interface MarkerOptions {
  358. /**
  359. * The icon image url or properties. Also you can specify HTML Color values. Alternatively you can specify the image as Base64
  360. */
  361. icon?: any;
  362. /**
  363. * The content of the infoWindow.
  364. */
  365. title?: string;
  366. /**
  367. * The snippet of the infoWindow.
  368. */
  369. snippet?: string;
  370. /**
  371. * The position of the marker.
  372. */
  373. position: ILatLng;
  374. /**
  375. * Specify the anchor of the InfoWindow
  376. */
  377. infoWindowAnchor?: number[];
  378. /**
  379. * Specify the anchor of icon image
  380. */
  381. anchor?: number[];
  382. /**
  383. * Set true if you want to enable to drag the marker. (Default: false) Important! Drag starts after long pressed on the marker.
  384. */
  385. draggable?: boolean;
  386. /**
  387. * Set true if you want to use a flat marker. (Default: false)
  388. */
  389. flat?: boolean;
  390. /**
  391. * Set rotation angle. (Default: 0)
  392. */
  393. rotation?: number;
  394. /**
  395. * Set false if you want to hide. (Default: true)
  396. */
  397. visible?: boolean;
  398. /**
  399. * Specify the options for title. This property work for normal InfoWindow.
  400. */
  401. styles?: any;
  402. /**
  403. * Which animation to play when marker is added to a map.
  404. */
  405. animation?: string;
  406. /**
  407. * Higher zIndex value overlays will be drawn on top of lower zIndex value tile layers and overlays.
  408. */
  409. zIndex?: number;
  410. /**
  411. * Set to true to disable auto panning when the marker is clicked.
  412. */
  413. disableAutoPan?: boolean;
  414. /**
  415. * Accept own properties
  416. * You can get the property later using `get()` method.
  417. */
  418. [key: string]: any;
  419. }
  420. export interface MarkerLabel {
  421. /**
  422. * Set true if use bold font
  423. */
  424. bold?: boolean;
  425. /**
  426. * Set font size in pixel
  427. */
  428. fontSize?: number;
  429. /**
  430. * color strings
  431. */
  432. color?: string;
  433. /**
  434. * Set true if use italic font
  435. */
  436. italic?: boolean;
  437. }
  438. export interface MarkerClusterIcon {
  439. /**
  440. * Minimum number of clustering
  441. */
  442. min?: number;
  443. /**
  444. * Maximum number of clustering
  445. */
  446. max?: number;
  447. /**
  448. * anchor position of the marker
  449. */
  450. anchor?: any;
  451. /**
  452. * label option for clustered marker
  453. */
  454. label?: MarkerLabel;
  455. /**
  456. * icon url
  457. */
  458. url: string;
  459. /**
  460. * icon size
  461. */
  462. size?: {
  463. width?: number;
  464. height?: number;
  465. };
  466. }
  467. export interface MarkerClusterOptions {
  468. /**
  469. * Maximum zoom level of clustering
  470. * (default: 15, max: 18)
  471. */
  472. maxZoomLevel?: number;
  473. /**
  474. * Draw a rectangle that contains all locations of clustered when you tap on a cluster marker.
  475. * (default: true)
  476. */
  477. boundsDraw?: boolean;
  478. /**
  479. * Position list
  480. * [
  481. * {title: "store A", position: {lat: ..., lng: ...}},
  482. * {title: "store B", position: {lat: ..., lng: ...}},
  483. * {title: "store C", position: {lat: ..., lng: ...}}
  484. * ]
  485. */
  486. markers: MarkerOptions[];
  487. /**
  488. * Conditions of clustering
  489. * [
  490. * {icon: "assets/small.png", min: 2, max: 10},
  491. * {icon: "assets/middle.png", min: 11, max: 30},
  492. * {icon: "assets/large.png", min: 31}
  493. * ]
  494. */
  495. icons: MarkerClusterIcon[];
  496. /**
  497. * Accept own properties
  498. * You can get the property later using `get()` method.
  499. */
  500. [key: string]: any;
  501. }
  502. export interface MyLocation {
  503. latLng?: LatLng;
  504. elapsedRealtimeNanos?: any;
  505. time?: string;
  506. accuracy?: any;
  507. bearing?: number;
  508. altitude?: any;
  509. speed?: number;
  510. provider?: any;
  511. hashCode?: any;
  512. }
  513. export interface MyLocationOptions {
  514. /**
  515. * Set true if you want to try to use GPS mandatory.
  516. * In false, the plugin try to use GPS and network.
  517. * (default: false)
  518. */
  519. enableHighAccuracy?: boolean;
  520. }
  521. export interface PolygonOptions {
  522. /**
  523. * Pass ILatLng[] to specify the vertixes.
  524. * You need to contain two points at least.
  525. */
  526. points: Array<ILatLng>;
  527. /**
  528. * Set true if you want to draw the curve polygon based on the earth
  529. * (default: false)
  530. */
  531. geodesic?: boolean;
  532. /**
  533. * Set the stroke color
  534. * (rgb, rgba, #RRGGBB, "colorname", ...etc)
  535. */
  536. strokeColor?: string;
  537. /**
  538. * Set the stroke width in pixel
  539. */
  540. strokeWidth?: number;
  541. /**
  542. * Set the inside color of polygon
  543. * (rgb, rgba, #RRGGBB, "colorname", ...etc)
  544. */
  545. fillColor?: string;
  546. /**
  547. * Set false if you want to create invisible polygon
  548. * (Invisible polygon is not clickable, default true)
  549. */
  550. visible?: boolean;
  551. /**
  552. * Hierarchy z-index
  553. */
  554. zIndex?: number;
  555. /**
  556. * Pass ILatLng[][] to create holes in polygon
  557. */
  558. holes?: Array<Array<ILatLng>>;
  559. /**
  560. * Set true if you want to receive the POLYGON_CLICK event
  561. * (default: false)
  562. */
  563. clickable?: boolean;
  564. /**
  565. * Accept own properties
  566. * You can get the property later using `get()` method.
  567. */
  568. [key: string]: any;
  569. }
  570. export interface PolylineOptions {
  571. /**
  572. * Pass ILatLng[] to specify the vertixes.
  573. * You need to contain two points at least.
  574. */
  575. points: Array<ILatLng>;
  576. /**
  577. * Set false if you want to create invisible polyline
  578. * (Invisible polyline is not clickable, default true)
  579. */
  580. visible?: boolean;
  581. /**
  582. * Set true if you want to draw the curve polyline based on the earth
  583. * (default: false)
  584. */
  585. geodesic?: boolean;
  586. /**
  587. * Set the stroke color
  588. * (rgb, rgba, #RRGGBB, "colorname", ...etc)
  589. */
  590. color?: string;
  591. /**
  592. * Set the stroke width in pixel
  593. */
  594. width?: number;
  595. /**
  596. * Hierarchy z-index
  597. */
  598. zIndex?: number;
  599. /**
  600. * Set true if you want to receive the POLYLINE_CLICK event
  601. * (default: false)
  602. */
  603. clickable?: boolean;
  604. /**
  605. * Accept own properties
  606. * You can get the property later using `get()` method.
  607. */
  608. [key: string]: any;
  609. }
  610. export interface TileOverlayOptions {
  611. /**
  612. * This callback must Returns string of image URL.
  613. * If no tile, you need to Returns null.
  614. */
  615. getTile: (x: number, y: number, zoom: number) => string;
  616. /**
  617. * Set false if you want to create invisible tilelayer
  618. * (default true)
  619. */
  620. visible?: boolean;
  621. /**
  622. * Hierarchy z-index of tilelayer
  623. */
  624. zIndex?: number;
  625. /**
  626. * Default: 512px
  627. */
  628. tileSize?: number;
  629. /**
  630. * Default: 1.0
  631. */
  632. opacity?: number;
  633. /**
  634. * Set true if you want to display the tile information over the tile images.
  635. */
  636. debug?: boolean;
  637. /**
  638. * Accept own properties
  639. * You can get the property later using `get()` method.
  640. */
  641. [key: string]: any;
  642. }
  643. export interface ToDataUrlOptions {
  644. /**
  645. * True if you want get high quality map snapshot
  646. */
  647. uncompress?: boolean;
  648. }
  649. /**
  650. * Options for map.addKmlOverlay() method
  651. */
  652. export interface KmlOverlayOptions {
  653. url: string;
  654. clickable?: boolean;
  655. suppressInfoWindows?: boolean;
  656. /**
  657. * Accept own properties for future update
  658. */
  659. [key: string]: any;
  660. }
  661. /**
  662. * @hidden
  663. */
  664. export declare class VisibleRegion implements ILatLngBounds {
  665. private _objectInstance;
  666. /**
  667. * The northeast of the bounds that contains the farLeft, farRight, nearLeft and nearRight.
  668. * Since the map view is able to rotate, the farRight is not the same as the northeast.
  669. */
  670. northeast: ILatLng;
  671. /**
  672. * The southwest of the bounds that contains the farLeft, farRight, nearLeft and nearRight.
  673. * Since the map view is able to rotate, the nearLeft is not the same as the southwest.
  674. */
  675. southwest: ILatLng;
  676. /**
  677. * The farLeft indicates the lat/lng of the top-left of the map view.
  678. */
  679. farLeft: ILatLng;
  680. /**
  681. * The farRight indicates the lat/lng of the top-right of the map view.
  682. */
  683. farRight: ILatLng;
  684. /**
  685. * The nearLeft indicates the lat/lng of the bottom-left of the map view.
  686. */
  687. nearLeft: ILatLng;
  688. /**
  689. * The nearRight indicates the lat/lng of the bottom-right of the map view.
  690. */
  691. nearRight: ILatLng;
  692. /**
  693. * constant value : `VisibleRegion`
  694. */
  695. type: string;
  696. constructor(southwest: LatLngBounds, northeast: LatLngBounds, farLeft: ILatLng, farRight: ILatLng, nearLeft: ILatLng, nearRight: ILatLng);
  697. /**
  698. * Converts to string
  699. * @return {string}
  700. */
  701. toString(): string;
  702. /**
  703. * Returns a string of the form "lat_sw,lng_sw,lat_ne,lng_ne" for this bounds, where "sw" corresponds to the southwest corner of the bounding box, while "ne" corresponds to the northeast corner of that box.
  704. * @param precision {number}
  705. * @return {string}
  706. */
  707. toUrlValue(precision?: number): string;
  708. /**
  709. * Returns true if the given lat/lng is in this bounds.
  710. * @param LatLng {ILatLng}
  711. */
  712. contains(LatLng: ILatLng): boolean;
  713. }
  714. /**
  715. * @hidden
  716. */
  717. export declare const StreetViewSource: {
  718. DEFAULT: string;
  719. OUTDOOR: string;
  720. };
  721. export interface SetPovOption {
  722. bearing: number;
  723. radius?: number;
  724. zoom?: number;
  725. duration: number;
  726. }
  727. export interface StreetViewSetPositionOption {
  728. target: ILatLng;
  729. source?: string;
  730. radius?: number;
  731. }
  732. export interface StreetViewCameraPano {
  733. target: string;
  734. bearing?: number;
  735. tilt?: number;
  736. zoom?: number;
  737. }
  738. export interface StreetViewCameraPosition {
  739. target: ILatLng;
  740. source?: string;
  741. radius?: number;
  742. bearing?: number;
  743. tilt?: number;
  744. zoom?: number;
  745. }
  746. export interface StreetViewOptions {
  747. camera?: StreetViewCameraPano | StreetViewCameraPosition;
  748. /**
  749. * controls [options]
  750. */
  751. controls?: {
  752. streetNames?: boolean;
  753. navigation?: boolean;
  754. };
  755. /**
  756. * gestures [options]
  757. */
  758. gestures?: {
  759. padding?: boolean;
  760. zooming?: boolean;
  761. };
  762. /**
  763. * Accept extra properties for future updates
  764. */
  765. [key: string]: any;
  766. }
  767. export interface StreetViewNavigationLink {
  768. /**
  769. * panorama Id
  770. */
  771. panoId: string;
  772. /**
  773. * bearing (heading)
  774. */
  775. bearing: number;
  776. }
  777. export interface StreetViewLocation {
  778. latLng: ILatLng;
  779. links: StreetViewNavigationLink[];
  780. }
  781. /**
  782. * @hidden
  783. * You can listen to these events where appropriate
  784. */
  785. export declare const GoogleMapsEvent: {
  786. MAP_READY: string;
  787. MAP_CLICK: string;
  788. MAP_LONG_CLICK: string;
  789. POI_CLICK: string;
  790. MY_LOCATION_CLICK: string;
  791. MY_LOCATION_BUTTON_CLICK: string;
  792. INDOOR_BUILDING_FOCUSED: string;
  793. INDOOR_LEVEL_ACTIVATED: string;
  794. CAMERA_MOVE_START: string;
  795. CAMERA_MOVE: string;
  796. CAMERA_MOVE_END: string;
  797. OVERLAY_CLICK: string;
  798. POLYGON_CLICK: string;
  799. POLYLINE_CLICK: string;
  800. CIRCLE_CLICK: string;
  801. GROUND_OVERLAY_CLICK: string;
  802. INFO_CLICK: string;
  803. INFO_LONG_CLICK: string;
  804. INFO_CLOSE: string;
  805. INFO_OPEN: string;
  806. MARKER_CLICK: string;
  807. MARKER_DRAG: string;
  808. MARKER_DRAG_START: string;
  809. MARKER_DRAG_END: string;
  810. MAP_DRAG: string;
  811. MAP_DRAG_START: string;
  812. MAP_DRAG_END: string;
  813. KML_CLICK: string;
  814. PANORAMA_READY: string;
  815. PANORAMA_CAMERA_CHANGE: string;
  816. PANORAMA_LOCATION_CHANGE: string;
  817. PANORAMA_CLICK: string;
  818. };
  819. /**
  820. * @hidden
  821. */
  822. export declare const GoogleMapsAnimation: {
  823. BOUNCE: string;
  824. DROP: string;
  825. };
  826. /**
  827. * @hidden
  828. */
  829. export declare const GoogleMapsMapTypeId: {
  830. NORMAL: string;
  831. ROADMAP: string;
  832. SATELLITE: string;
  833. HYBRID: string;
  834. TERRAIN: string;
  835. NONE: string;
  836. };
  837. /**
  838. * @name Google Maps
  839. * @description
  840. * This plugin uses the native Google Maps SDK
  841. * Note: As of Ionic native 4.0, this using the 2.0 version of the google maps plugin. Please make sure your plugin is updated
  842. * @usage
  843. * ```typescript
  844. * import {
  845. * GoogleMaps,
  846. * GoogleMap,
  847. * GoogleMapsEvent,
  848. * GoogleMapOptions,
  849. * CameraPosition,
  850. * MarkerOptions,
  851. * Marker
  852. * } from '@ionic-native/google-maps';
  853. * import { Component } from "@angular/core/";
  854. *
  855. * @Component({
  856. * selector: 'page-home',
  857. * templateUrl: 'home.html'
  858. * })
  859. * export class HomePage {
  860. * map: GoogleMap;
  861. * constructor() { }
  862. *
  863. * ionViewDidLoad() {
  864. * this.loadMap();
  865. * }
  866. *
  867. * loadMap() {
  868. *
  869. * let mapOptions: GoogleMapOptions = {
  870. * camera: {
  871. * target: {
  872. * lat: 43.0741904,
  873. * lng: -89.3809802
  874. * },
  875. * zoom: 18,
  876. * tilt: 30
  877. * }
  878. * };
  879. *
  880. * this.map = GoogleMaps.create('map_canvas', mapOptions);
  881. *
  882. * // Wait the MAP_READY before using any methods.
  883. * this.map.one(GoogleMapsEvent.MAP_READY)
  884. * .then(() => {
  885. * console.log('Map is ready!');
  886. *
  887. * // Now you can use all methods safely.
  888. * this.map.addMarker({
  889. * title: 'Ionic',
  890. * icon: 'blue',
  891. * animation: 'DROP',
  892. * position: {
  893. * lat: 43.0741904,
  894. * lng: -89.3809802
  895. * }
  896. * })
  897. * .then(marker => {
  898. * marker.on(GoogleMapsEvent.MARKER_CLICK)
  899. * .subscribe(() => {
  900. * alert('clicked');
  901. * });
  902. * });
  903. *
  904. * });
  905. * }
  906. * }
  907. *
  908. * ```
  909. * @classes
  910. * GoogleMap
  911. * Circle
  912. * Encoding
  913. * Environment
  914. * Geocoder
  915. * GroundOverlay
  916. * HtmlInfoWindow
  917. * Geocoder
  918. * LatLng
  919. * LatLngBounds
  920. * Marker
  921. * MarkerCluster
  922. * Polygon
  923. * Polyline
  924. * Spherical
  925. * KmlOverlay
  926. * Poly
  927. * TileOverlay
  928. * BaseClass
  929. * BaseArrayClass
  930. * @interfaces
  931. * GoogleMapOptions
  932. * CameraPosition
  933. * CircleOptions
  934. * GeocoderRequest
  935. * GeocoderResult
  936. * GroundOverlayOptions
  937. * ILatLng
  938. * MarkerIcon
  939. * MarkerOptions
  940. * MarkerClusterIcon
  941. * MarkerClusterOptions
  942. * MyLocation
  943. * MyLocationOptions
  944. * PolygonOptions
  945. * PolylineOptions
  946. * TileOverlayOptions
  947. * KmlOverlayOptions
  948. * VisibleRegion
  949. */
  950. export declare class GoogleMaps extends IonicNativePlugin {
  951. /**
  952. * Creates a new GoogleMap instance
  953. * @param element {string | HTMLElement} Element ID or reference to attach the map to
  954. * @param options {GoogleMapOptions} [options] Options
  955. * @return {GoogleMap}
  956. */
  957. static create(element: string | HTMLElement | GoogleMapOptions, options?: GoogleMapOptions): GoogleMap;
  958. /**
  959. * @deprecation
  960. * @hidden
  961. */
  962. create(element: string | HTMLElement | GoogleMapOptions, options?: GoogleMapOptions): GoogleMap;
  963. /**
  964. * Creates a new StreetView instance
  965. * @param element {string | HTMLElement} Element ID or reference to attach the map to
  966. * @param options {StreetViewOptions} [options] Options
  967. * @return {StreetViewPanorama}
  968. */
  969. static createPanorama(element: string | HTMLElement, options?: StreetViewOptions): StreetViewPanorama;
  970. }
  971. /**
  972. * @hidden
  973. * https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v2.0.0/class/BaseClass/README.md
  974. */
  975. export declare class BaseClass {
  976. protected _objectInstance: any;
  977. /**
  978. * Adds an event listener.
  979. * @param eventName {string} event name you want to observe.
  980. * @return {Observable<any>}
  981. */
  982. addEventListener(eventName: string): Observable<any>;
  983. /**
  984. * Adds an event listener that works once.
  985. * @param eventName {string} event name you want to observe.
  986. * @return {Promise<any>}
  987. */
  988. addListenerOnce(eventName: string): Promise<any>;
  989. /**
  990. * Gets a value
  991. * @param key {any}
  992. */
  993. get(key: string): any;
  994. /**
  995. * Sets a value
  996. * @param key {string} The key name for the value. `(key)_changed` will be fired when you set value through this method.
  997. * @param value {any}
  998. * @param noNotify {boolean} [options] True if you want to prevent firing the `(key)_changed` event.
  999. */
  1000. set(key: string, value: any, noNotify?: boolean): void;
  1001. /**
  1002. * Bind a key to another object
  1003. * @param key {string} The property name you want to observe.
  1004. * @param target {any} The target object you want to observe.
  1005. * @param targetKey? {string} [options] The property name you want to observe. If you omit this, the `key` argument is used.
  1006. * @param noNotify? {boolean} [options] True if you want to prevent `(key)_changed` event when you bind first time, because the internal status is changed from `undefined` to something.
  1007. */
  1008. bindTo(key: string, target: any, targetKey?: string, noNotify?: boolean): void;
  1009. /**
  1010. * Alias of `addEventListener`
  1011. * @param key {string} The property name you want to observe.
  1012. * @return {Observable<any>}
  1013. */
  1014. on(eventName: string): Observable<any>;
  1015. /**
  1016. * Alias of `addEventListenerOnce`
  1017. * @param key {string} The property name you want to observe.
  1018. * @return {Promise<any>}
  1019. */
  1020. one(eventName: string): Promise<any>;
  1021. /**
  1022. * Clears all stored values
  1023. */
  1024. empty(): void;
  1025. /**
  1026. * Dispatch event.
  1027. * @param eventName {string} Event name
  1028. * @param parameters {any} [options] The data you want to pass to event listerners.
  1029. */
  1030. trigger(eventName: string, ...parameters: any[]): void;
  1031. /**
  1032. * Executes off() and empty()
  1033. */
  1034. destroy(): void;
  1035. /**
  1036. * Remove event listener(s)
  1037. * The `removeEventListener()` has three usages:
  1038. * - removeEventListener("eventName", listenerFunction);
  1039. * This removes one particular event listener
  1040. * - removeEventListener("eventName");
  1041. * This removes the event listeners that added for the event name.
  1042. * - removeEventListener();
  1043. * This removes all listeners.
  1044. *
  1045. * @param eventName {string} [options] Event name
  1046. * @param listener {Function} [options] Event listener
  1047. */
  1048. removeEventListener(eventName?: string, listener?: (...parameters: any[]) => void): void;
  1049. /**
  1050. * Alias of `removeEventListener`
  1051. *
  1052. * @param eventName {string} [options] Event name
  1053. * @param listener {Function} [options] Event listener
  1054. */
  1055. off(eventName?: string, listener?: (...parameters: any[]) => void): void;
  1056. }
  1057. /**
  1058. * @hidden
  1059. * https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v2.0.0/class/BaseArrayClass/README.md
  1060. */
  1061. export declare class BaseArrayClass<T> extends BaseClass {
  1062. constructor(initialData?: T[] | any);
  1063. /**
  1064. * Removes all elements from the array.
  1065. * @param noNotify? {boolean} [options] Set true to prevent remove_at events.
  1066. */
  1067. empty(noNotify?: boolean): void;
  1068. /**
  1069. * Iterate over each element, calling the provided callback.
  1070. * @param fn {Function}
  1071. */
  1072. forEach(fn: (element: T, index?: number) => void): void;
  1073. /**
  1074. * Iterate over each element, calling the provided callback.
  1075. * @param fn {Function}
  1076. * @return {Promise<void>}
  1077. */
  1078. forEachAsync(fn: ((element: T, callback: () => void) => void)): Promise<void>;
  1079. /**
  1080. * Iterate over each element, then Returns a new value.
  1081. * Then you can get the results of each callback.
  1082. * @param fn {Function}
  1083. * @return {Array<Object>} returns a new array with the results
  1084. */
  1085. map(fn: (element: T, index: number) => any): any[];
  1086. /**
  1087. * Iterate over each element, calling the provided callback.
  1088. * Then you can get the results of each callback.
  1089. * @param fn {Function}
  1090. * @param callback {Function}
  1091. * @return {Promise<any>} returns a new array with the results
  1092. */
  1093. mapAsync(fn: ((element: T, callback: (newElement: any) => void) => void)): Promise<any[]>;
  1094. /**
  1095. * Same as `mapAsync`, but keep the execution order
  1096. * @param fn {Function}
  1097. * @param callback {Function}
  1098. * @return {Promise<any>} returns a new array with the results
  1099. */
  1100. mapSeries(fn: ((element: T, callback: (newElement: any) => void) => void)): Promise<any[]>;
  1101. /**
  1102. * The filter() method creates a new array with all elements that pass the test implemented by the provided function.
  1103. * @param fn {Function}
  1104. * @return {T[]} returns a new filtered array
  1105. */
  1106. filter(fn: (element: T, index: number) => boolean): T[];
  1107. /**
  1108. * The filterAsync() method creates a new array with all elements that pass the test implemented by the provided function.
  1109. * @param fn {Function}
  1110. * @param callback {Function}
  1111. * @return {Promise<T[]>} returns a new filtered array
  1112. */
  1113. filterAsync(fn: (element: T, callback: (result: boolean) => void) => void): Promise<T[]>;
  1114. /**
  1115. * Returns a reference to the underlying Array.
  1116. * @return {Array<Object>}
  1117. */
  1118. getArray(): T[];
  1119. /**
  1120. * Returns the element at the specified index.
  1121. * @param index {number}
  1122. * @return {Object}
  1123. */
  1124. getAt(index: number): any;
  1125. /**
  1126. * Returns the number of the elements.
  1127. * @return {number}
  1128. */
  1129. getLength(): number;
  1130. /**
  1131. * The indexOf() method returns the first index at which a given element can be found in the array, or -1 if it is not present.
  1132. * @param element {Object}
  1133. * @return {number}
  1134. */
  1135. indexOf(element: T): number;
  1136. /**
  1137. * The reverse() method reverses an array in place.
  1138. */
  1139. reverse(): void;
  1140. /**
  1141. * The sort() method sorts the elements of an array in place and returns the array.
  1142. */
  1143. sort(): void;
  1144. /**
  1145. * Inserts an element at the specified index.
  1146. * @param index {number}
  1147. * @param element {Object}
  1148. * @param noNotify? {boolean} [options] Set true to prevent insert_at event.
  1149. * @return {Object}
  1150. */
  1151. insertAt(index: number, element: T, noNotify?: boolean): void;
  1152. /**
  1153. * Removes the last element of the array and returns that element.
  1154. * @param noNotify? {boolean} [options] Set true to prevent remove_at event.
  1155. * @return {Object}
  1156. */
  1157. pop(noNotify?: boolean): T;
  1158. /**
  1159. * Adds one element to the end of the array and returns the new length of the array.
  1160. * @param element {object}
  1161. * @param noNotify? {boolean} Set true to prevent insert_at events.
  1162. */
  1163. push(element: T, noNotify?: boolean): void;
  1164. /**
  1165. * Removes an element from the specified index.
  1166. * @param index {number}
  1167. * @param noNotify? {boolean} [options] Set true to prevent remove_at event.
  1168. */
  1169. removeAt(index: number, noNotify?: boolean): T;
  1170. /**
  1171. * Sets an element at the specified index.
  1172. * @param index {number}
  1173. * @param element {object}
  1174. * @param noNotify? {boolean} [options] Set true to prevent set_at event.
  1175. */
  1176. setAt(index: number, element: T, noNotify?: boolean): void;
  1177. }
  1178. /**
  1179. * @hidden
  1180. * https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v2.0.0/class/Circle/README.md
  1181. */
  1182. export declare class Circle extends BaseClass {
  1183. private _map;
  1184. constructor(_map: GoogleMap, _objectInstance: any);
  1185. /**
  1186. * Returns the ID of instance.
  1187. * @return {string}
  1188. */
  1189. getId(): string;
  1190. /**
  1191. * Returns the map instance.
  1192. * @return {GoogleMap}
  1193. */
  1194. getMap(): GoogleMap;
  1195. /**
  1196. * Changes the center position.
  1197. * @param latLng {ILatLng}
  1198. */
  1199. setCenter(latLng: ILatLng): void;
  1200. /**
  1201. * Returns the current center position
  1202. * @return {ILatLng}
  1203. */
  1204. getCenter(): ILatLng;
  1205. /**
  1206. * Returns the current circle radius.
  1207. * @return {number}
  1208. */
  1209. getRadius(): number;
  1210. /**
  1211. * Changes the circle radius.
  1212. * @param radius {number}
  1213. */
  1214. setRadius(radius: number): void;
  1215. /**
  1216. * Changes the filling color (inner color).
  1217. * @param color {string}
  1218. */
  1219. setFillColor(color: string): void;
  1220. /**
  1221. * Returns the current circle filling color (inner color).
  1222. * @return {string}
  1223. */
  1224. getFillColor(): string;
  1225. /**
  1226. * Changes the stroke width.
  1227. * @param strokeWidth {number}
  1228. */
  1229. setStrokeWidth(strokeWidth: number): void;
  1230. /**
  1231. * Returns the current circle stroke width (unit: pixel).
  1232. * @return {number}
  1233. */
  1234. getStrokeWidth(): number;
  1235. /**
  1236. * Changes the stroke color (outter color).
  1237. * @param strokeColor {string}
  1238. */
  1239. setStrokeColor(strokeColor: string): void;
  1240. /**
  1241. * Returns the current circle stroke color (outer color).
  1242. * @return {string}
  1243. */
  1244. getStrokeColor(): string;
  1245. /**
  1246. * Changes click-ability of the circle.
  1247. * @param clickable {boolean}
  1248. */
  1249. setClickable(clickable: boolean): void;
  1250. /**
  1251. * Returns true if the circle is clickable.
  1252. * @return {boolean}
  1253. */
  1254. getClickable(): boolean;
  1255. /**
  1256. * Changes the circle zIndex order.
  1257. * @param zIndex {number}
  1258. */
  1259. setZIndex(zIndex: number): void;
  1260. /**
  1261. * Returns the current circle zIndex.
  1262. * @return {number}
  1263. */
  1264. getZIndex(): number;
  1265. /**
  1266. * Remove the circle.
  1267. */
  1268. remove(): void;
  1269. /**
  1270. * Returns the latLngBounds (rectangle) that contains the circle.
  1271. * @return {LatLngBounds}
  1272. */
  1273. getBounds(): LatLngBounds;
  1274. /**
  1275. * Set circle visibility
  1276. * @param visible {boolean}
  1277. */
  1278. setVisible(visible: boolean): void;
  1279. /**
  1280. * Returns true if the circle is visible.
  1281. * @return {boolean}
  1282. */
  1283. getVisible(): boolean;
  1284. }
  1285. /**
  1286. * @hidden
  1287. */
  1288. export declare class Environment {
  1289. /**
  1290. * Get the open source software license information for Google Maps SDK for iOS.
  1291. * @return {Promise<any>}
  1292. */
  1293. static getLicenseInfo(): Promise<any>;
  1294. /**
  1295. * @deprecation
  1296. * @hidden
  1297. */
  1298. getLicenseInfo(): Promise<any>;
  1299. /**
  1300. * Specifies the background color of the app.
  1301. * @param color
  1302. */
  1303. static setBackgroundColor(color: string): void;
  1304. /**
  1305. * @deprecation
  1306. * @hidden
  1307. */
  1308. setBackgroundColor(color: string): void;
  1309. }
  1310. /**
  1311. * @hidden
  1312. */
  1313. export declare class Geocoder {
  1314. /**
  1315. * @deprecation
  1316. * @hidden
  1317. */
  1318. geocode(request: GeocoderRequest): Promise<GeocoderResult[] | BaseArrayClass<GeocoderResult[]>>;
  1319. /**
  1320. * Converts position to address and vice versa
  1321. * @param {GeocoderRequest} request Request object with either an address or a position
  1322. * @return {Promise<GeocoderResult[] | BaseArrayClass<GeocoderResult>>}
  1323. */
  1324. static geocode(request: GeocoderRequest): Promise<GeocoderResult[] | BaseArrayClass<GeocoderResult[]>>;
  1325. }
  1326. /**
  1327. * @hidden
  1328. */
  1329. export declare class LocationService {
  1330. /**
  1331. * Get the current device location without map
  1332. * @return {Promise<MyLocation>}
  1333. */
  1334. static getMyLocation(options?: MyLocationOptions): Promise<MyLocation>;
  1335. /**
  1336. * Return true if the application has geolocation permission
  1337. * @return {Promise<MyLocation>}
  1338. */
  1339. static hasPermission(): Promise<boolean>;
  1340. }
  1341. /**
  1342. * @hidden
  1343. */
  1344. export declare class Encoding {
  1345. /**
  1346. * @deprecation
  1347. * @hidden
  1348. */
  1349. decodePath(encoded: string, precision?: number): Array<ILatLng>;
  1350. /**
  1351. * @deprecation
  1352. * @hidden
  1353. */
  1354. encodePath(path: Array<ILatLng> | BaseArrayClass<ILatLng>): string;
  1355. /**
  1356. * Decodes an encoded path string into a sequence of LatLngs.
  1357. * @param encoded {string} an encoded path string
  1358. * @param precision? {number} default: 5
  1359. * @return {ILatLng[]}
  1360. */
  1361. static decodePath(encoded: string, precision?: number): Array<ILatLng>;
  1362. /**
  1363. * Encodes a sequence of LatLngs into an encoded path string.
  1364. * @param path {Array<ILatLng> | BaseArrayClass<ILatLng>} a sequence of LatLngs
  1365. * @return {string}
  1366. */
  1367. static encodePath(path: Array<ILatLng> | BaseArrayClass<ILatLng>): string;
  1368. }
  1369. /**
  1370. * @hidden
  1371. */
  1372. export declare class Poly {
  1373. /**
  1374. * Returns true if the specified location is in the polygon path
  1375. * @param location {ILatLng}
  1376. * @param path {ILatLng[]}
  1377. * @return {boolean}
  1378. */
  1379. static containsLocation(location: ILatLng, path: ILatLng[]): boolean;
  1380. /**
  1381. * Returns true if the specified location is on the polyline path
  1382. * @param location {ILatLng}
  1383. * @param path {ILatLng[]}
  1384. * @return {boolean}
  1385. */
  1386. static isLocationOnEdge(location: ILatLng, path: ILatLng[]): boolean;
  1387. }
  1388. /**
  1389. * @hidden
  1390. */
  1391. export declare class Spherical {
  1392. /**
  1393. * @deprecation
  1394. * @hidden
  1395. */
  1396. computeDistanceBetween(from: ILatLng, to: ILatLng): number;
  1397. /**
  1398. * @deprecation
  1399. * @hidden
  1400. */
  1401. computeOffset(from: ILatLng, distance: number, heading: number): LatLng;
  1402. /**
  1403. * @deprecation
  1404. * @hidden
  1405. */
  1406. computeOffsetOrigin(to: ILatLng, distance: number, heading: number): LatLng;
  1407. /**
  1408. * @deprecation
  1409. * @hidden
  1410. */
  1411. computeLength(path: Array<ILatLng> | BaseArrayClass<ILatLng>): number;
  1412. /**
  1413. * @deprecation
  1414. * @hidden
  1415. */
  1416. computeArea(path: Array<ILatLng> | BaseArrayClass<ILatLng>): number;
  1417. /**
  1418. * @deprecation
  1419. * @hidden
  1420. */
  1421. computeSignedArea(path: Array<ILatLng> | BaseArrayClass<ILatLng>): number;
  1422. /**
  1423. * @deprecation
  1424. * @hidden
  1425. */
  1426. computeHeading(from: ILatLng, to: ILatLng): number;
  1427. /**
  1428. * @deprecation
  1429. * @hidden
  1430. */
  1431. interpolate(from: ILatLng, to: ILatLng, fraction: number): LatLng;
  1432. /**
  1433. * Returns the distance, in meters, between two LatLngs.
  1434. * @param locationA {ILatLng}
  1435. * @param locationB {ILatLng}
  1436. * @return {number}
  1437. */
  1438. static computeDistanceBetween(from: ILatLng, to: ILatLng): number;
  1439. /**
  1440. * Returns the LatLng resulting from moving a distance from an origin in the specified heading (expressed in degrees clockwise from north)
  1441. * @param from {ILatLng}
  1442. * @param distance {number}
  1443. * @param heading {number}
  1444. * @return {LatLng}
  1445. */
  1446. static computeOffset(from: ILatLng, distance: number, heading: number): LatLng;
  1447. /**
  1448. * Returns the location of origin when provided with a LatLng destination, meters travelled and original heading. Headings are expressed in degrees clockwise from North. This function returns null when no solution is available.
  1449. * @param to {ILatLng} The destination LatLng.
  1450. * @param distance {number} The distance travelled, in meters.
  1451. * @param heading {number} The heading in degrees clockwise from north.
  1452. * @return {LatLng}
  1453. */
  1454. static computeOffsetOrigin(to: ILatLng, distance: number, heading: number): LatLng;
  1455. /**
  1456. * Returns the length of the given path.
  1457. * @param path {Array<ILatLng> | BaseArrayClass<ILatLng>}
  1458. * @return {number}
  1459. */
  1460. static computeLength(path: Array<ILatLng> | BaseArrayClass<ILatLng>): number;
  1461. /**
  1462. * Returns the area of a closed path. The computed area uses the same units as the radius.
  1463. * @param path {Array<ILatLng> | BaseArrayClass<ILatLng>}.
  1464. * @return {number}
  1465. */
  1466. static computeArea(path: Array<ILatLng> | BaseArrayClass<ILatLng>): number;
  1467. /**
  1468. * Returns the signed area of a closed path. The signed area may be used to determine the orientation of the path.
  1469. * @param path {Array<ILatLng> | BaseArrayClass<ILatLng>}.
  1470. * @return {number}
  1471. */
  1472. static computeSignedArea(path: Array<ILatLng> | BaseArrayClass<ILatLng>): number;
  1473. /**
  1474. * Returns the heading from one LatLng to another LatLng. Headings are expressed in degrees clockwise from North within the range (-180,180).
  1475. * @param from {ILatLng}
  1476. * @param to {ILatLng}
  1477. * @return {number}
  1478. */
  1479. static computeHeading(from: ILatLng, to: ILatLng): number;
  1480. /**
  1481. * Returns the LatLng which lies the given fraction of the way between the origin LatLng and the destination LatLng.
  1482. * @param from {ILatLng} The LatLng from which to start.
  1483. * @param to {ILatLng} The LatLng toward which to travel.
  1484. * @param fraction {number} A fraction of the distance to travel from 0.0 to 1.0 .
  1485. * @return {LatLng}
  1486. */
  1487. static interpolate(from: ILatLng, to: ILatLng, fraction: number): LatLng;
  1488. }
  1489. /**
  1490. * @hidden
  1491. */
  1492. export declare class StreetViewPanorama extends BaseClass {
  1493. constructor(element: string | HTMLElement, options?: StreetViewOptions);
  1494. /**
  1495. * Sets the point of view for the Street View panorama.
  1496. */
  1497. setPov(pov: StreetViewCameraPano): void;
  1498. /**
  1499. * Sets the StreetViewPanorama to a given location.
  1500. */
  1501. setPosition(cameraPosition: String | StreetViewSetPositionOption): void;
  1502. /**
  1503. * Toggles the ability for users to use pan around on the panorama using gestures.
  1504. * @param gestureEnable {boolean}
  1505. */
  1506. setPanningGesturesEnabled(gestureEnable: boolean): void;
  1507. /**
  1508. * Retrun true if the panning gesture is enabled.
  1509. * @return {boolean}
  1510. */
  1511. getPanningGesturesEnabled(): boolean;
  1512. /**
  1513. * Toggles the ability for users to zoom on the panorama using gestures.
  1514. * @param gestureEnable {boolean}
  1515. */
  1516. setZoomGesturesEnabled(gestureEnable: boolean): void;
  1517. /**
  1518. * Retrun true if the zooming gesture is enabled.
  1519. * @return {boolean}
  1520. */
  1521. getZoomGesturesEnabled(): boolean;
  1522. /**
  1523. * Toggles the ability for users to see street names on the panorama.
  1524. * @param gestureEnable {boolean}
  1525. */
  1526. setStreetNamesEnabled(gestureEnable: boolean): void;
  1527. /**
  1528. * Retrun true if the street names control is enabled.
  1529. * @return {boolean}
  1530. */
  1531. getStreetNamesEnabled(): boolean;
  1532. /**
  1533. * Toggles the ability for users to move between panoramas.
  1534. * @param gestureEnable {boolean}
  1535. */
  1536. setNavigationEnabled(gestureEnable: boolean): void;
  1537. /**
  1538. * Retrun true if the navigation control is enabled.
  1539. * @return {boolean}
  1540. */
  1541. getNavigationEnabled(): boolean;
  1542. /**
  1543. * Retrun the navigation links (StreetViewLocation.links)
  1544. * @return {StreetViewNavigationLink[]}
  1545. */
  1546. getLinks(): StreetViewNavigationLink[];
  1547. /**
  1548. * Retrun the current location
  1549. * @return {StreetViewLocation}
  1550. */
  1551. getLocation(): StreetViewLocation;
  1552. /**
  1553. * Retrun the current panorama id
  1554. * @return {string}
  1555. */
  1556. getPano(): string;
  1557. /**
  1558. * Retrun the current position (StreetViewLocation.latLng)
  1559. * @return {string}
  1560. */
  1561. getPosition(): ILatLng;
  1562. /**
  1563. * Destroy a map completely
  1564. * @return {Promise<any>}
  1565. */
  1566. remove(): Promise<any>;
  1567. }
  1568. /**
  1569. * @hidden
  1570. */
  1571. export declare class GoogleMap extends BaseClass {
  1572. constructor(element: string | HTMLElement, options?: GoogleMapOptions);
  1573. /**
  1574. * Changes the map div
  1575. * @param domNode {HTMLElement | string} [options] If you want to display the map in an html element, you need to specify an element or id. If omit this argument, the map is detached from webview.
  1576. */
  1577. setDiv(domNode?: HTMLElement | string): void;
  1578. /**
  1579. * Returns the map HTML element
  1580. * @return {HTMLElement}
  1581. */
  1582. getDiv(): HTMLElement;
  1583. /**
  1584. * Changes the map type id
  1585. * @param mapTypeId {string}
  1586. */
  1587. setMapTypeId(mapTypeId: MapType): void;
  1588. /**
  1589. * Moves the camera with animation
  1590. * @return {Promise<any>}
  1591. */
  1592. animateCamera(cameraPosition: CameraPosition<any>): Promise<any>;
  1593. /**
  1594. * Zooming in the camera with animation
  1595. * @return {Promise<any>}
  1596. */
  1597. animateCameraZoomIn(): Promise<any>;
  1598. /**
  1599. * Zooming out the camera with animation
  1600. * @return {Promise<any>}
  1601. */
  1602. animateCameraZoomOut(): Promise<any>;
  1603. /**
  1604. * Moves the camera without animation
  1605. * @return {Promise<any>}
  1606. */
  1607. moveCamera(cameraPosition: CameraPosition<any>): Promise<any>;
  1608. /**
  1609. * Zooming in the camera without animation
  1610. * @return {Promise<any>}
  1611. */
  1612. moveCameraZoomIn(): Promise<any>;
  1613. /**
  1614. * Zooming out the camera without animation
  1615. * @return {Promise<any>}
  1616. */
  1617. moveCameraZoomOut(): Promise<any>;
  1618. /**
  1619. * Get the position of the camera.
  1620. * @return {CameraPosition}
  1621. */
  1622. getCameraPosition(): CameraPosition<ILatLng>;
  1623. /**
  1624. * Get the current camera target position
  1625. * @return {ILatLng}
  1626. */
  1627. getCameraTarget(): ILatLng;
  1628. /**
  1629. * Get the current camera zoom level
  1630. * @return {number}
  1631. */
  1632. getCameraZoom(): number;
  1633. /**
  1634. * Get the current camera bearing
  1635. * @return {number}
  1636. */
  1637. getCameraBearing(): number;
  1638. /**
  1639. * Get the current camera tilt (view angle)
  1640. * @return {number}
  1641. */
  1642. getCameraTilt(): number;
  1643. /**
  1644. * Set the center position of the camera view
  1645. * @param latLng {ILatLng | Array<ILatLng>}
  1646. */
  1647. setCameraTarget(latLng: ILatLng | Array<ILatLng>): void;
  1648. /**
  1649. * Set zoom level of the camera
  1650. * @param zoomLevel {number} Zoom level
  1651. */
  1652. setCameraZoom(zoomLevel: number): void;
  1653. /**
  1654. * Set the camera view angle
  1655. * @param tiltAngle {number} Tilt angle
  1656. */
  1657. setCameraTilt(tiltAngle: number): void;
  1658. /**
  1659. * Set camera bearing
  1660. * @param bearing {any}
  1661. */
  1662. setCameraBearing(bearing: any): void;
  1663. /**
  1664. * Changes the center of the map by the given distance in pixels
  1665. * @param x {number}
  1666. * @param y {number}
  1667. */
  1668. panBy(x: number, y: number): void;
  1669. /**
  1670. * Get the current visible region (southWest and northEast)
  1671. * @return {VisibleRegion}
  1672. */
  1673. getVisibleRegion(): VisibleRegion;
  1674. /**
  1675. * Get the current device location
  1676. * @return {Promise<MyLocation>}
  1677. */
  1678. getMyLocation(options?: MyLocationOptions): Promise<MyLocation>;
  1679. /**
  1680. * Set false to ignore all clicks on the map
  1681. * @param isClickable {boolean}
  1682. */
  1683. setClickable(isClickable: boolean): void;
  1684. /**
  1685. * Destroy a map completely
  1686. * @return {Promise<any>}
  1687. */
  1688. remove(): Promise<any>;
  1689. /**
  1690. * Remove all overlays, such as marker
  1691. * @return {Promise<any>}
  1692. */
  1693. clear(): Promise<any>;
  1694. /**
  1695. * Convert the unit from LatLng to the pixels from the left/top of the map div
  1696. * @return {Promise<any>}
  1697. */
  1698. fromLatLngToPoint(latLng: ILatLng): Promise<any[]>;
  1699. /**
  1700. * Convert the unit from the pixels from the left/top to the LatLng
  1701. * @return {Promise<LatLng>}
  1702. */
  1703. fromPointToLatLng(point: number[]): Promise<LatLng>;
  1704. /**
  1705. * Set true if you want to show the MyLocation control (blue dot)
  1706. * @param enabled {boolean}
  1707. */
  1708. setMyLocationEnabled(enabled: boolean): void;
  1709. /**
  1710. * Set true if you want to show the MyLocation button
  1711. * @param enabled {boolean}
  1712. */
  1713. setMyLocationButtonEnabled(enabled: boolean): void;
  1714. /**
  1715. * Get the currently focused building
  1716. * @return {Promise<any>}
  1717. */
  1718. getFocusedBuilding(): Promise<any>;
  1719. /**
  1720. * Set true if you want to show the indoor map
  1721. * @param enabled {boolean}
  1722. */
  1723. setIndoorEnabled(enabled: boolean): void;
  1724. /**
  1725. * Set true if you want to show the traffic layer
  1726. * @param enabled {boolean}
  1727. */
  1728. setTrafficEnabled(enabled: boolean): void;
  1729. /**
  1730. * Set true if you want to show the compass button
  1731. * @param enabled {boolean}
  1732. */
  1733. setCompassEnabled(enabled: boolean): void;
  1734. /**
  1735. * Sets the preference for whether all gestures should be enabled or disabled
  1736. * @param enabled {boolean}
  1737. */
  1738. setAllGesturesEnabled(enabled: boolean): void;
  1739. /**
  1740. * Set visibility of the map
  1741. * @param visible {boolean}
  1742. */
  1743. setVisible(visible: boolean): void;
  1744. /**
  1745. * Adjust the map padding (same as CSS padding rule)
  1746. * @param top {number}
  1747. * @param right {number}
  1748. * @param left {number}
  1749. * @param bottom {number}
  1750. */
  1751. setPadding(top: number, right?: number, bottom?: number, left?: number): void;
  1752. /**
  1753. * Set options
  1754. * @param options
  1755. */
  1756. setOptions(options: GoogleMapOptions): void;
  1757. /**
  1758. * Adds a marker
  1759. * @param options {MarkerOptions} options
  1760. * @return {Promise<Marker>}
  1761. */
  1762. addMarker(options: MarkerOptions): Promise<Marker>;
  1763. /**
  1764. * Adds a marker in synchronous
  1765. * @param options {MarkerOptions} options
  1766. * @Returns {Marker}
  1767. */
  1768. addMarkerSync(options: MarkerOptions): Marker;
  1769. /**
  1770. * Adds a marker cluster
  1771. * @param options {MarkerClusterOptions} options
  1772. * @return {Promise<MarkerCluster>}
  1773. */
  1774. addMarkerCluster(options: MarkerClusterOptions): Promise<MarkerCluster>;
  1775. /**
  1776. * Adds a marker cluster in synchronous
  1777. * @param options {MarkerClusterOptions} options
  1778. * @Returns {MarkerCluster}
  1779. */
  1780. addMarkerClusterSync(options: MarkerClusterOptions): MarkerCluster;
  1781. /**
  1782. * Adds a circle
  1783. * @param options {CircleOptions} options
  1784. * @return {Promise<Circle>}
  1785. */
  1786. addCircle(options: CircleOptions): Promise<Circle>;
  1787. /**
  1788. * Adds a circle in synchronous
  1789. * @param options {CircleOptions} options
  1790. * @return {Circle}
  1791. */
  1792. addCircleSync(options: CircleOptions): Circle;
  1793. /**
  1794. * Adds a polygon
  1795. * @param options {PolygonOptions} options
  1796. * @return {Promise<Polygon>}
  1797. */
  1798. addPolygon(options: PolygonOptions): Promise<Polygon>;
  1799. /**
  1800. * Adds a polygon in synchronous
  1801. * @param options {PolygonOptions} options
  1802. * @return {Polygon}
  1803. */
  1804. addPolygonSync(options: PolygonOptions): Polygon;
  1805. /**
  1806. * Adds a polyline
  1807. * @param options {PolylineOptions} options
  1808. * @return {Promise<Polyline>}
  1809. */
  1810. addPolyline(options: PolylineOptions): Promise<Polyline>;
  1811. /**
  1812. * Adds a polyline in synchronous
  1813. * @param options {PolylineOptions} options
  1814. * @return {Polyline}
  1815. */
  1816. addPolylineSync(options: PolylineOptions): Polyline;
  1817. /**
  1818. * Adds a tile overlay
  1819. * @param options {TileOverlayOptions} options
  1820. * @return {Promise<TileOverlay>}
  1821. */
  1822. addTileOverlay(options: TileOverlayOptions): Promise<TileOverlay>;
  1823. /**
  1824. * Adds a tile overlay in synchronous
  1825. * @param options {TileOverlayOptions} options
  1826. * @return {TileOverlay}
  1827. */
  1828. addTileOverlaySync(options: TileOverlayOptions): TileOverlay;
  1829. /**
  1830. * Adds a ground overlay
  1831. * @param options {GroundOverlayOptions} options
  1832. * @return {Promise<GroundOverlay>}
  1833. */
  1834. addGroundOverlay(options: GroundOverlayOptions): Promise<GroundOverlay>;
  1835. /**
  1836. * Adds a ground overlay in synchronous
  1837. * @param options {GroundOverlayOptions} options
  1838. * @return {GroundOverlay}
  1839. */
  1840. addGroundOverlaySync(options: GroundOverlayOptions): GroundOverlay;
  1841. /**
  1842. * Adds a kml overlay
  1843. * @param options {KmlOverlayOptions} options
  1844. * @return {Promise<KmlOverlay>}
  1845. */
  1846. addKmlOverlay(options: KmlOverlayOptions): Promise<KmlOverlay>;
  1847. /**
  1848. * Returns the base64 encoded screen capture of the map.
  1849. * @param options {ToDataUrlOptions} [options] options
  1850. * @return {Promise<string>}
  1851. */
  1852. toDataURL(options?: ToDataUrlOptions): Promise<string>;
  1853. }
  1854. /**
  1855. * @hidden
  1856. */
  1857. export declare class GroundOverlay extends BaseClass {
  1858. private _map;
  1859. constructor(_map: GoogleMap, _objectInstance: any);
  1860. /**
  1861. * Returns the ID of instance.
  1862. * @return {string}
  1863. */
  1864. getId(): string;
  1865. /**
  1866. * Returns the map instance.
  1867. * @return {GoogleMap}
  1868. */
  1869. getMap(): GoogleMap;
  1870. /**
  1871. * Changes the bounds of the GroundOverlay
  1872. * @param bounds { ILatLng[]}
  1873. */
  1874. setBounds(bounds: ILatLng[]): void;
  1875. /**
  1876. * Changes the bearing of the ground overlay
  1877. * @param bearing {number}
  1878. */
  1879. setBearing(bearing: number): void;
  1880. /**
  1881. * Returns the current bearing value
  1882. */
  1883. getBearing(): number;
  1884. /**
  1885. * Changes the image of the ground overlay
  1886. * @param imageUrl {string} URL of image
  1887. */
  1888. setImage(imageUrl: string): void;
  1889. /**
  1890. * Changes the opacity of the ground overlay from 0.0 to 1.0
  1891. * @param opacity {number}
  1892. */
  1893. setOpacity(opacity: number): void;
  1894. /**
  1895. * Returns the current opacity
  1896. * @return {number}
  1897. */
  1898. getOpacity(): number;
  1899. /**
  1900. * Changes click-ability of the ground overlay
  1901. * @param clickable {boolean}
  1902. */
  1903. setClickable(clickable: boolean): void;
  1904. /**
  1905. * Returns true if the ground overlay is clickable
  1906. * @return {boolean}
  1907. */
  1908. getClickable(): boolean;
  1909. /**
  1910. * Changes visibility of the ground overlay
  1911. * @param visible {boolean}
  1912. */
  1913. setVisible(visible: boolean): void;
  1914. /**
  1915. * Returns true if the ground overlay is visible
  1916. * @return {boolean}
  1917. */
  1918. getVisible(): boolean;
  1919. /**
  1920. * Changes the ground overlay zIndex order
  1921. * @param index {number}
  1922. */
  1923. setZIndex(index: number): void;
  1924. /**
  1925. * Returns the current ground overlay zIndex
  1926. * @return {number}
  1927. */
  1928. getZIndex(): number;
  1929. /**
  1930. * Remove the ground overlay
  1931. */
  1932. remove(): void;
  1933. }
  1934. /**
  1935. * @hidden
  1936. */
  1937. export declare class HtmlInfoWindow extends BaseClass {
  1938. constructor();
  1939. /**
  1940. * Changes the backgroundColor
  1941. * @param color {string}
  1942. */
  1943. setBackgroundColor(color: string): void;
  1944. /**
  1945. * Set your HTML contents.
  1946. * @param content {any} String containing text or HTML element
  1947. * @param cssOptions? {any} CSS styles for the container element of HTMLInfoWindow
  1948. */
  1949. setContent(content: string | Element, cssOptions?: any): void;
  1950. /**
  1951. * Open the htmlInfoWindow
  1952. * @param marker {Marker}
  1953. */
  1954. open(marker: any): any;
  1955. /**
  1956. * Close the htmlInfoWindow
  1957. */
  1958. close(): void;
  1959. }
  1960. /**
  1961. * @hidden
  1962. */
  1963. export declare class Marker extends BaseClass {
  1964. private _map;
  1965. constructor(_map: GoogleMap, _objectInstance: any);
  1966. /**
  1967. * Returns the ID of instance.
  1968. * @return {string}
  1969. */
  1970. getId(): string;
  1971. /**
  1972. * Returns the map instance.
  1973. * @return {GoogleMap}
  1974. */
  1975. getMap(): GoogleMap;
  1976. /**
  1977. * Set the marker position.
  1978. * @param latLng {ILatLng}
  1979. */
  1980. setPosition(latLng: ILatLng): void;
  1981. /**
  1982. * Returns the marker position.
  1983. * @return {ILatLng}
  1984. */
  1985. getPosition(): ILatLng;
  1986. /**
  1987. * Show the normal infoWindow of the marker.
  1988. */
  1989. showInfoWindow(): void;
  1990. /**
  1991. * Hide the normal infoWindow of the marker.
  1992. */
  1993. hideInfoWindow(): void;
  1994. /**
  1995. * Specify the animation either `DROP` or `BOUNCE`
  1996. * @param animation {string}
  1997. */
  1998. setAnimation(animation: string): void;
  1999. /**
  2000. * Set true if you **do not want** to move the map when you click on the marker.
  2001. * @param disableAutoPan {boolean}
  2002. */
  2003. setDisableAutoPan(disableAutoPan: boolean): void;
  2004. /**
  2005. * Set false if you want to hide the marker.
  2006. * @param visible
  2007. */
  2008. setVisible(visible: boolean): void;
  2009. /**
  2010. * Returns true if the marker is visible
  2011. */
  2012. isVisible(): boolean;
  2013. /**
  2014. * Changes title of the normal infoWindow.
  2015. * @param title {string}
  2016. */
  2017. setTitle(title: string): void;
  2018. /**
  2019. * Returns the title strings.
  2020. * @return {string}
  2021. */
  2022. getTitle(): string;
  2023. /**
  2024. * Changes snippet of the normal infoWindow.
  2025. * @param snippet {string}
  2026. */
  2027. setSnippet(snippet: string): void;
  2028. /**
  2029. * Returns the snippet strings.
  2030. * @return {string}
  2031. */
  2032. getSnippet(): string;
  2033. /**
  2034. * Changes the marker opacity from 0.0 to 1.0.
  2035. * @param alpha {number} Opacity
  2036. */
  2037. setOpacity(alpha: number): void;
  2038. /**
  2039. * Returns the marker opacity.
  2040. * @return {number} Opacity
  2041. */
  2042. getOpacity(): number;
  2043. /**
  2044. * Remove the marker.
  2045. */
  2046. remove(): void;
  2047. /**
  2048. * Changes the info window anchor. This defaults to 50% from the left of the image and at the bottom of the image.
  2049. * @param x {number} Distance from left of the icon image in pixels.
  2050. * @param y {number} Distance from top of the icon image in pixels.
  2051. */
  2052. setIconAnchor(x: number, y: number): void;
  2053. /**
  2054. * Changes the info window anchor. This defaults to 50% from the left of the image and at the top of the image.
  2055. * @param x {number} Distance from left of the icon image in pixels.
  2056. * @param y {number} Distance from top of the icon image in pixels.
  2057. */
  2058. setInfoWindowAnchor(x: number, y: number): void;
  2059. /**
  2060. * Returns true if the infoWindow is shown on the marker
  2061. * @return {boolean}
  2062. */
  2063. isInfoWindowShown(): boolean;
  2064. /**
  2065. * Higher zIndex value overlays will be drawn on top of lower zIndex value tile layers and overlays.
  2066. * @param y {number} z-index
  2067. */
  2068. setZIndex(zIndex: number): void;
  2069. /**
  2070. * Get z-index
  2071. * @return {number}
  2072. */
  2073. getZIndex(): number;
  2074. /**
  2075. * Set true if you allow all users to drag the marker.
  2076. * @param draggable {boolean}
  2077. */
  2078. setDraggable(draggable: boolean): void;
  2079. /**
  2080. * Returns true if the marker drag is enabled.
  2081. * @return {boolean}
  2082. */
  2083. isDraggable(): boolean;
  2084. /**
  2085. * Set true if you want to be flat marker.
  2086. * @param flat {boolean}
  2087. */
  2088. setFlat(flat: boolean): void;
  2089. /**
  2090. * Changes icon url and/or size
  2091. * @param icon
  2092. */
  2093. setIcon(icon: MarkerIcon): void;
  2094. /**
  2095. * Set the marker rotation angle.
  2096. * @param rotation {number}
  2097. */
  2098. setRotation(rotation: number): void;
  2099. /**
  2100. * Returns the marker rotation angle.
  2101. * @return {number}
  2102. */
  2103. getRotation(): number;
  2104. }
  2105. /**
  2106. * @hidden
  2107. */
  2108. export declare class MarkerCluster extends BaseClass {
  2109. private _map;
  2110. constructor(_map: GoogleMap, _objectInstance: any);
  2111. /**
  2112. * Returns the ID of instance.
  2113. * @return {string}
  2114. */
  2115. getId(): string;
  2116. /**
  2117. * Add one marker location
  2118. * @param marker {MarkerOptions} one location
  2119. * @param skipRedraw? {boolean} marker cluster does not redraw the marker cluster if true.
  2120. */
  2121. addMarker(marker: MarkerOptions, skipRedraw?: boolean): void;
  2122. /**
  2123. * Add marker locations
  2124. * @param markers {MarkerOptions[]} multiple location
  2125. */
  2126. addMarkers(markers: MarkerOptions[]): void;
  2127. /**
  2128. * Remove the marker cluster
  2129. */
  2130. remove(): void;
  2131. /**
  2132. * Returns the map instance.
  2133. * @return {GoogleMap}
  2134. */
  2135. getMap(): GoogleMap;
  2136. }
  2137. /**
  2138. * @hidden
  2139. */
  2140. export declare class Polygon extends BaseClass {
  2141. private _map;
  2142. constructor(_map: GoogleMap, _objectInstance: any);
  2143. /**
  2144. * Returns the ID of instance.
  2145. * @return {string}
  2146. */
  2147. getId(): string;
  2148. /**
  2149. * Returns the map instance.
  2150. * @return {GoogleMap}
  2151. */
  2152. getMap(): GoogleMap;
  2153. /**
  2154. * Changes the polygon points.
  2155. * @param points {ILatLng[]}
  2156. */
  2157. setPoints(points: ILatLng[]): void;
  2158. /**
  2159. * Returns an instance of the BaseArrayClass.
  2160. * You can modify the points.
  2161. * @return {BaseArrayClass<ILatLng>}
  2162. */
  2163. getPoints(): BaseArrayClass<ILatLng>;
  2164. /**
  2165. * Changes the polygon holes.
  2166. * @param holes {ILatLng[][]}
  2167. */
  2168. setHoles(holes: ILatLng[][]): void;
  2169. /**
  2170. * Returns an instance of the BaseArrayClass.
  2171. * You can modify the holes.
  2172. * @return {BaseArrayClass<ILatLng[]>}
  2173. */
  2174. getHoles(): BaseArrayClass<ILatLng[]>;
  2175. /**
  2176. * Changes the filling color (inner color)
  2177. * @param fillColor {string}
  2178. */
  2179. setFillColor(fillColor: string): void;
  2180. /**
  2181. * Returns the current polygon filling color (inner color).
  2182. * @return {string}
  2183. */
  2184. getFillColor(): string;
  2185. /**
  2186. * Changes the stroke color (outer color)
  2187. * @param strokeColor {string}
  2188. */
  2189. setStrokeColor(strokeColor: string): void;
  2190. /**
  2191. * Returns the current polygon stroke color (outer color)
  2192. * @return {string}
  2193. */
  2194. getStrokeColor(): string;
  2195. /**
  2196. * Changes click-ability of the polygon
  2197. * @param clickable {boolean}
  2198. */
  2199. setClickable(clickable: boolean): void;
  2200. /**
  2201. * Returns true if the polygon is clickable
  2202. */
  2203. getClickable(): boolean;
  2204. /**
  2205. * Changes visibility of the polygon
  2206. * @param visible {boolean}
  2207. */
  2208. setVisible(visible: boolean): void;
  2209. /**
  2210. * Returns true if the polygon is visible
  2211. * @return {boolean}
  2212. */
  2213. getVisible(): boolean;
  2214. /**
  2215. * Changes the polygon zIndex order.
  2216. * @param zIndex {number}
  2217. */
  2218. setZIndex(zIndex: number): void;
  2219. /**
  2220. * Returns the current polygon zIndex
  2221. * @return {number}
  2222. */
  2223. getZIndex(): number;
  2224. /**
  2225. * Remove the polygon.
  2226. */
  2227. remove(): void;
  2228. /**
  2229. * Changes the polygon stroke width
  2230. */
  2231. setStrokeWidth(strokeWidth: number): void;
  2232. /**
  2233. * Returns the polygon stroke width
  2234. */
  2235. getStrokeWidth(): number;
  2236. /**
  2237. * When true, edges of the polygon are interpreted as geodesic and will follow the curvature of the Earth.
  2238. * @param geodesic {boolean}
  2239. */
  2240. setGeodesic(geodesic: boolean): void;
  2241. /**
  2242. * Returns true if the polygon is geodesic.
  2243. * @return {boolean}
  2244. */
  2245. getGeodesic(): boolean;
  2246. }
  2247. /**
  2248. * @hidden
  2249. */
  2250. export declare class Polyline extends BaseClass {
  2251. private _map;
  2252. constructor(_map: GoogleMap, _objectInstance: any);
  2253. /**
  2254. * Returns the ID of instance.
  2255. * @return {string}
  2256. */
  2257. getId(): string;
  2258. /**
  2259. * Returns the map instance.
  2260. * @return {GoogleMap}
  2261. */
  2262. getMap(): GoogleMap;
  2263. /**
  2264. * Changes the polyline points.
  2265. * @param points {ILatLng[]}
  2266. */
  2267. setPoints(points: ILatLng[]): void;
  2268. /**
  2269. * Returns an instance of the BaseArrayClass
  2270. * You can modify the points.
  2271. * @return {BaseArrayClass<ILatLng>}
  2272. */
  2273. getPoints(): BaseArrayClass<ILatLng>;
  2274. /**
  2275. * When true, edges of the polyline are interpreted as geodesic and will follow the curvature of the Earth.
  2276. * @param geoDesic {boolean}
  2277. */
  2278. setGeoDesic(geoDesic: boolean): void;
  2279. /**
  2280. * Returns true if the polyline is geodesic
  2281. */
  2282. getGeodesic(): boolean;
  2283. /**
  2284. * Changes visibility of the polyline
  2285. * @param visible {boolean}
  2286. */
  2287. setVisible(visible: boolean): void;
  2288. /**
  2289. * Returns true if the polyline is visible
  2290. * @return {boolean}
  2291. */
  2292. getVisible(): boolean;
  2293. /**
  2294. * Changes click-ability of the polyline
  2295. * @param clickable {boolean}
  2296. */
  2297. setClickable(clickable: boolean): void;
  2298. /**
  2299. * Returns true if the polyline is clickable
  2300. * @return {boolean}
  2301. */
  2302. getClickable(): boolean;
  2303. /**
  2304. * Changes the polyline color
  2305. * @param strokeColor {string}
  2306. */
  2307. setStrokeColor(strokeColor: string): void;
  2308. /**
  2309. * Returns the current polyline color
  2310. * @return {string}
  2311. */
  2312. getStrokeColor(): string;
  2313. /**
  2314. * Changes the polyline stroke width
  2315. * @param strokeWidth {number}
  2316. */
  2317. setStrokeWidth(strokeWidth: number): void;
  2318. /**
  2319. * Returns the current stroke width (unit: pixel).
  2320. * @return {number}
  2321. */
  2322. getStrokeWidth(): number;
  2323. /**
  2324. * Changes the polyline zIndex order.
  2325. * @param index {number}
  2326. */
  2327. setZIndex(index: number): void;
  2328. /**
  2329. * Returns the current polyline zIndex
  2330. * @return {number}
  2331. */
  2332. getZIndex(): number;
  2333. /**
  2334. * Remove the polyline
  2335. */
  2336. remove(): void;
  2337. }
  2338. /**
  2339. * @hidden
  2340. */
  2341. export declare class TileOverlay extends BaseClass {
  2342. private _map;
  2343. constructor(_map: GoogleMap, _objectInstance: any);
  2344. /**
  2345. * Returns the ID of instance.
  2346. * @return {string}
  2347. */
  2348. getId(): string;
  2349. /**
  2350. * Returns the map instance.
  2351. * @return {GoogleMap}
  2352. */
  2353. getMap(): GoogleMap;
  2354. /**
  2355. * Set whether the tiles should fade in.
  2356. * @param fadeIn {boolean}
  2357. */
  2358. setFadeIn(fadeIn: boolean): void;
  2359. /**
  2360. * Get whether the tiles should fade in
  2361. * @return {boolean}
  2362. */
  2363. getFadeIn(): boolean;
  2364. /**
  2365. * Set the zIndex of the tile overlay
  2366. * @param zIndex {number}
  2367. */
  2368. setZIndex(zIndex: number): void;
  2369. /**
  2370. * Returns the zIndex of the tile overlay
  2371. * @return {number}
  2372. */
  2373. getZIndex(): number;
  2374. /**
  2375. * Set the opacity of the tile overlay
  2376. * @param opacity {number}
  2377. */
  2378. setOpacity(opacity: number): void;
  2379. /**
  2380. * Returns the opacity of the tile overlay
  2381. * @return {number}
  2382. */
  2383. getOpacity(): number;
  2384. /**
  2385. * Set false if you want to hide
  2386. * @param visible {boolean}
  2387. */
  2388. setVisible(visible: boolean): void;
  2389. /**
  2390. * Returns true if the tile overlay is visible
  2391. * @return {boolean}
  2392. */
  2393. getVisible(): boolean;
  2394. /**
  2395. * Get tile size
  2396. */
  2397. getTileSize(): any;
  2398. /**
  2399. * Remove the tile overlay
  2400. */
  2401. remove(): void;
  2402. }
  2403. /**
  2404. * @hidden
  2405. */
  2406. export declare class KmlOverlay extends BaseClass {
  2407. private _map;
  2408. constructor(_map: GoogleMap, _objectInstance: any);
  2409. /**
  2410. * Returns the viewport to contains all overlays
  2411. */
  2412. getDefaultViewport(): CameraPosition<ILatLng | ILatLng[]>;
  2413. /**
  2414. * Returns the ID of instance.
  2415. * @return {string}
  2416. */
  2417. getId(): string;
  2418. /**
  2419. * Returns the map instance.
  2420. * @return {GoogleMap}
  2421. */
  2422. getMap(): GoogleMap;
  2423. /**
  2424. * Changes visibility of the kml overlay
  2425. * @param visible {boolean}
  2426. */
  2427. setVisible(visible: boolean): void;
  2428. /**
  2429. * Returns true if the kml overlay is visible
  2430. * @return {boolean}
  2431. */
  2432. getVisible(): boolean;
  2433. /**
  2434. * Changes click-ability of the KmlOverlay
  2435. * @param clickable {boolean}
  2436. */
  2437. setClickable(clickable: boolean): void;
  2438. /**
  2439. * Returns true if the KmlOverlay is clickable
  2440. * @return {boolean}
  2441. */
  2442. getClickable(): boolean;
  2443. /**
  2444. * Remove the KmlOverlay
  2445. */
  2446. remove(): void;
  2447. }