12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133
  1. var __extends = (this && this.__extends) || (function () {
  2. var extendStatics = Object.setPrototypeOf ||
  3. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  4. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  5. return function (d, b) {
  6. extendStatics(d, b);
  7. function __() { this.constructor = d; }
  8. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  9. };
  10. })();
  11. var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
  12. var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  13. if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  14. else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  15. return c > 3 && r && Object.defineProperty(target, key, r), r;
  16. };
  17. var __metadata = (this && this.__metadata) || function (k, v) {
  18. if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
  19. };
  20. import { Injectable } from '@angular/core';
  21. import { CordovaCheck, CordovaInstance, Plugin, InstanceProperty, InstanceCheck, checkAvailability, IonicNativePlugin } from '@ionic-native/core';
  22. import { Observable } from 'rxjs/Observable';
  23. import 'rxjs/add/observable/fromEvent';
  24. /**
  25. * @hidden
  26. */
  27. var LatLng = (function () {
  28. function LatLng(lat, lng) {
  29. this.lat = lat;
  30. this.lng = lng;
  31. }
  32. LatLng.prototype.equals = function (other) {
  33. return this.lat === other.lat && this.lng === other.lng;
  34. };
  35. LatLng.prototype.toString = function () {
  36. return this.lat + ',' + this.lng;
  37. };
  38. LatLng.prototype.toUrlValue = function (precision) {
  39. precision = precision || 6;
  40. return this.lat.toFixed(precision) + ',' + this.lng.toFixed(precision);
  41. };
  42. return LatLng;
  43. }());
  44. export { LatLng };
  45. /**
  46. * @hidden
  47. */
  48. var LatLngBounds = (function () {
  49. function LatLngBounds(points) {
  50. this._objectInstance = new (GoogleMaps.getPlugin()).LatLngBounds(points);
  51. }
  52. /**
  53. * Converts to string
  54. * @return {string}
  55. */
  56. LatLngBounds.prototype.toString = function () { return; };
  57. /**
  58. * 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.
  59. * @param precision {number}
  60. * @return {string}
  61. */
  62. LatLngBounds.prototype.toUrlValue = function (precision) { return; };
  63. /**
  64. * Extends this bounds to contain the given point.
  65. * @param LatLng {ILatLng}
  66. */
  67. LatLngBounds.prototype.extend = function (latLng) { };
  68. /**
  69. * Returns true if the given lat/lng is in this bounds.
  70. * @param LatLng {ILatLng}
  71. */
  72. LatLngBounds.prototype.contains = function (LatLng) { return; };
  73. /**
  74. * Computes the center of this LatLngBounds
  75. * @return {LatLng}
  76. */
  77. LatLngBounds.prototype.getCenter = function () { return; };
  78. __decorate([
  79. InstanceProperty,
  80. __metadata("design:type", Object)
  81. ], LatLngBounds.prototype, "northeast", void 0);
  82. __decorate([
  83. InstanceProperty,
  84. __metadata("design:type", Object)
  85. ], LatLngBounds.prototype, "southwest", void 0);
  86. __decorate([
  87. InstanceProperty,
  88. __metadata("design:type", String)
  89. ], LatLngBounds.prototype, "type", void 0);
  90. __decorate([
  91. CordovaInstance({ sync: true }),
  92. __metadata("design:type", Function),
  93. __metadata("design:paramtypes", []),
  94. __metadata("design:returntype", String)
  95. ], LatLngBounds.prototype, "toString", null);
  96. __decorate([
  97. CordovaInstance({ sync: true }),
  98. __metadata("design:type", Function),
  99. __metadata("design:paramtypes", [Number]),
  100. __metadata("design:returntype", String)
  101. ], LatLngBounds.prototype, "toUrlValue", null);
  102. __decorate([
  103. CordovaInstance({ sync: true }),
  104. __metadata("design:type", Function),
  105. __metadata("design:paramtypes", [Object]),
  106. __metadata("design:returntype", void 0)
  107. ], LatLngBounds.prototype, "extend", null);
  108. __decorate([
  109. CordovaInstance({ sync: true }),
  110. __metadata("design:type", Function),
  111. __metadata("design:paramtypes", [Object]),
  112. __metadata("design:returntype", Boolean)
  113. ], LatLngBounds.prototype, "contains", null);
  114. __decorate([
  115. CordovaInstance({ sync: true }),
  116. __metadata("design:type", Function),
  117. __metadata("design:paramtypes", []),
  118. __metadata("design:returntype", LatLng)
  119. ], LatLngBounds.prototype, "getCenter", null);
  120. return LatLngBounds;
  121. }());
  122. export { LatLngBounds };
  123. /**
  124. * @hidden
  125. */
  126. var VisibleRegion = (function () {
  127. function VisibleRegion(southwest, northeast, farLeft, farRight, nearLeft, nearRight) {
  128. this._objectInstance = new (GoogleMaps.getPlugin()).VisibleRegion(southwest, northeast, farLeft, farRight, nearLeft, nearRight);
  129. }
  130. /**
  131. * Converts to string
  132. * @return {string}
  133. */
  134. VisibleRegion.prototype.toString = function () { return; };
  135. /**
  136. * 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.
  137. * @param precision {number}
  138. * @return {string}
  139. */
  140. VisibleRegion.prototype.toUrlValue = function (precision) { return; };
  141. /**
  142. * Returns true if the given lat/lng is in this bounds.
  143. * @param LatLng {ILatLng}
  144. */
  145. VisibleRegion.prototype.contains = function (LatLng) { return; };
  146. __decorate([
  147. InstanceProperty,
  148. __metadata("design:type", Object)
  149. ], VisibleRegion.prototype, "northeast", void 0);
  150. __decorate([
  151. InstanceProperty,
  152. __metadata("design:type", Object)
  153. ], VisibleRegion.prototype, "southwest", void 0);
  154. __decorate([
  155. InstanceProperty,
  156. __metadata("design:type", Object)
  157. ], VisibleRegion.prototype, "farLeft", void 0);
  158. __decorate([
  159. InstanceProperty,
  160. __metadata("design:type", Object)
  161. ], VisibleRegion.prototype, "farRight", void 0);
  162. __decorate([
  163. InstanceProperty,
  164. __metadata("design:type", Object)
  165. ], VisibleRegion.prototype, "nearLeft", void 0);
  166. __decorate([
  167. InstanceProperty,
  168. __metadata("design:type", Object)
  169. ], VisibleRegion.prototype, "nearRight", void 0);
  170. __decorate([
  171. InstanceProperty,
  172. __metadata("design:type", String)
  173. ], VisibleRegion.prototype, "type", void 0);
  174. __decorate([
  175. CordovaInstance({ sync: true }),
  176. __metadata("design:type", Function),
  177. __metadata("design:paramtypes", []),
  178. __metadata("design:returntype", String)
  179. ], VisibleRegion.prototype, "toString", null);
  180. __decorate([
  181. CordovaInstance({ sync: true }),
  182. __metadata("design:type", Function),
  183. __metadata("design:paramtypes", [Number]),
  184. __metadata("design:returntype", String)
  185. ], VisibleRegion.prototype, "toUrlValue", null);
  186. __decorate([
  187. CordovaInstance({ sync: true }),
  188. __metadata("design:type", Function),
  189. __metadata("design:paramtypes", [Object]),
  190. __metadata("design:returntype", Boolean)
  191. ], VisibleRegion.prototype, "contains", null);
  192. return VisibleRegion;
  193. }());
  194. export { VisibleRegion };
  195. /**
  196. * @hidden
  197. */
  198. export var StreetViewSource = {
  199. DEFAULT: 'DEFAULT',
  200. OUTDOOR: 'OUTDOOR'
  201. };
  202. /**
  203. * @hidden
  204. * You can listen to these events where appropriate
  205. */
  206. export var GoogleMapsEvent = {
  207. MAP_READY: 'map_ready',
  208. MAP_CLICK: 'map_click',
  209. MAP_LONG_CLICK: 'map_long_click',
  210. POI_CLICK: 'poi_click',
  211. MY_LOCATION_CLICK: 'my_location_click',
  212. MY_LOCATION_BUTTON_CLICK: 'my_location_button_click',
  213. INDOOR_BUILDING_FOCUSED: 'indoor_building_focused',
  214. INDOOR_LEVEL_ACTIVATED: 'indoor_level_activated',
  215. CAMERA_MOVE_START: 'camera_move_start',
  216. CAMERA_MOVE: 'camera_move',
  217. CAMERA_MOVE_END: 'camera_move_end',
  218. OVERLAY_CLICK: 'overlay_click',
  219. POLYGON_CLICK: 'polygon_click',
  220. POLYLINE_CLICK: 'polyline_click',
  221. CIRCLE_CLICK: 'circle_click',
  222. GROUND_OVERLAY_CLICK: 'groundoverlay_click',
  223. INFO_CLICK: 'info_click',
  224. INFO_LONG_CLICK: 'info_long_click',
  225. INFO_CLOSE: 'info_close',
  226. INFO_OPEN: 'info_open',
  227. MARKER_CLICK: 'marker_click',
  228. MARKER_DRAG: 'marker_drag',
  229. MARKER_DRAG_START: 'marker_drag_start',
  230. MARKER_DRAG_END: 'marker_drag_end',
  231. MAP_DRAG: 'map_drag',
  232. MAP_DRAG_START: 'map_drag_start',
  233. MAP_DRAG_END: 'map_drag_end',
  234. KML_CLICK: 'kml_click',
  235. PANORAMA_READY: 'panorama_ready',
  236. PANORAMA_CAMERA_CHANGE: 'panorama_camera_change',
  237. PANORAMA_LOCATION_CHANGE: 'panorama_location_change',
  238. PANORAMA_CLICK: 'panorama_click'
  239. };
  240. /**
  241. * @hidden
  242. */
  243. export var GoogleMapsAnimation = {
  244. BOUNCE: 'BOUNCE',
  245. DROP: 'DROP'
  246. };
  247. /**
  248. * @hidden
  249. */
  250. export var GoogleMapsMapTypeId = {
  251. NORMAL: 'MAP_TYPE_NORMAL',
  252. ROADMAP: 'MAP_TYPE_ROADMAP',
  253. SATELLITE: 'MAP_TYPE_SATELLITE',
  254. HYBRID: 'MAP_TYPE_HYBRID',
  255. TERRAIN: 'MAP_TYPE_TERRAIN',
  256. NONE: 'MAP_TYPE_NONE'
  257. };
  258. /**
  259. * @name Google Maps
  260. * @description
  261. * This plugin uses the native Google Maps SDK
  262. * 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
  263. * @usage
  264. * ```typescript
  265. * import {
  266. * GoogleMaps,
  267. * GoogleMap,
  268. * GoogleMapsEvent,
  269. * GoogleMapOptions,
  270. * CameraPosition,
  271. * MarkerOptions,
  272. * Marker
  273. * } from '@ionic-native/google-maps';
  274. * import { Component } from "@angular/core/";
  275. *
  276. * @Component({
  277. * selector: 'page-home',
  278. * templateUrl: 'home.html'
  279. * })
  280. * export class HomePage {
  281. * map: GoogleMap;
  282. * constructor() { }
  283. *
  284. * ionViewDidLoad() {
  285. * this.loadMap();
  286. * }
  287. *
  288. * loadMap() {
  289. *
  290. * let mapOptions: GoogleMapOptions = {
  291. * camera: {
  292. * target: {
  293. * lat: 43.0741904,
  294. * lng: -89.3809802
  295. * },
  296. * zoom: 18,
  297. * tilt: 30
  298. * }
  299. * };
  300. *
  301. * this.map = GoogleMaps.create('map_canvas', mapOptions);
  302. *
  303. * // Wait the MAP_READY before using any methods.
  304. * this.map.one(GoogleMapsEvent.MAP_READY)
  305. * .then(() => {
  306. * console.log('Map is ready!');
  307. *
  308. * // Now you can use all methods safely.
  309. * this.map.addMarker({
  310. * title: 'Ionic',
  311. * icon: 'blue',
  312. * animation: 'DROP',
  313. * position: {
  314. * lat: 43.0741904,
  315. * lng: -89.3809802
  316. * }
  317. * })
  318. * .then(marker => {
  319. * marker.on(GoogleMapsEvent.MARKER_CLICK)
  320. * .subscribe(() => {
  321. * alert('clicked');
  322. * });
  323. * });
  324. *
  325. * });
  326. * }
  327. * }
  328. *
  329. * ```
  330. * @classes
  331. * GoogleMap
  332. * Circle
  333. * Encoding
  334. * Environment
  335. * Geocoder
  336. * GroundOverlay
  337. * HtmlInfoWindow
  338. * Geocoder
  339. * LatLng
  340. * LatLngBounds
  341. * Marker
  342. * MarkerCluster
  343. * Polygon
  344. * Polyline
  345. * Spherical
  346. * KmlOverlay
  347. * Poly
  348. * TileOverlay
  349. * BaseClass
  350. * BaseArrayClass
  351. * @interfaces
  352. * GoogleMapOptions
  353. * CameraPosition
  354. * CircleOptions
  355. * GeocoderRequest
  356. * GeocoderResult
  357. * GroundOverlayOptions
  358. * ILatLng
  359. * MarkerIcon
  360. * MarkerOptions
  361. * MarkerClusterIcon
  362. * MarkerClusterOptions
  363. * MyLocation
  364. * MyLocationOptions
  365. * PolygonOptions
  366. * PolylineOptions
  367. * TileOverlayOptions
  368. * KmlOverlayOptions
  369. * VisibleRegion
  370. */
  371. var GoogleMaps = (function (_super) {
  372. __extends(GoogleMaps, _super);
  373. function GoogleMaps() {
  374. return _super !== null && _super.apply(this, arguments) || this;
  375. }
  376. GoogleMaps_1 = GoogleMaps;
  377. /**
  378. * Creates a new GoogleMap instance
  379. * @param element {string | HTMLElement} Element ID or reference to attach the map to
  380. * @param options {GoogleMapOptions} [options] Options
  381. * @return {GoogleMap}
  382. */
  383. GoogleMaps.create = function (element, options) {
  384. if (element instanceof HTMLElement) {
  385. if (element.getAttribute('__pluginMapId')) {
  386. console.error('GoogleMaps', element.tagName + '[__pluginMapId=\'' + element.getAttribute('__pluginMapId') + '\'] has already map.');
  387. return;
  388. }
  389. }
  390. else if (typeof element === 'object') {
  391. options = element;
  392. element = null;
  393. }
  394. var googleMap = new GoogleMap(element, options);
  395. googleMap.set('_overlays', {});
  396. return googleMap;
  397. };
  398. /**
  399. * @deprecation
  400. * @hidden
  401. */
  402. GoogleMaps.prototype.create = function (element, options) {
  403. console.error('GoogleMaps', '[deprecated] Please use GoogleMaps.create()');
  404. return GoogleMaps_1.create(element, options);
  405. };
  406. /**
  407. * Creates a new StreetView instance
  408. * @param element {string | HTMLElement} Element ID or reference to attach the map to
  409. * @param options {StreetViewOptions} [options] Options
  410. * @return {StreetViewPanorama}
  411. */
  412. GoogleMaps.createPanorama = function (element, options) {
  413. if (element instanceof HTMLElement) {
  414. if (element.getAttribute('__pluginMapId')) {
  415. console.error('GoogleMaps', element.tagName + '[__pluginMapId=\'' + element.getAttribute('__pluginMapId') + '\'] has already map.');
  416. return;
  417. }
  418. }
  419. return new StreetViewPanorama(element, options);
  420. };
  421. GoogleMaps.decorators = [
  422. { type: Injectable },
  423. ];
  424. /** @nocollapse */
  425. GoogleMaps.ctorParameters = function () { return []; };
  426. GoogleMaps = GoogleMaps_1 = __decorate([
  427. Plugin({
  428. pluginName: 'GoogleMaps',
  429. pluginRef: 'plugin.google.maps',
  430. plugin: 'cordova-plugin-googlemaps',
  431. repo: 'https://github.com/mapsplugin/cordova-plugin-googlemaps',
  432. document: 'https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v2.0.0/README.md',
  433. install: 'ionic cordova plugin add cordova-plugin-googlemaps --variable API_KEY_FOR_ANDROID="YOUR_ANDROID_API_KEY_IS_HERE" --variable API_KEY_FOR_IOS="YOUR_IOS_API_KEY_IS_HERE"',
  434. installVariables: ['API_KEY_FOR_ANDROID', 'API_KEY_FOR_IOS'],
  435. platforms: ['Android', 'iOS']
  436. })
  437. ], GoogleMaps);
  438. return GoogleMaps;
  439. var GoogleMaps_1;
  440. }(IonicNativePlugin));
  441. export { GoogleMaps };
  442. /**
  443. * @hidden
  444. * https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v2.0.0/class/BaseClass/README.md
  445. */
  446. var BaseClass = (function () {
  447. function BaseClass() {
  448. }
  449. /**
  450. * Adds an event listener.
  451. * @param eventName {string} event name you want to observe.
  452. * @return {Observable<any>}
  453. */
  454. BaseClass.prototype.addEventListener = function (eventName) {
  455. var _this = this;
  456. return new Observable(function (observer) {
  457. _this._objectInstance.on(eventName, function () {
  458. var args = [];
  459. for (var _i = 0; _i < arguments.length; _i++) {
  460. args[_i] = arguments[_i];
  461. }
  462. if (args[args.length - 1] instanceof GoogleMaps.getPlugin().BaseClass) {
  463. if (args[args.length - 1].type === 'Map' || args[args.length - 1].type === 'StreetViewPanorama') {
  464. args[args.length - 1] = _this;
  465. }
  466. else if (_this instanceof MarkerCluster) {
  467. var overlay = _this.get(args[args.length - 1].getId());
  468. if (!overlay) {
  469. var markerJS = args[args.length - 1];
  470. var markerId_1 = markerJS.getId();
  471. var markerCluster = _this;
  472. overlay = new Marker(markerCluster.getMap(), markerJS);
  473. _this.get('_overlays')[markerId_1] = overlay;
  474. markerJS.one(markerJS.getId() + '_remove', function () {
  475. _this.get('_overlays')[markerId_1] = null;
  476. });
  477. }
  478. args[args.length - 1] = overlay;
  479. }
  480. else {
  481. args[args.length - 1] = _this._objectInstance.getMap().get('_overlays')[args[args.length - 1].getId()];
  482. }
  483. }
  484. observer.next(args);
  485. });
  486. });
  487. };
  488. /**
  489. * Adds an event listener that works once.
  490. * @param eventName {string} event name you want to observe.
  491. * @return {Promise<any>}
  492. */
  493. BaseClass.prototype.addListenerOnce = function (eventName) {
  494. var _this = this;
  495. return new Promise(function (resolve) {
  496. _this._objectInstance.one(eventName, function () {
  497. var args = [];
  498. for (var _i = 0; _i < arguments.length; _i++) {
  499. args[_i] = arguments[_i];
  500. }
  501. if (args[args.length - 1] instanceof GoogleMaps.getPlugin().BaseClass) {
  502. if (args[args.length - 1].type === 'Map' || args[args.length - 1].type === 'StreetViewPanorama') {
  503. args[args.length - 1] = _this;
  504. }
  505. else if (_this instanceof MarkerCluster) {
  506. var overlay = _this.get(args[args.length - 1].getId());
  507. if (!overlay) {
  508. var markerJS = args[args.length - 1];
  509. var markerId_2 = markerJS.getId();
  510. var markerCluster = _this;
  511. overlay = new Marker(markerCluster.getMap(), markerJS);
  512. _this.get('_overlays')[markerId_2] = overlay;
  513. markerJS.one(markerJS.getId() + '_remove', function () {
  514. _this.get('_overlays')[markerId_2] = null;
  515. });
  516. }
  517. args[args.length - 1] = overlay;
  518. }
  519. else {
  520. args[args.length - 1] = _this._objectInstance.getMap().get('_overlays')[args[args.length - 1].getId()];
  521. }
  522. }
  523. resolve(args);
  524. });
  525. });
  526. };
  527. /**
  528. * Gets a value
  529. * @param key {any}
  530. */
  531. BaseClass.prototype.get = function (key) { return; };
  532. /**
  533. * Sets a value
  534. * @param key {string} The key name for the value. `(key)_changed` will be fired when you set value through this method.
  535. * @param value {any}
  536. * @param noNotify {boolean} [options] True if you want to prevent firing the `(key)_changed` event.
  537. */
  538. BaseClass.prototype.set = function (key, value, noNotify) { };
  539. /**
  540. * Bind a key to another object
  541. * @param key {string} The property name you want to observe.
  542. * @param target {any} The target object you want to observe.
  543. * @param targetKey? {string} [options] The property name you want to observe. If you omit this, the `key` argument is used.
  544. * @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.
  545. */
  546. BaseClass.prototype.bindTo = function (key, target, targetKey, noNotify) { };
  547. /**
  548. * Alias of `addEventListener`
  549. * @param key {string} The property name you want to observe.
  550. * @return {Observable<any>}
  551. */
  552. BaseClass.prototype.on = function (eventName) {
  553. var _this = this;
  554. return new Observable(function (observer) {
  555. _this._objectInstance.on(eventName, function () {
  556. var args = [];
  557. for (var _i = 0; _i < arguments.length; _i++) {
  558. args[_i] = arguments[_i];
  559. }
  560. if (args[args.length - 1] instanceof GoogleMaps.getPlugin().BaseClass) {
  561. if (args[args.length - 1].type === 'Map' || args[args.length - 1].type === 'StreetViewPanorama') {
  562. args[args.length - 1] = _this;
  563. }
  564. else if (_this instanceof MarkerCluster) {
  565. var overlay = _this.get(args[args.length - 1].getId());
  566. if (!overlay) {
  567. var markerJS = args[args.length - 1];
  568. var markerId_3 = markerJS.getId();
  569. var markerCluster = _this;
  570. overlay = new Marker(markerCluster.getMap(), markerJS);
  571. _this.get('_overlays')[markerId_3] = overlay;
  572. markerJS.one(markerJS.getId() + '_remove', function () {
  573. _this.get('_overlays')[markerId_3] = null;
  574. });
  575. }
  576. args[args.length - 1] = overlay;
  577. }
  578. else {
  579. args[args.length - 1] = _this._objectInstance.getMap().get('_overlays')[args[args.length - 1].getId()];
  580. }
  581. }
  582. observer.next(args);
  583. });
  584. });
  585. };
  586. /**
  587. * Alias of `addEventListenerOnce`
  588. * @param key {string} The property name you want to observe.
  589. * @return {Promise<any>}
  590. */
  591. BaseClass.prototype.one = function (eventName) {
  592. var _this = this;
  593. return new Promise(function (resolve) {
  594. _this._objectInstance.one(eventName, function () {
  595. var args = [];
  596. for (var _i = 0; _i < arguments.length; _i++) {
  597. args[_i] = arguments[_i];
  598. }
  599. if (args[args.length - 1] instanceof GoogleMaps.getPlugin().BaseClass) {
  600. if (args[args.length - 1].type === 'Map' || args[args.length - 1].type === 'StreetViewPanorama') {
  601. args[args.length - 1] = _this;
  602. }
  603. else if (_this instanceof MarkerCluster) {
  604. var overlay = _this.get(args[args.length - 1].getId());
  605. if (!overlay) {
  606. var markerJS = args[args.length - 1];
  607. var markerId_4 = markerJS.getId();
  608. var markerCluster = _this;
  609. overlay = new Marker(markerCluster.getMap(), markerJS);
  610. _this.get('_overlays')[markerId_4] = overlay;
  611. markerJS.one(markerJS.getId() + '_remove', function () {
  612. _this.get('_overlays')[markerId_4] = null;
  613. });
  614. }
  615. args[args.length - 1] = overlay;
  616. }
  617. else {
  618. args[args.length - 1] = _this._objectInstance.getMap().get('_overlays')[args[args.length - 1].getId()];
  619. }
  620. }
  621. resolve(args);
  622. });
  623. });
  624. };
  625. /**
  626. * Clears all stored values
  627. */
  628. BaseClass.prototype.empty = function () { };
  629. /**
  630. * Dispatch event.
  631. * @param eventName {string} Event name
  632. * @param parameters {any} [options] The data you want to pass to event listerners.
  633. */
  634. BaseClass.prototype.trigger = function (eventName) {
  635. var parameters = [];
  636. for (var _i = 1; _i < arguments.length; _i++) {
  637. parameters[_i - 1] = arguments[_i];
  638. }
  639. };
  640. /**
  641. * Executes off() and empty()
  642. */
  643. BaseClass.prototype.destroy = function () {
  644. if (this._objectInstance.type === 'Map') {
  645. var map = this._objectInstance.getMap();
  646. if (map) {
  647. delete this._objectInstance.getMap().get('_overlays')[this._objectInstance.getId()];
  648. }
  649. }
  650. this._objectInstance.remove();
  651. };
  652. /**
  653. * Remove event listener(s)
  654. * The `removeEventListener()` has three usages:
  655. * - removeEventListener("eventName", listenerFunction);
  656. * This removes one particular event listener
  657. * - removeEventListener("eventName");
  658. * This removes the event listeners that added for the event name.
  659. * - removeEventListener();
  660. * This removes all listeners.
  661. *
  662. * @param eventName {string} [options] Event name
  663. * @param listener {Function} [options] Event listener
  664. */
  665. BaseClass.prototype.removeEventListener = function (eventName, listener) { };
  666. /**
  667. * Alias of `removeEventListener`
  668. *
  669. * @param eventName {string} [options] Event name
  670. * @param listener {Function} [options] Event listener
  671. */
  672. BaseClass.prototype.off = function (eventName, listener) { };
  673. __decorate([
  674. InstanceCheck({ observable: true }),
  675. __metadata("design:type", Function),
  676. __metadata("design:paramtypes", [String]),
  677. __metadata("design:returntype", Observable)
  678. ], BaseClass.prototype, "addEventListener", null);
  679. __decorate([
  680. InstanceCheck(),
  681. __metadata("design:type", Function),
  682. __metadata("design:paramtypes", [String]),
  683. __metadata("design:returntype", Promise)
  684. ], BaseClass.prototype, "addListenerOnce", null);
  685. __decorate([
  686. CordovaInstance({ sync: true }),
  687. __metadata("design:type", Function),
  688. __metadata("design:paramtypes", [String]),
  689. __metadata("design:returntype", Object)
  690. ], BaseClass.prototype, "get", null);
  691. __decorate([
  692. CordovaInstance({ sync: true }),
  693. __metadata("design:type", Function),
  694. __metadata("design:paramtypes", [String, Object, Boolean]),
  695. __metadata("design:returntype", void 0)
  696. ], BaseClass.prototype, "set", null);
  697. __decorate([
  698. CordovaInstance({ sync: true }),
  699. __metadata("design:type", Function),
  700. __metadata("design:paramtypes", [String, Object, String, Boolean]),
  701. __metadata("design:returntype", void 0)
  702. ], BaseClass.prototype, "bindTo", null);
  703. __decorate([
  704. InstanceCheck({ observable: true }),
  705. __metadata("design:type", Function),
  706. __metadata("design:paramtypes", [String]),
  707. __metadata("design:returntype", Observable)
  708. ], BaseClass.prototype, "on", null);
  709. __decorate([
  710. InstanceCheck(),
  711. __metadata("design:type", Function),
  712. __metadata("design:paramtypes", [String]),
  713. __metadata("design:returntype", Promise)
  714. ], BaseClass.prototype, "one", null);
  715. __decorate([
  716. CordovaInstance({ sync: true }),
  717. __metadata("design:type", Function),
  718. __metadata("design:paramtypes", []),
  719. __metadata("design:returntype", void 0)
  720. ], BaseClass.prototype, "empty", null);
  721. __decorate([
  722. CordovaInstance({ sync: true }),
  723. __metadata("design:type", Function),
  724. __metadata("design:paramtypes", [String, Object]),
  725. __metadata("design:returntype", void 0)
  726. ], BaseClass.prototype, "trigger", null);
  727. __decorate([
  728. CordovaCheck({ sync: true }),
  729. __metadata("design:type", Function),
  730. __metadata("design:paramtypes", []),
  731. __metadata("design:returntype", void 0)
  732. ], BaseClass.prototype, "destroy", null);
  733. __decorate([
  734. CordovaInstance({ sync: true }),
  735. __metadata("design:type", Function),
  736. __metadata("design:paramtypes", [String, Function]),
  737. __metadata("design:returntype", void 0)
  738. ], BaseClass.prototype, "removeEventListener", null);
  739. __decorate([
  740. CordovaInstance({ sync: true }),
  741. __metadata("design:type", Function),
  742. __metadata("design:paramtypes", [String, Function]),
  743. __metadata("design:returntype", void 0)
  744. ], BaseClass.prototype, "off", null);
  745. BaseClass = __decorate([
  746. Plugin({
  747. plugin: 'cordova-plugin-googlemaps',
  748. pluginName: 'GoogleMaps',
  749. pluginRef: 'plugin.google.maps.BaseClass',
  750. repo: ''
  751. })
  752. ], BaseClass);
  753. return BaseClass;
  754. }());
  755. export { BaseClass };
  756. /**
  757. * @hidden
  758. * https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v2.0.0/class/BaseArrayClass/README.md
  759. */
  760. var BaseArrayClass = (function (_super) {
  761. __extends(BaseArrayClass, _super);
  762. function BaseArrayClass(initialData) {
  763. var _this = _super.call(this) || this;
  764. if (initialData instanceof GoogleMaps.getPlugin().BaseArrayClass) {
  765. _this._objectInstance = initialData;
  766. }
  767. else {
  768. _this._objectInstance = new (GoogleMaps.getPlugin().BaseArrayClass)(initialData);
  769. }
  770. return _this;
  771. }
  772. /**
  773. * Removes all elements from the array.
  774. * @param noNotify? {boolean} [options] Set true to prevent remove_at events.
  775. */
  776. BaseArrayClass.prototype.empty = function (noNotify) { };
  777. /**
  778. * Iterate over each element, calling the provided callback.
  779. * @param fn {Function}
  780. */
  781. BaseArrayClass.prototype.forEach = function (fn) { };
  782. /**
  783. * Iterate over each element, calling the provided callback.
  784. * @param fn {Function}
  785. * @return {Promise<void>}
  786. */
  787. BaseArrayClass.prototype.forEachAsync = function (fn) {
  788. var _this = this;
  789. return new Promise(function (resolve) {
  790. _this._objectInstance.forEachAsync(fn, resolve);
  791. });
  792. };
  793. /**
  794. * Iterate over each element, then Returns a new value.
  795. * Then you can get the results of each callback.
  796. * @param fn {Function}
  797. * @return {Array<Object>} returns a new array with the results
  798. */
  799. BaseArrayClass.prototype.map = function (fn) { return; };
  800. /**
  801. * Iterate over each element, calling the provided callback.
  802. * Then you can get the results of each callback.
  803. * @param fn {Function}
  804. * @param callback {Function}
  805. * @return {Promise<any>} returns a new array with the results
  806. */
  807. BaseArrayClass.prototype.mapAsync = function (fn) {
  808. var _this = this;
  809. return new Promise(function (resolve) {
  810. _this._objectInstance.mapAsync(fn, resolve);
  811. });
  812. };
  813. /**
  814. * Same as `mapAsync`, but keep the execution order
  815. * @param fn {Function}
  816. * @param callback {Function}
  817. * @return {Promise<any>} returns a new array with the results
  818. */
  819. BaseArrayClass.prototype.mapSeries = function (fn) {
  820. var _this = this;
  821. return new Promise(function (resolve) {
  822. _this._objectInstance.mapSeries(fn, resolve);
  823. });
  824. };
  825. /**
  826. * The filter() method creates a new array with all elements that pass the test implemented by the provided function.
  827. * @param fn {Function}
  828. * @return {T[]} returns a new filtered array
  829. */
  830. BaseArrayClass.prototype.filter = function (fn) { return; };
  831. /**
  832. * The filterAsync() method creates a new array with all elements that pass the test implemented by the provided function.
  833. * @param fn {Function}
  834. * @param callback {Function}
  835. * @return {Promise<T[]>} returns a new filtered array
  836. */
  837. BaseArrayClass.prototype.filterAsync = function (fn) {
  838. var _this = this;
  839. return new Promise(function (resolve) {
  840. _this._objectInstance.filterAsync(fn, resolve);
  841. });
  842. };
  843. /**
  844. * Returns a reference to the underlying Array.
  845. * @return {Array<Object>}
  846. */
  847. BaseArrayClass.prototype.getArray = function () { return; };
  848. /**
  849. * Returns the element at the specified index.
  850. * @param index {number}
  851. * @return {Object}
  852. */
  853. BaseArrayClass.prototype.getAt = function (index) { };
  854. /**
  855. * Returns the number of the elements.
  856. * @return {number}
  857. */
  858. BaseArrayClass.prototype.getLength = function () { return; };
  859. /**
  860. * 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.
  861. * @param element {Object}
  862. * @return {number}
  863. */
  864. BaseArrayClass.prototype.indexOf = function (element) { return; };
  865. /**
  866. * The reverse() method reverses an array in place.
  867. */
  868. BaseArrayClass.prototype.reverse = function () { };
  869. /**
  870. * The sort() method sorts the elements of an array in place and returns the array.
  871. */
  872. BaseArrayClass.prototype.sort = function () { };
  873. /**
  874. * Inserts an element at the specified index.
  875. * @param index {number}
  876. * @param element {Object}
  877. * @param noNotify? {boolean} [options] Set true to prevent insert_at event.
  878. * @return {Object}
  879. */
  880. BaseArrayClass.prototype.insertAt = function (index, element, noNotify) { };
  881. /**
  882. * Removes the last element of the array and returns that element.
  883. * @param noNotify? {boolean} [options] Set true to prevent remove_at event.
  884. * @return {Object}
  885. */
  886. BaseArrayClass.prototype.pop = function (noNotify) { return; };
  887. /**
  888. * Adds one element to the end of the array and returns the new length of the array.
  889. * @param element {object}
  890. * @param noNotify? {boolean} Set true to prevent insert_at events.
  891. */
  892. BaseArrayClass.prototype.push = function (element, noNotify) { };
  893. /**
  894. * Removes an element from the specified index.
  895. * @param index {number}
  896. * @param noNotify? {boolean} [options] Set true to prevent remove_at event.
  897. */
  898. BaseArrayClass.prototype.removeAt = function (index, noNotify) { return; };
  899. /**
  900. * Sets an element at the specified index.
  901. * @param index {number}
  902. * @param element {object}
  903. * @param noNotify? {boolean} [options] Set true to prevent set_at event.
  904. */
  905. BaseArrayClass.prototype.setAt = function (index, element, noNotify) { };
  906. __decorate([
  907. CordovaInstance({ sync: true }),
  908. __metadata("design:type", Function),
  909. __metadata("design:paramtypes", [Boolean]),
  910. __metadata("design:returntype", void 0)
  911. ], BaseArrayClass.prototype, "empty", null);
  912. __decorate([
  913. CordovaInstance({ sync: true }),
  914. __metadata("design:type", Function),
  915. __metadata("design:paramtypes", [Function]),
  916. __metadata("design:returntype", void 0)
  917. ], BaseArrayClass.prototype, "forEach", null);
  918. __decorate([
  919. CordovaCheck(),
  920. __metadata("design:type", Function),
  921. __metadata("design:paramtypes", [Function]),
  922. __metadata("design:returntype", Promise)
  923. ], BaseArrayClass.prototype, "forEachAsync", null);
  924. __decorate([
  925. CordovaInstance({ sync: true }),
  926. __metadata("design:type", Function),
  927. __metadata("design:paramtypes", [Function]),
  928. __metadata("design:returntype", Array)
  929. ], BaseArrayClass.prototype, "map", null);
  930. __decorate([
  931. CordovaCheck(),
  932. __metadata("design:type", Function),
  933. __metadata("design:paramtypes", [Function]),
  934. __metadata("design:returntype", Promise)
  935. ], BaseArrayClass.prototype, "mapAsync", null);
  936. __decorate([
  937. CordovaCheck(),
  938. __metadata("design:type", Function),
  939. __metadata("design:paramtypes", [Function]),
  940. __metadata("design:returntype", Promise)
  941. ], BaseArrayClass.prototype, "mapSeries", null);
  942. __decorate([
  943. CordovaInstance({ sync: true }),
  944. __metadata("design:type", Function),
  945. __metadata("design:paramtypes", [Function]),
  946. __metadata("design:returntype", Array)
  947. ], BaseArrayClass.prototype, "filter", null);
  948. __decorate([
  949. CordovaCheck(),
  950. __metadata("design:type", Function),
  951. __metadata("design:paramtypes", [Function]),
  952. __metadata("design:returntype", Promise)
  953. ], BaseArrayClass.prototype, "filterAsync", null);
  954. __decorate([
  955. CordovaInstance({ sync: true }),
  956. __metadata("design:type", Function),
  957. __metadata("design:paramtypes", []),
  958. __metadata("design:returntype", Array)
  959. ], BaseArrayClass.prototype, "getArray", null);
  960. __decorate([
  961. CordovaInstance({ sync: true }),
  962. __metadata("design:type", Function),
  963. __metadata("design:paramtypes", [Number]),
  964. __metadata("design:returntype", Object)
  965. ], BaseArrayClass.prototype, "getAt", null);
  966. __decorate([
  967. CordovaInstance({ sync: true }),
  968. __metadata("design:type", Function),
  969. __metadata("design:paramtypes", []),
  970. __metadata("design:returntype", Number)
  971. ], BaseArrayClass.prototype, "getLength", null);
  972. __decorate([
  973. CordovaInstance({ sync: true }),
  974. __metadata("design:type", Function),
  975. __metadata("design:paramtypes", [Object]),
  976. __metadata("design:returntype", Number)
  977. ], BaseArrayClass.prototype, "indexOf", null);
  978. __decorate([
  979. CordovaInstance({ sync: true }),
  980. __metadata("design:type", Function),
  981. __metadata("design:paramtypes", []),
  982. __metadata("design:returntype", void 0)
  983. ], BaseArrayClass.prototype, "reverse", null);
  984. __decorate([
  985. CordovaInstance({ sync: true }),
  986. __metadata("design:type", Function),
  987. __metadata("design:paramtypes", []),
  988. __metadata("design:returntype", void 0)
  989. ], BaseArrayClass.prototype, "sort", null);
  990. __decorate([
  991. CordovaInstance({ sync: true }),
  992. __metadata("design:type", Function),
  993. __metadata("design:paramtypes", [Number, Object, Boolean]),
  994. __metadata("design:returntype", void 0)
  995. ], BaseArrayClass.prototype, "insertAt", null);
  996. __decorate([
  997. CordovaInstance({ sync: true }),
  998. __metadata("design:type", Function),
  999. __metadata("design:paramtypes", [Boolean]),
  1000. __metadata("design:returntype", Object)
  1001. ], BaseArrayClass.prototype, "pop", null);
  1002. __decorate([
  1003. CordovaInstance({ sync: true }),
  1004. __metadata("design:type", Function),
  1005. __metadata("design:paramtypes", [Object, Boolean]),
  1006. __metadata("design:returntype", void 0)
  1007. ], BaseArrayClass.prototype, "push", null);
  1008. __decorate([
  1009. CordovaInstance({ sync: true }),
  1010. __metadata("design:type", Function),
  1011. __metadata("design:paramtypes", [Number, Boolean]),
  1012. __metadata("design:returntype", Object)
  1013. ], BaseArrayClass.prototype, "removeAt", null);
  1014. __decorate([
  1015. CordovaInstance({ sync: true }),
  1016. __metadata("design:type", Function),
  1017. __metadata("design:paramtypes", [Number, Object, Boolean]),
  1018. __metadata("design:returntype", void 0)
  1019. ], BaseArrayClass.prototype, "setAt", null);
  1020. BaseArrayClass = __decorate([
  1021. Plugin({
  1022. plugin: 'cordova-plugin-googlemaps',
  1023. pluginName: 'GoogleMaps',
  1024. pluginRef: 'plugin.google.maps.BaseArrayClass',
  1025. repo: ''
  1026. }),
  1027. __metadata("design:paramtypes", [Object])
  1028. ], BaseArrayClass);
  1029. return BaseArrayClass;
  1030. }(BaseClass));
  1031. export { BaseArrayClass };
  1032. /**
  1033. * @hidden
  1034. * https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v2.0.0/class/Circle/README.md
  1035. */
  1036. var Circle = (function (_super) {
  1037. __extends(Circle, _super);
  1038. function Circle(_map, _objectInstance) {
  1039. var _this = _super.call(this) || this;
  1040. _this._map = _map;
  1041. _this._objectInstance = _objectInstance;
  1042. return _this;
  1043. }
  1044. /**
  1045. * Returns the ID of instance.
  1046. * @return {string}
  1047. */
  1048. Circle.prototype.getId = function () { return; };
  1049. /**
  1050. * Returns the map instance.
  1051. * @return {GoogleMap}
  1052. */
  1053. Circle.prototype.getMap = function () { return this._map; };
  1054. /**
  1055. * Changes the center position.
  1056. * @param latLng {ILatLng}
  1057. */
  1058. Circle.prototype.setCenter = function (latLng) { };
  1059. /**
  1060. * Returns the current center position
  1061. * @return {ILatLng}
  1062. */
  1063. Circle.prototype.getCenter = function () { return; };
  1064. /**
  1065. * Returns the current circle radius.
  1066. * @return {number}
  1067. */
  1068. Circle.prototype.getRadius = function () { return; };
  1069. /**
  1070. * Changes the circle radius.
  1071. * @param radius {number}
  1072. */
  1073. Circle.prototype.setRadius = function (radius) { };
  1074. /**
  1075. * Changes the filling color (inner color).
  1076. * @param color {string}
  1077. */
  1078. Circle.prototype.setFillColor = function (color) { };
  1079. /**
  1080. * Returns the current circle filling color (inner color).
  1081. * @return {string}
  1082. */
  1083. Circle.prototype.getFillColor = function () { return; };
  1084. /**
  1085. * Changes the stroke width.
  1086. * @param strokeWidth {number}
  1087. */
  1088. Circle.prototype.setStrokeWidth = function (strokeWidth) { };
  1089. /**
  1090. * Returns the current circle stroke width (unit: pixel).
  1091. * @return {number}
  1092. */
  1093. Circle.prototype.getStrokeWidth = function () { return; };
  1094. /**
  1095. * Changes the stroke color (outter color).
  1096. * @param strokeColor {string}
  1097. */
  1098. Circle.prototype.setStrokeColor = function (strokeColor) { };
  1099. /**
  1100. * Returns the current circle stroke color (outer color).
  1101. * @return {string}
  1102. */
  1103. Circle.prototype.getStrokeColor = function () { return; };
  1104. /**
  1105. * Changes click-ability of the circle.
  1106. * @param clickable {boolean}
  1107. */
  1108. Circle.prototype.setClickable = function (clickable) { };
  1109. /**
  1110. * Returns true if the circle is clickable.
  1111. * @return {boolean}
  1112. */
  1113. Circle.prototype.getClickable = function () { return; };
  1114. /**
  1115. * Changes the circle zIndex order.
  1116. * @param zIndex {number}
  1117. */
  1118. Circle.prototype.setZIndex = function (zIndex) { };
  1119. /**
  1120. * Returns the current circle zIndex.
  1121. * @return {number}
  1122. */
  1123. Circle.prototype.getZIndex = function () { return; };
  1124. /**
  1125. * Remove the circle.
  1126. */
  1127. Circle.prototype.remove = function () { };
  1128. /**
  1129. * Returns the latLngBounds (rectangle) that contains the circle.
  1130. * @return {LatLngBounds}
  1131. */
  1132. Circle.prototype.getBounds = function () { return; };
  1133. /**
  1134. * Set circle visibility
  1135. * @param visible {boolean}
  1136. */
  1137. Circle.prototype.setVisible = function (visible) { };
  1138. /**
  1139. * Returns true if the circle is visible.
  1140. * @return {boolean}
  1141. */
  1142. Circle.prototype.getVisible = function () { return; };
  1143. __decorate([
  1144. CordovaInstance({ sync: true }),
  1145. __metadata("design:type", Function),
  1146. __metadata("design:paramtypes", []),
  1147. __metadata("design:returntype", String)
  1148. ], Circle.prototype, "getId", null);
  1149. __decorate([
  1150. CordovaInstance({ sync: true }),
  1151. __metadata("design:type", Function),
  1152. __metadata("design:paramtypes", [Object]),
  1153. __metadata("design:returntype", void 0)
  1154. ], Circle.prototype, "setCenter", null);
  1155. __decorate([
  1156. CordovaInstance({ sync: true }),
  1157. __metadata("design:type", Function),
  1158. __metadata("design:paramtypes", []),
  1159. __metadata("design:returntype", Object)
  1160. ], Circle.prototype, "getCenter", null);
  1161. __decorate([
  1162. CordovaInstance({ sync: true }),
  1163. __metadata("design:type", Function),
  1164. __metadata("design:paramtypes", []),
  1165. __metadata("design:returntype", Number)
  1166. ], Circle.prototype, "getRadius", null);
  1167. __decorate([
  1168. CordovaInstance({ sync: true }),
  1169. __metadata("design:type", Function),
  1170. __metadata("design:paramtypes", [Number]),
  1171. __metadata("design:returntype", void 0)
  1172. ], Circle.prototype, "setRadius", null);
  1173. __decorate([
  1174. CordovaInstance({ sync: true }),
  1175. __metadata("design:type", Function),
  1176. __metadata("design:paramtypes", [String]),
  1177. __metadata("design:returntype", void 0)
  1178. ], Circle.prototype, "setFillColor", null);
  1179. __decorate([
  1180. CordovaInstance({ sync: true }),
  1181. __metadata("design:type", Function),
  1182. __metadata("design:paramtypes", []),
  1183. __metadata("design:returntype", String)
  1184. ], Circle.prototype, "getFillColor", null);
  1185. __decorate([
  1186. CordovaInstance({ sync: true }),
  1187. __metadata("design:type", Function),
  1188. __metadata("design:paramtypes", [Number]),
  1189. __metadata("design:returntype", void 0)
  1190. ], Circle.prototype, "setStrokeWidth", null);
  1191. __decorate([
  1192. CordovaInstance({ sync: true }),
  1193. __metadata("design:type", Function),
  1194. __metadata("design:paramtypes", []),
  1195. __metadata("design:returntype", Number)
  1196. ], Circle.prototype, "getStrokeWidth", null);
  1197. __decorate([
  1198. CordovaInstance({ sync: true }),
  1199. __metadata("design:type", Function),
  1200. __metadata("design:paramtypes", [String]),
  1201. __metadata("design:returntype", void 0)
  1202. ], Circle.prototype, "setStrokeColor", null);
  1203. __decorate([
  1204. CordovaInstance({ sync: true }),
  1205. __metadata("design:type", Function),
  1206. __metadata("design:paramtypes", []),
  1207. __metadata("design:returntype", String)
  1208. ], Circle.prototype, "getStrokeColor", null);
  1209. __decorate([
  1210. CordovaInstance({ sync: true }),
  1211. __metadata("design:type", Function),
  1212. __metadata("design:paramtypes", [Boolean]),
  1213. __metadata("design:returntype", void 0)
  1214. ], Circle.prototype, "setClickable", null);
  1215. __decorate([
  1216. CordovaInstance({ sync: true }),
  1217. __metadata("design:type", Function),
  1218. __metadata("design:paramtypes", []),
  1219. __metadata("design:returntype", Boolean)
  1220. ], Circle.prototype, "getClickable", null);
  1221. __decorate([
  1222. CordovaInstance({ sync: true }),
  1223. __metadata("design:type", Function),
  1224. __metadata("design:paramtypes", [Number]),
  1225. __metadata("design:returntype", void 0)
  1226. ], Circle.prototype, "setZIndex", null);
  1227. __decorate([
  1228. CordovaInstance({ sync: true }),
  1229. __metadata("design:type", Function),
  1230. __metadata("design:paramtypes", []),
  1231. __metadata("design:returntype", Number)
  1232. ], Circle.prototype, "getZIndex", null);
  1233. __decorate([
  1234. CordovaInstance({ sync: true }),
  1235. __metadata("design:type", Function),
  1236. __metadata("design:paramtypes", []),
  1237. __metadata("design:returntype", void 0)
  1238. ], Circle.prototype, "remove", null);
  1239. __decorate([
  1240. CordovaInstance({ sync: true }),
  1241. __metadata("design:type", Function),
  1242. __metadata("design:paramtypes", []),
  1243. __metadata("design:returntype", LatLngBounds)
  1244. ], Circle.prototype, "getBounds", null);
  1245. __decorate([
  1246. CordovaInstance({ sync: true }),
  1247. __metadata("design:type", Function),
  1248. __metadata("design:paramtypes", [Boolean]),
  1249. __metadata("design:returntype", void 0)
  1250. ], Circle.prototype, "setVisible", null);
  1251. __decorate([
  1252. CordovaInstance({ sync: true }),
  1253. __metadata("design:type", Function),
  1254. __metadata("design:paramtypes", []),
  1255. __metadata("design:returntype", Boolean)
  1256. ], Circle.prototype, "getVisible", null);
  1257. return Circle;
  1258. }(BaseClass));
  1259. export { Circle };
  1260. /**
  1261. * @hidden
  1262. */
  1263. var Environment = (function () {
  1264. function Environment() {
  1265. }
  1266. Environment_1 = Environment;
  1267. /**
  1268. * Get the open source software license information for Google Maps SDK for iOS.
  1269. * @return {Promise<any>}
  1270. */
  1271. Environment.getLicenseInfo = function () {
  1272. return new Promise(function (resolve) {
  1273. GoogleMaps.getPlugin().environment.getLicenseInfo(function (text) { return resolve(text); });
  1274. });
  1275. };
  1276. /**
  1277. * @deprecation
  1278. * @hidden
  1279. */
  1280. Environment.prototype.getLicenseInfo = function () {
  1281. console.error('GoogleMaps', '[deprecated] This method is static. Please use Environment.getLicenseInfo()');
  1282. return Environment_1.getLicenseInfo();
  1283. };
  1284. /**
  1285. * Specifies the background color of the app.
  1286. * @param color
  1287. */
  1288. Environment.setBackgroundColor = function (color) {
  1289. GoogleMaps.getPlugin().environment.setBackgroundColor(color);
  1290. };
  1291. /**
  1292. * @deprecation
  1293. * @hidden
  1294. */
  1295. Environment.prototype.setBackgroundColor = function (color) {
  1296. console.error('GoogleMaps', '[deprecated] This method is static. Please use Environment.setBackgroundColor()');
  1297. Environment_1.setBackgroundColor(color);
  1298. };
  1299. Environment = Environment_1 = __decorate([
  1300. Plugin({
  1301. plugin: 'cordova-plugin-googlemaps',
  1302. pluginName: 'GoogleMaps',
  1303. pluginRef: 'plugin.google.maps.environment',
  1304. repo: ''
  1305. })
  1306. ], Environment);
  1307. return Environment;
  1308. var Environment_1;
  1309. }());
  1310. export { Environment };
  1311. /**
  1312. * @hidden
  1313. */
  1314. var Geocoder = (function () {
  1315. function Geocoder() {
  1316. }
  1317. Geocoder_1 = Geocoder;
  1318. /**
  1319. * @deprecation
  1320. * @hidden
  1321. */
  1322. Geocoder.prototype.geocode = function (request) {
  1323. console.error('GoogleMaps', '[deprecated] This method is static. Please use Geocoder.geocode()');
  1324. return Geocoder_1.geocode(request);
  1325. };
  1326. /**
  1327. * Converts position to address and vice versa
  1328. * @param {GeocoderRequest} request Request object with either an address or a position
  1329. * @return {Promise<GeocoderResult[] | BaseArrayClass<GeocoderResult>>}
  1330. */
  1331. Geocoder.geocode = function (request) {
  1332. if (request.address instanceof Array || Array.isArray(request.address) ||
  1333. request.position instanceof Array || Array.isArray(request.position)) {
  1334. // -------------------------
  1335. // Geocoder.geocode({
  1336. // address: [
  1337. // "Kyoto, Japan",
  1338. // "Tokyo, Japan"
  1339. // ]
  1340. // })
  1341. // -------------------------
  1342. return new Promise(function (resolve, reject) {
  1343. GoogleMaps.getPlugin().Geocoder.geocode(request, function (mvcArray) {
  1344. if (mvcArray) {
  1345. resolve(new BaseArrayClass(mvcArray));
  1346. }
  1347. else {
  1348. reject();
  1349. }
  1350. });
  1351. });
  1352. }
  1353. else {
  1354. // -------------------------
  1355. // Geocoder.geocode({
  1356. // address: "Kyoto, Japan"
  1357. // })
  1358. // -------------------------
  1359. return new Promise(function (resolve, reject) {
  1360. GoogleMaps.getPlugin().Geocoder.geocode(request, function (results) {
  1361. if (results) {
  1362. resolve(results);
  1363. }
  1364. else {
  1365. reject();
  1366. }
  1367. });
  1368. });
  1369. }
  1370. };
  1371. Geocoder = Geocoder_1 = __decorate([
  1372. Plugin({
  1373. pluginName: 'GoogleMaps',
  1374. pluginRef: 'plugin.google.maps.Geocoder',
  1375. plugin: 'cordova-plugin-googlemaps',
  1376. repo: ''
  1377. })
  1378. ], Geocoder);
  1379. return Geocoder;
  1380. var Geocoder_1;
  1381. }());
  1382. export { Geocoder };
  1383. /**
  1384. * @hidden
  1385. */
  1386. var LocationService = (function () {
  1387. function LocationService() {
  1388. }
  1389. /**
  1390. * Get the current device location without map
  1391. * @return {Promise<MyLocation>}
  1392. */
  1393. LocationService.getMyLocation = function (options) {
  1394. return new Promise(function (resolve, reject) {
  1395. GoogleMaps.getPlugin().LocationService.getMyLocation(options, resolve, reject);
  1396. });
  1397. };
  1398. /**
  1399. * Return true if the application has geolocation permission
  1400. * @return {Promise<MyLocation>}
  1401. */
  1402. LocationService.hasPermission = function () {
  1403. return new Promise(function (resolve, reject) {
  1404. GoogleMaps.getPlugin().LocationService.hasPermission(resolve, reject);
  1405. });
  1406. };
  1407. LocationService = __decorate([
  1408. Plugin({
  1409. pluginName: 'GoogleMaps',
  1410. pluginRef: 'plugin.google.maps.LocationService',
  1411. plugin: 'cordova-plugin-googlemaps',
  1412. repo: ''
  1413. })
  1414. ], LocationService);
  1415. return LocationService;
  1416. }());
  1417. export { LocationService };
  1418. /**
  1419. * @hidden
  1420. */
  1421. var Encoding = (function () {
  1422. function Encoding() {
  1423. }
  1424. Encoding_1 = Encoding;
  1425. /**
  1426. * @deprecation
  1427. * @hidden
  1428. */
  1429. Encoding.prototype.decodePath = function (encoded, precision) {
  1430. console.error('GoogleMaps', '[deprecated] This method is static. Please use Encoding.decodePath()');
  1431. return Encoding_1.decodePath(encoded, precision);
  1432. };
  1433. /**
  1434. * @deprecation
  1435. * @hidden
  1436. */
  1437. Encoding.prototype.encodePath = function (path) {
  1438. console.error('GoogleMaps', '[deprecated] This method is static. Please use Encoding.encodePath()');
  1439. return Encoding_1.encodePath(path);
  1440. };
  1441. /**
  1442. * Decodes an encoded path string into a sequence of LatLngs.
  1443. * @param encoded {string} an encoded path string
  1444. * @param precision? {number} default: 5
  1445. * @return {ILatLng[]}
  1446. */
  1447. Encoding.decodePath = function (encoded, precision) {
  1448. return GoogleMaps.getPlugin().geometry.encoding.decodePath(encoded, precision);
  1449. };
  1450. /**
  1451. * Encodes a sequence of LatLngs into an encoded path string.
  1452. * @param path {Array<ILatLng> | BaseArrayClass<ILatLng>} a sequence of LatLngs
  1453. * @return {string}
  1454. */
  1455. Encoding.encodePath = function (path) {
  1456. return GoogleMaps.getPlugin().geometry.encoding.encodePath(path);
  1457. };
  1458. Encoding = Encoding_1 = __decorate([
  1459. Plugin({
  1460. pluginName: 'GoogleMaps',
  1461. pluginRef: 'plugin.google.maps.geometry.encoding',
  1462. plugin: 'cordova-plugin-googlemaps',
  1463. repo: ''
  1464. })
  1465. ], Encoding);
  1466. return Encoding;
  1467. var Encoding_1;
  1468. }());
  1469. export { Encoding };
  1470. /**
  1471. * @hidden
  1472. */
  1473. var Poly = (function () {
  1474. function Poly() {
  1475. }
  1476. /**
  1477. * Returns true if the specified location is in the polygon path
  1478. * @param location {ILatLng}
  1479. * @param path {ILatLng[]}
  1480. * @return {boolean}
  1481. */
  1482. Poly.containsLocation = function (location, path) {
  1483. return GoogleMaps.getPlugin().geometry.poly.containsLocation(location, path);
  1484. };
  1485. /**
  1486. * Returns true if the specified location is on the polyline path
  1487. * @param location {ILatLng}
  1488. * @param path {ILatLng[]}
  1489. * @return {boolean}
  1490. */
  1491. Poly.isLocationOnEdge = function (location, path) {
  1492. return GoogleMaps.getPlugin().geometry.poly.isLocationOnEdge(location, path);
  1493. };
  1494. Poly = __decorate([
  1495. Plugin({
  1496. pluginName: 'GoogleMaps',
  1497. pluginRef: 'plugin.google.maps.geometry.poly',
  1498. plugin: 'cordova-plugin-googlemaps',
  1499. repo: ''
  1500. })
  1501. ], Poly);
  1502. return Poly;
  1503. }());
  1504. export { Poly };
  1505. /**
  1506. * @hidden
  1507. */
  1508. var Spherical = (function () {
  1509. function Spherical() {
  1510. }
  1511. Spherical_1 = Spherical;
  1512. /**
  1513. * @deprecation
  1514. * @hidden
  1515. */
  1516. Spherical.prototype.computeDistanceBetween = function (from, to) {
  1517. console.error('GoogleMaps', '[deprecated] This method is static. Please use Spherical.computeDistanceBetween()');
  1518. return Spherical_1.computeDistanceBetween(from, to);
  1519. };
  1520. /**
  1521. * @deprecation
  1522. * @hidden
  1523. */
  1524. Spherical.prototype.computeOffset = function (from, distance, heading) {
  1525. console.error('GoogleMaps', '[deprecated] This method is static. Please use Spherical.computeOffset()');
  1526. return Spherical_1.computeOffset(from, distance, heading);
  1527. };
  1528. /**
  1529. * @deprecation
  1530. * @hidden
  1531. */
  1532. Spherical.prototype.computeOffsetOrigin = function (to, distance, heading) {
  1533. console.error('GoogleMaps', '[deprecated] This method is static. Please use Spherical.computeOffsetOrigin()');
  1534. return Spherical_1.computeOffsetOrigin(to, distance, heading);
  1535. };
  1536. /**
  1537. * @deprecation
  1538. * @hidden
  1539. */
  1540. Spherical.prototype.computeLength = function (path) {
  1541. console.error('GoogleMaps', '[deprecated] This method is static. Please use Spherical.computeLength()');
  1542. return Spherical_1.computeLength(path);
  1543. };
  1544. /**
  1545. * @deprecation
  1546. * @hidden
  1547. */
  1548. Spherical.prototype.computeArea = function (path) {
  1549. console.error('GoogleMaps', '[deprecated] This method is static. Please use Spherical.computeArea()');
  1550. return Spherical_1.computeArea(path);
  1551. };
  1552. /**
  1553. * @deprecation
  1554. * @hidden
  1555. */
  1556. Spherical.prototype.computeSignedArea = function (path) {
  1557. console.error('GoogleMaps', '[deprecated] This method is static. Please use Spherical.computeSignedArea()');
  1558. return Spherical_1.computeSignedArea(path);
  1559. };
  1560. /**
  1561. * @deprecation
  1562. * @hidden
  1563. */
  1564. Spherical.prototype.computeHeading = function (from, to) {
  1565. console.error('GoogleMaps', '[deprecated] This method is static. Please use Spherical.computeHeading()');
  1566. return Spherical_1.computeHeading(from, to);
  1567. };
  1568. /**
  1569. * @deprecation
  1570. * @hidden
  1571. */
  1572. Spherical.prototype.interpolate = function (from, to, fraction) {
  1573. console.error('GoogleMaps', '[deprecated] This method is static. Please use Spherical.interpolate()');
  1574. return Spherical_1.interpolate(from, to, fraction);
  1575. };
  1576. /**
  1577. * Returns the distance, in meters, between two LatLngs.
  1578. * @param locationA {ILatLng}
  1579. * @param locationB {ILatLng}
  1580. * @return {number}
  1581. */
  1582. Spherical.computeDistanceBetween = function (from, to) {
  1583. return GoogleMaps.getPlugin().geometry.spherical.computeDistanceBetween(from, to);
  1584. };
  1585. /**
  1586. * Returns the LatLng resulting from moving a distance from an origin in the specified heading (expressed in degrees clockwise from north)
  1587. * @param from {ILatLng}
  1588. * @param distance {number}
  1589. * @param heading {number}
  1590. * @return {LatLng}
  1591. */
  1592. Spherical.computeOffset = function (from, distance, heading) {
  1593. return GoogleMaps.getPlugin().geometry.spherical.computeOffset(from, distance, heading);
  1594. };
  1595. /**
  1596. * 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.
  1597. * @param to {ILatLng} The destination LatLng.
  1598. * @param distance {number} The distance travelled, in meters.
  1599. * @param heading {number} The heading in degrees clockwise from north.
  1600. * @return {LatLng}
  1601. */
  1602. Spherical.computeOffsetOrigin = function (to, distance, heading) {
  1603. return GoogleMaps.getPlugin().geometry.spherical.computeOffsetOrigin(to, distance, heading);
  1604. };
  1605. /**
  1606. * Returns the length of the given path.
  1607. * @param path {Array<ILatLng> | BaseArrayClass<ILatLng>}
  1608. * @return {number}
  1609. */
  1610. Spherical.computeLength = function (path) {
  1611. return GoogleMaps.getPlugin().geometry.spherical.computeLength(path);
  1612. };
  1613. /**
  1614. * Returns the area of a closed path. The computed area uses the same units as the radius.
  1615. * @param path {Array<ILatLng> | BaseArrayClass<ILatLng>}.
  1616. * @return {number}
  1617. */
  1618. Spherical.computeArea = function (path) {
  1619. return GoogleMaps.getPlugin().geometry.spherical.computeArea(path);
  1620. };
  1621. /**
  1622. * Returns the signed area of a closed path. The signed area may be used to determine the orientation of the path.
  1623. * @param path {Array<ILatLng> | BaseArrayClass<ILatLng>}.
  1624. * @return {number}
  1625. */
  1626. Spherical.computeSignedArea = function (path) {
  1627. return GoogleMaps.getPlugin().geometry.spherical.computeSignedArea(path);
  1628. };
  1629. /**
  1630. * Returns the heading from one LatLng to another LatLng. Headings are expressed in degrees clockwise from North within the range (-180,180).
  1631. * @param from {ILatLng}
  1632. * @param to {ILatLng}
  1633. * @return {number}
  1634. */
  1635. Spherical.computeHeading = function (from, to) {
  1636. return GoogleMaps.getPlugin().geometry.spherical.computeHeading(from, to);
  1637. };
  1638. /**
  1639. * Returns the LatLng which lies the given fraction of the way between the origin LatLng and the destination LatLng.
  1640. * @param from {ILatLng} The LatLng from which to start.
  1641. * @param to {ILatLng} The LatLng toward which to travel.
  1642. * @param fraction {number} A fraction of the distance to travel from 0.0 to 1.0 .
  1643. * @return {LatLng}
  1644. */
  1645. Spherical.interpolate = function (from, to, fraction) {
  1646. return GoogleMaps.getPlugin().geometry.spherical.interpolate(from, to, fraction);
  1647. };
  1648. Spherical = Spherical_1 = __decorate([
  1649. Plugin({
  1650. pluginName: 'GoogleMaps',
  1651. pluginRef: 'plugin.google.maps.geometry.spherical',
  1652. plugin: 'cordova-plugin-googlemaps',
  1653. repo: ''
  1654. })
  1655. ], Spherical);
  1656. return Spherical;
  1657. var Spherical_1;
  1658. }());
  1659. export { Spherical };
  1660. /**
  1661. * @hidden
  1662. */
  1663. var StreetViewPanorama = (function (_super) {
  1664. __extends(StreetViewPanorama, _super);
  1665. function StreetViewPanorama(element, options) {
  1666. var _this = _super.call(this) || this;
  1667. if (checkAvailability(GoogleMaps.getPluginRef(), null, GoogleMaps.getPluginName()) === true) {
  1668. if (element instanceof HTMLElement) {
  1669. _this._objectInstance = GoogleMaps.getPlugin().StreetView.getPanorama(element, options);
  1670. }
  1671. else if (typeof element === 'string') {
  1672. _this._objectInstance = GoogleMaps.getPlugin().StreetView.getPanorama(new Promise(function (resolve, reject) {
  1673. var count = 0;
  1674. var timer = setInterval(function () {
  1675. var target = document.querySelector('.show-page #' + element);
  1676. if (target) {
  1677. clearInterval(timer);
  1678. resolve([target, options]);
  1679. }
  1680. else {
  1681. if (count++ < 20) {
  1682. return;
  1683. }
  1684. clearInterval(timer);
  1685. _this._objectInstance.remove();
  1686. console.error('Can not find the element [#' + element + ']');
  1687. reject();
  1688. }
  1689. }, 100);
  1690. }), options);
  1691. }
  1692. }
  1693. return _this;
  1694. }
  1695. /**
  1696. * Sets the point of view for the Street View panorama.
  1697. */
  1698. StreetViewPanorama.prototype.setPov = function (pov) { };
  1699. /**
  1700. * Sets the StreetViewPanorama to a given location.
  1701. */
  1702. StreetViewPanorama.prototype.setPosition = function (cameraPosition) { };
  1703. /**
  1704. * Toggles the ability for users to use pan around on the panorama using gestures.
  1705. * @param gestureEnable {boolean}
  1706. */
  1707. StreetViewPanorama.prototype.setPanningGesturesEnabled = function (gestureEnable) { };
  1708. /**
  1709. * Retrun true if the panning gesture is enabled.
  1710. * @return {boolean}
  1711. */
  1712. StreetViewPanorama.prototype.getPanningGesturesEnabled = function () { return; };
  1713. /**
  1714. * Toggles the ability for users to zoom on the panorama using gestures.
  1715. * @param gestureEnable {boolean}
  1716. */
  1717. StreetViewPanorama.prototype.setZoomGesturesEnabled = function (gestureEnable) { };
  1718. /**
  1719. * Retrun true if the zooming gesture is enabled.
  1720. * @return {boolean}
  1721. */
  1722. StreetViewPanorama.prototype.getZoomGesturesEnabled = function () { return; };
  1723. /**
  1724. * Toggles the ability for users to see street names on the panorama.
  1725. * @param gestureEnable {boolean}
  1726. */
  1727. StreetViewPanorama.prototype.setStreetNamesEnabled = function (gestureEnable) { };
  1728. /**
  1729. * Retrun true if the street names control is enabled.
  1730. * @return {boolean}
  1731. */
  1732. StreetViewPanorama.prototype.getStreetNamesEnabled = function () { return; };
  1733. /**
  1734. * Toggles the ability for users to move between panoramas.
  1735. * @param gestureEnable {boolean}
  1736. */
  1737. StreetViewPanorama.prototype.setNavigationEnabled = function (gestureEnable) { };
  1738. /**
  1739. * Retrun true if the navigation control is enabled.
  1740. * @return {boolean}
  1741. */
  1742. StreetViewPanorama.prototype.getNavigationEnabled = function () { return; };
  1743. /**
  1744. * Retrun the navigation links (StreetViewLocation.links)
  1745. * @return {StreetViewNavigationLink[]}
  1746. */
  1747. StreetViewPanorama.prototype.getLinks = function () { return; };
  1748. /**
  1749. * Retrun the current location
  1750. * @return {StreetViewLocation}
  1751. */
  1752. StreetViewPanorama.prototype.getLocation = function () { return; };
  1753. /**
  1754. * Retrun the current panorama id
  1755. * @return {string}
  1756. */
  1757. StreetViewPanorama.prototype.getPano = function () { return; };
  1758. /**
  1759. * Retrun the current position (StreetViewLocation.latLng)
  1760. * @return {string}
  1761. */
  1762. StreetViewPanorama.prototype.getPosition = function () { return; };
  1763. /**
  1764. * Destroy a map completely
  1765. * @return {Promise<any>}
  1766. */
  1767. StreetViewPanorama.prototype.remove = function () {
  1768. var _this = this;
  1769. return new Promise(function (resolve) {
  1770. _this._objectInstance.remove(function () { return resolve(); });
  1771. });
  1772. };
  1773. __decorate([
  1774. CordovaInstance(),
  1775. __metadata("design:type", Function),
  1776. __metadata("design:paramtypes", [Object]),
  1777. __metadata("design:returntype", void 0)
  1778. ], StreetViewPanorama.prototype, "setPov", null);
  1779. __decorate([
  1780. CordovaInstance(),
  1781. __metadata("design:type", Function),
  1782. __metadata("design:paramtypes", [Object]),
  1783. __metadata("design:returntype", void 0)
  1784. ], StreetViewPanorama.prototype, "setPosition", null);
  1785. __decorate([
  1786. CordovaInstance({ sync: true }),
  1787. __metadata("design:type", Function),
  1788. __metadata("design:paramtypes", [Boolean]),
  1789. __metadata("design:returntype", void 0)
  1790. ], StreetViewPanorama.prototype, "setPanningGesturesEnabled", null);
  1791. __decorate([
  1792. CordovaInstance({ sync: true }),
  1793. __metadata("design:type", Function),
  1794. __metadata("design:paramtypes", []),
  1795. __metadata("design:returntype", Boolean)
  1796. ], StreetViewPanorama.prototype, "getPanningGesturesEnabled", null);
  1797. __decorate([
  1798. CordovaInstance({ sync: true }),
  1799. __metadata("design:type", Function),
  1800. __metadata("design:paramtypes", [Boolean]),
  1801. __metadata("design:returntype", void 0)
  1802. ], StreetViewPanorama.prototype, "setZoomGesturesEnabled", null);
  1803. __decorate([
  1804. CordovaInstance({ sync: true }),
  1805. __metadata("design:type", Function),
  1806. __metadata("design:paramtypes", []),
  1807. __metadata("design:returntype", Boolean)
  1808. ], StreetViewPanorama.prototype, "getZoomGesturesEnabled", null);
  1809. __decorate([
  1810. CordovaInstance({ sync: true }),
  1811. __metadata("design:type", Function),
  1812. __metadata("design:paramtypes", [Boolean]),
  1813. __metadata("design:returntype", void 0)
  1814. ], StreetViewPanorama.prototype, "setStreetNamesEnabled", null);
  1815. __decorate([
  1816. CordovaInstance({ sync: true }),
  1817. __metadata("design:type", Function),
  1818. __metadata("design:paramtypes", []),
  1819. __metadata("design:returntype", Boolean)
  1820. ], StreetViewPanorama.prototype, "getStreetNamesEnabled", null);
  1821. __decorate([
  1822. CordovaInstance({ sync: true }),
  1823. __metadata("design:type", Function),
  1824. __metadata("design:paramtypes", [Boolean]),
  1825. __metadata("design:returntype", void 0)
  1826. ], StreetViewPanorama.prototype, "setNavigationEnabled", null);
  1827. __decorate([
  1828. CordovaInstance({ sync: true }),
  1829. __metadata("design:type", Function),
  1830. __metadata("design:paramtypes", []),
  1831. __metadata("design:returntype", Boolean)
  1832. ], StreetViewPanorama.prototype, "getNavigationEnabled", null);
  1833. __decorate([
  1834. CordovaInstance({ sync: true }),
  1835. __metadata("design:type", Function),
  1836. __metadata("design:paramtypes", []),
  1837. __metadata("design:returntype", Array)
  1838. ], StreetViewPanorama.prototype, "getLinks", null);
  1839. __decorate([
  1840. CordovaInstance({ sync: true }),
  1841. __metadata("design:type", Function),
  1842. __metadata("design:paramtypes", []),
  1843. __metadata("design:returntype", Object)
  1844. ], StreetViewPanorama.prototype, "getLocation", null);
  1845. __decorate([
  1846. CordovaInstance({ sync: true }),
  1847. __metadata("design:type", Function),
  1848. __metadata("design:paramtypes", []),
  1849. __metadata("design:returntype", String)
  1850. ], StreetViewPanorama.prototype, "getPano", null);
  1851. __decorate([
  1852. CordovaInstance({ sync: true }),
  1853. __metadata("design:type", Function),
  1854. __metadata("design:paramtypes", []),
  1855. __metadata("design:returntype", Object)
  1856. ], StreetViewPanorama.prototype, "getPosition", null);
  1857. __decorate([
  1858. CordovaInstance(),
  1859. __metadata("design:type", Function),
  1860. __metadata("design:paramtypes", []),
  1861. __metadata("design:returntype", Promise)
  1862. ], StreetViewPanorama.prototype, "remove", null);
  1863. StreetViewPanorama = __decorate([
  1864. Plugin({
  1865. pluginName: 'StreetViewPanorama',
  1866. plugin: 'cordova-plugin-googlemaps'
  1867. }),
  1868. __metadata("design:paramtypes", [Object, Object])
  1869. ], StreetViewPanorama);
  1870. return StreetViewPanorama;
  1871. }(BaseClass));
  1872. export { StreetViewPanorama };
  1873. /**
  1874. * @hidden
  1875. */
  1876. var GoogleMap = (function (_super) {
  1877. __extends(GoogleMap, _super);
  1878. function GoogleMap(element, options) {
  1879. var _this = _super.call(this) || this;
  1880. if (checkAvailability(GoogleMaps.getPluginRef(), null, GoogleMaps.getPluginName()) === true) {
  1881. if (element instanceof HTMLElement) {
  1882. _this._objectInstance = GoogleMaps.getPlugin().Map.getMap(element, options);
  1883. }
  1884. else if (typeof element === 'string') {
  1885. _this._objectInstance = GoogleMaps.getPlugin().Map.getMap(new Promise(function (resolve, reject) {
  1886. var count = 0;
  1887. var timer = setInterval(function () {
  1888. var target = document.querySelector('.show-page #' + element);
  1889. if (target) {
  1890. clearInterval(timer);
  1891. resolve([target, options]);
  1892. }
  1893. else {
  1894. if (count++ < 20) {
  1895. return;
  1896. }
  1897. clearInterval(timer);
  1898. _this._objectInstance.remove();
  1899. console.error('Can not find the element [#' + element + ']');
  1900. reject();
  1901. }
  1902. }, 100);
  1903. }), options);
  1904. }
  1905. else if (element === null && options) {
  1906. _this._objectInstance = GoogleMaps.getPlugin().Map.getMap(null, options);
  1907. }
  1908. }
  1909. return _this;
  1910. }
  1911. /**
  1912. * Changes the map div
  1913. * @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.
  1914. */
  1915. GoogleMap.prototype.setDiv = function (domNode) {
  1916. if (typeof domNode === 'string') {
  1917. this._objectInstance.setDiv(document.querySelector('.show-page #' + domNode));
  1918. }
  1919. else {
  1920. this._objectInstance.setDiv(domNode);
  1921. }
  1922. };
  1923. /**
  1924. * Returns the map HTML element
  1925. * @return {HTMLElement}
  1926. */
  1927. GoogleMap.prototype.getDiv = function () { return; };
  1928. /**
  1929. * Changes the map type id
  1930. * @param mapTypeId {string}
  1931. */
  1932. GoogleMap.prototype.setMapTypeId = function (mapTypeId) { };
  1933. /**
  1934. * Moves the camera with animation
  1935. * @return {Promise<any>}
  1936. */
  1937. GoogleMap.prototype.animateCamera = function (cameraPosition) { return; };
  1938. /**
  1939. * Zooming in the camera with animation
  1940. * @return {Promise<any>}
  1941. */
  1942. GoogleMap.prototype.animateCameraZoomIn = function () { return; };
  1943. /**
  1944. * Zooming out the camera with animation
  1945. * @return {Promise<any>}
  1946. */
  1947. GoogleMap.prototype.animateCameraZoomOut = function () { return; };
  1948. /**
  1949. * Moves the camera without animation
  1950. * @return {Promise<any>}
  1951. */
  1952. GoogleMap.prototype.moveCamera = function (cameraPosition) { return; };
  1953. /**
  1954. * Zooming in the camera without animation
  1955. * @return {Promise<any>}
  1956. */
  1957. GoogleMap.prototype.moveCameraZoomIn = function () { return; };
  1958. /**
  1959. * Zooming out the camera without animation
  1960. * @return {Promise<any>}
  1961. */
  1962. GoogleMap.prototype.moveCameraZoomOut = function () { return; };
  1963. /**
  1964. * Get the position of the camera.
  1965. * @return {CameraPosition}
  1966. */
  1967. GoogleMap.prototype.getCameraPosition = function () { return; };
  1968. /**
  1969. * Get the current camera target position
  1970. * @return {ILatLng}
  1971. */
  1972. GoogleMap.prototype.getCameraTarget = function () { return; };
  1973. /**
  1974. * Get the current camera zoom level
  1975. * @return {number}
  1976. */
  1977. GoogleMap.prototype.getCameraZoom = function () { return; };
  1978. /**
  1979. * Get the current camera bearing
  1980. * @return {number}
  1981. */
  1982. GoogleMap.prototype.getCameraBearing = function () { return; };
  1983. /**
  1984. * Get the current camera tilt (view angle)
  1985. * @return {number}
  1986. */
  1987. GoogleMap.prototype.getCameraTilt = function () { return; };
  1988. /**
  1989. * Set the center position of the camera view
  1990. * @param latLng {ILatLng | Array<ILatLng>}
  1991. */
  1992. GoogleMap.prototype.setCameraTarget = function (latLng) { };
  1993. /**
  1994. * Set zoom level of the camera
  1995. * @param zoomLevel {number} Zoom level
  1996. */
  1997. GoogleMap.prototype.setCameraZoom = function (zoomLevel) { };
  1998. /**
  1999. * Set the camera view angle
  2000. * @param tiltAngle {number} Tilt angle
  2001. */
  2002. GoogleMap.prototype.setCameraTilt = function (tiltAngle) { };
  2003. /**
  2004. * Set camera bearing
  2005. * @param bearing {any}
  2006. */
  2007. GoogleMap.prototype.setCameraBearing = function (bearing) { };
  2008. /**
  2009. * Changes the center of the map by the given distance in pixels
  2010. * @param x {number}
  2011. * @param y {number}
  2012. */
  2013. GoogleMap.prototype.panBy = function (x, y) { };
  2014. /**
  2015. * Get the current visible region (southWest and northEast)
  2016. * @return {VisibleRegion}
  2017. */
  2018. GoogleMap.prototype.getVisibleRegion = function () { return; };
  2019. /**
  2020. * Get the current device location
  2021. * @return {Promise<MyLocation>}
  2022. */
  2023. GoogleMap.prototype.getMyLocation = function (options) {
  2024. return new Promise(function (resolve, reject) {
  2025. GoogleMaps.getPlugin().LocationService.getMyLocation(options, resolve, reject);
  2026. });
  2027. };
  2028. /**
  2029. * Set false to ignore all clicks on the map
  2030. * @param isClickable {boolean}
  2031. */
  2032. GoogleMap.prototype.setClickable = function (isClickable) { };
  2033. /**
  2034. * Destroy a map completely
  2035. * @return {Promise<any>}
  2036. */
  2037. GoogleMap.prototype.remove = function () {
  2038. var _this = this;
  2039. if (this.get('_overlays')) {
  2040. Object.keys(this.get('_overlays')).forEach(function (overlayId) {
  2041. _this.get('_overlays')[overlayId] = null;
  2042. delete _this.get('_overlays')[overlayId];
  2043. });
  2044. }
  2045. return new Promise(function (resolve) {
  2046. _this._objectInstance.remove(function () { return resolve(); });
  2047. });
  2048. };
  2049. /**
  2050. * Remove all overlays, such as marker
  2051. * @return {Promise<any>}
  2052. */
  2053. GoogleMap.prototype.clear = function () {
  2054. var _this = this;
  2055. if (this.get('_overlays')) {
  2056. Object.keys(this.get('_overlays')).forEach(function (overlayId) {
  2057. _this.get('_overlays')[overlayId] = null;
  2058. delete _this.get('_overlays')[overlayId];
  2059. });
  2060. }
  2061. return new Promise(function (resolve) {
  2062. _this._objectInstance.clear(function () { return resolve(); });
  2063. });
  2064. };
  2065. /**
  2066. * Convert the unit from LatLng to the pixels from the left/top of the map div
  2067. * @return {Promise<any>}
  2068. */
  2069. GoogleMap.prototype.fromLatLngToPoint = function (latLng) { return; };
  2070. /**
  2071. * Convert the unit from the pixels from the left/top to the LatLng
  2072. * @return {Promise<LatLng>}
  2073. */
  2074. GoogleMap.prototype.fromPointToLatLng = function (point) { return; };
  2075. /**
  2076. * Set true if you want to show the MyLocation control (blue dot)
  2077. * @param enabled {boolean}
  2078. */
  2079. GoogleMap.prototype.setMyLocationEnabled = function (enabled) { };
  2080. /**
  2081. * Set true if you want to show the MyLocation button
  2082. * @param enabled {boolean}
  2083. */
  2084. GoogleMap.prototype.setMyLocationButtonEnabled = function (enabled) { };
  2085. /**
  2086. * Get the currently focused building
  2087. * @return {Promise<any>}
  2088. */
  2089. GoogleMap.prototype.getFocusedBuilding = function () { return; };
  2090. /**
  2091. * Set true if you want to show the indoor map
  2092. * @param enabled {boolean}
  2093. */
  2094. GoogleMap.prototype.setIndoorEnabled = function (enabled) { };
  2095. /**
  2096. * Set true if you want to show the traffic layer
  2097. * @param enabled {boolean}
  2098. */
  2099. GoogleMap.prototype.setTrafficEnabled = function (enabled) { };
  2100. /**
  2101. * Set true if you want to show the compass button
  2102. * @param enabled {boolean}
  2103. */
  2104. GoogleMap.prototype.setCompassEnabled = function (enabled) { };
  2105. /**
  2106. * Sets the preference for whether all gestures should be enabled or disabled
  2107. * @param enabled {boolean}
  2108. */
  2109. GoogleMap.prototype.setAllGesturesEnabled = function (enabled) { };
  2110. /**
  2111. * Set visibility of the map
  2112. * @param visible {boolean}
  2113. */
  2114. GoogleMap.prototype.setVisible = function (visible) { };
  2115. /**
  2116. * Adjust the map padding (same as CSS padding rule)
  2117. * @param top {number}
  2118. * @param right {number}
  2119. * @param left {number}
  2120. * @param bottom {number}
  2121. */
  2122. GoogleMap.prototype.setPadding = function (top, right, bottom, left) { };
  2123. /**
  2124. * Set options
  2125. * @param options
  2126. */
  2127. GoogleMap.prototype.setOptions = function (options) { };
  2128. /**
  2129. * Adds a marker
  2130. * @param options {MarkerOptions} options
  2131. * @return {Promise<Marker>}
  2132. */
  2133. GoogleMap.prototype.addMarker = function (options) {
  2134. var _this = this;
  2135. return new Promise(function (resolve, reject) {
  2136. _this._objectInstance.addMarker(options, function (marker) {
  2137. if (marker) {
  2138. var overlayId_1 = marker.getId();
  2139. var overlay_1 = new Marker(_this, marker);
  2140. _this.get('_overlays')[overlayId_1] = overlay_1;
  2141. marker.one(overlayId_1 + '_remove', function () {
  2142. if (_this.get('_overlays')) {
  2143. _this.get('_overlays')[overlayId_1] = null;
  2144. overlay_1.destroy();
  2145. }
  2146. });
  2147. resolve(overlay_1);
  2148. }
  2149. else {
  2150. reject();
  2151. }
  2152. });
  2153. });
  2154. };
  2155. /**
  2156. * Adds a marker in synchronous
  2157. * @param options {MarkerOptions} options
  2158. * @Returns {Marker}
  2159. */
  2160. GoogleMap.prototype.addMarkerSync = function (options) {
  2161. var _this = this;
  2162. var marker = this._objectInstance.addMarker(options);
  2163. var overlayId = marker.getId();
  2164. var overlay = new Marker(this, marker);
  2165. this.get('_overlays')[overlayId] = overlay;
  2166. marker.one(overlayId + '_remove', function () {
  2167. if (_this.get('_overlays')) {
  2168. _this.get('_overlays')[overlayId] = null;
  2169. overlay.destroy();
  2170. }
  2171. });
  2172. return overlay;
  2173. };
  2174. /**
  2175. * Adds a marker cluster
  2176. * @param options {MarkerClusterOptions} options
  2177. * @return {Promise<MarkerCluster>}
  2178. */
  2179. GoogleMap.prototype.addMarkerCluster = function (options) {
  2180. var _this = this;
  2181. return new Promise(function (resolve, reject) {
  2182. _this._objectInstance.addMarkerCluster(options, function (markerCluster) {
  2183. if (markerCluster) {
  2184. var overlayId_2 = markerCluster.getId();
  2185. var overlay_2 = new MarkerCluster(_this, markerCluster);
  2186. _this.get('_overlays')[overlayId_2] = overlay_2;
  2187. markerCluster.one('remove', function () {
  2188. if (_this.get('_overlays')) {
  2189. _this.get('_overlays')[overlayId_2] = null;
  2190. overlay_2.destroy();
  2191. }
  2192. });
  2193. markerCluster.set('_overlays', new BaseArrayClass());
  2194. resolve(overlay_2);
  2195. }
  2196. else {
  2197. reject();
  2198. }
  2199. });
  2200. });
  2201. };
  2202. /**
  2203. * Adds a marker cluster in synchronous
  2204. * @param options {MarkerClusterOptions} options
  2205. * @Returns {MarkerCluster}
  2206. */
  2207. GoogleMap.prototype.addMarkerClusterSync = function (options) {
  2208. var _this = this;
  2209. var markerCluster = this._objectInstance.addMarkerCluster(options);
  2210. var overlayId = markerCluster.getId();
  2211. var overlay = new MarkerCluster(this, markerCluster);
  2212. this.get('_overlays')[overlayId] = overlay;
  2213. markerCluster.one(overlayId + '_remove', function () {
  2214. if (_this.get('_overlays')) {
  2215. _this.get('_overlays')[overlayId] = null;
  2216. overlay.destroy();
  2217. }
  2218. });
  2219. markerCluster.set('_overlays', new BaseArrayClass());
  2220. return overlay;
  2221. };
  2222. /**
  2223. * Adds a circle
  2224. * @param options {CircleOptions} options
  2225. * @return {Promise<Circle>}
  2226. */
  2227. GoogleMap.prototype.addCircle = function (options) {
  2228. var _this = this;
  2229. return new Promise(function (resolve, reject) {
  2230. _this._objectInstance.addCircle(options, function (circle) {
  2231. if (circle) {
  2232. var overlayId_3 = circle.getId();
  2233. var overlay_3 = new Circle(_this, circle);
  2234. _this.get('_overlays')[overlayId_3] = overlay_3;
  2235. circle.one(overlayId_3 + '_remove', function () {
  2236. if (_this.get('_overlays')) {
  2237. _this.get('_overlays')[overlayId_3] = null;
  2238. overlay_3.destroy();
  2239. }
  2240. });
  2241. resolve(overlay_3);
  2242. }
  2243. else {
  2244. reject();
  2245. }
  2246. });
  2247. });
  2248. };
  2249. /**
  2250. * Adds a circle in synchronous
  2251. * @param options {CircleOptions} options
  2252. * @return {Circle}
  2253. */
  2254. GoogleMap.prototype.addCircleSync = function (options) {
  2255. var _this = this;
  2256. var circle = this._objectInstance.addCircle(options);
  2257. var overlayId = circle.getId();
  2258. var overlay = new Circle(this, circle);
  2259. this.get('_overlays')[overlayId] = overlay;
  2260. circle.one(overlayId + '_remove', function () {
  2261. if (_this.get('_overlays')) {
  2262. _this.get('_overlays')[overlayId] = null;
  2263. overlay.destroy();
  2264. }
  2265. });
  2266. return overlay;
  2267. };
  2268. /**
  2269. * Adds a polygon
  2270. * @param options {PolygonOptions} options
  2271. * @return {Promise<Polygon>}
  2272. */
  2273. GoogleMap.prototype.addPolygon = function (options) {
  2274. var _this = this;
  2275. return new Promise(function (resolve, reject) {
  2276. _this._objectInstance.addPolygon(options, function (polygon) {
  2277. if (polygon) {
  2278. var overlayId_4 = polygon.getId();
  2279. var overlay_4 = new Polygon(_this, polygon);
  2280. _this.get('_overlays')[overlayId_4] = overlay_4;
  2281. polygon.one(overlayId_4 + '_remove', function () {
  2282. if (_this.get('_overlays')) {
  2283. _this.get('_overlays')[overlayId_4] = null;
  2284. overlay_4.destroy();
  2285. }
  2286. });
  2287. resolve(overlay_4);
  2288. }
  2289. else {
  2290. reject();
  2291. }
  2292. });
  2293. });
  2294. };
  2295. /**
  2296. * Adds a polygon in synchronous
  2297. * @param options {PolygonOptions} options
  2298. * @return {Polygon}
  2299. */
  2300. GoogleMap.prototype.addPolygonSync = function (options) {
  2301. var _this = this;
  2302. var polygon = this._objectInstance.addPolygon(options);
  2303. var overlayId = polygon.getId();
  2304. var overlay = new Polygon(this, polygon);
  2305. this.get('_overlays')[overlayId] = overlay;
  2306. polygon.one(overlayId + '_remove', function () {
  2307. if (_this.get('_overlays')) {
  2308. _this.get('_overlays')[overlayId] = null;
  2309. overlay.destroy();
  2310. }
  2311. });
  2312. return overlay;
  2313. };
  2314. /**
  2315. * Adds a polyline
  2316. * @param options {PolylineOptions} options
  2317. * @return {Promise<Polyline>}
  2318. */
  2319. GoogleMap.prototype.addPolyline = function (options) {
  2320. var _this = this;
  2321. return new Promise(function (resolve, reject) {
  2322. _this._objectInstance.addPolyline(options, function (polyline) {
  2323. if (polyline) {
  2324. var overlayId_5 = polyline.getId();
  2325. var overlay_5 = new Polyline(_this, polyline);
  2326. _this.get('_overlays')[overlayId_5] = overlay_5;
  2327. polyline.one(overlayId_5 + '_remove', function () {
  2328. if (_this.get('_overlays')) {
  2329. _this.get('_overlays')[overlayId_5] = null;
  2330. overlay_5.destroy();
  2331. }
  2332. });
  2333. resolve(overlay_5);
  2334. }
  2335. else {
  2336. reject();
  2337. }
  2338. });
  2339. });
  2340. };
  2341. /**
  2342. * Adds a polyline in synchronous
  2343. * @param options {PolylineOptions} options
  2344. * @return {Polyline}
  2345. */
  2346. GoogleMap.prototype.addPolylineSync = function (options) {
  2347. var _this = this;
  2348. var polyline = this._objectInstance.addPolyline(options);
  2349. var overlayId = polyline.getId();
  2350. var overlay = new Polyline(this, polyline);
  2351. this.get('_overlays')[overlayId] = overlay;
  2352. polyline.one(overlayId + '_remove', function () {
  2353. if (_this.get('_overlays')) {
  2354. _this.get('_overlays')[overlayId] = null;
  2355. overlay.destroy();
  2356. }
  2357. });
  2358. return overlay;
  2359. };
  2360. /**
  2361. * Adds a tile overlay
  2362. * @param options {TileOverlayOptions} options
  2363. * @return {Promise<TileOverlay>}
  2364. */
  2365. GoogleMap.prototype.addTileOverlay = function (options) {
  2366. var _this = this;
  2367. return new Promise(function (resolve, reject) {
  2368. _this._objectInstance.addTileOverlay(options, function (tileOverlay) {
  2369. if (tileOverlay) {
  2370. var overlayId_6 = tileOverlay.getId();
  2371. var overlay_6 = new TileOverlay(_this, tileOverlay);
  2372. _this.get('_overlays')[overlayId_6] = overlay_6;
  2373. tileOverlay.one(overlayId_6 + '_remove', function () {
  2374. if (_this.get('_overlays')) {
  2375. _this.get('_overlays')[overlayId_6] = null;
  2376. overlay_6.destroy();
  2377. }
  2378. });
  2379. resolve(overlay_6);
  2380. }
  2381. else {
  2382. reject();
  2383. }
  2384. });
  2385. });
  2386. };
  2387. /**
  2388. * Adds a tile overlay in synchronous
  2389. * @param options {TileOverlayOptions} options
  2390. * @return {TileOverlay}
  2391. */
  2392. GoogleMap.prototype.addTileOverlaySync = function (options) {
  2393. var _this = this;
  2394. var tileOverlay = this._objectInstance.addTileOverlay(options);
  2395. var overlayId = tileOverlay.getId();
  2396. var overlay = new TileOverlay(this, tileOverlay);
  2397. this.get('_overlays')[overlayId] = overlay;
  2398. tileOverlay.one(overlayId + '_remove', function () {
  2399. if (_this.get('_overlays')) {
  2400. _this.get('_overlays')[overlayId] = null;
  2401. overlay.destroy();
  2402. }
  2403. });
  2404. return overlay;
  2405. };
  2406. /**
  2407. * Adds a ground overlay
  2408. * @param options {GroundOverlayOptions} options
  2409. * @return {Promise<GroundOverlay>}
  2410. */
  2411. GoogleMap.prototype.addGroundOverlay = function (options) {
  2412. var _this = this;
  2413. return new Promise(function (resolve, reject) {
  2414. _this._objectInstance.addGroundOverlay(options, function (groundOverlay) {
  2415. if (groundOverlay) {
  2416. var overlayId_7 = groundOverlay.getId();
  2417. var overlay_7 = new GroundOverlay(_this, groundOverlay);
  2418. _this.get('_overlays')[overlayId_7] = overlay_7;
  2419. groundOverlay.one(overlayId_7 + '_remove', function () {
  2420. if (_this.get('_overlays')) {
  2421. _this.get('_overlays')[overlayId_7] = null;
  2422. overlay_7.destroy();
  2423. }
  2424. });
  2425. resolve(overlay_7);
  2426. }
  2427. else {
  2428. reject();
  2429. }
  2430. });
  2431. });
  2432. };
  2433. /**
  2434. * Adds a ground overlay in synchronous
  2435. * @param options {GroundOverlayOptions} options
  2436. * @return {GroundOverlay}
  2437. */
  2438. GoogleMap.prototype.addGroundOverlaySync = function (options) {
  2439. var _this = this;
  2440. var groundOverlay = this._objectInstance.addGroundOverlay(options);
  2441. var overlayId = groundOverlay.getId();
  2442. var overlay = new GroundOverlay(this, groundOverlay);
  2443. this.get('_overlays')[overlayId] = overlay;
  2444. groundOverlay.one(overlayId + '_remove', function () {
  2445. if (_this.get('_overlays')) {
  2446. _this.get('_overlays')[overlayId] = null;
  2447. overlay.destroy();
  2448. }
  2449. });
  2450. return overlay;
  2451. };
  2452. /**
  2453. * Adds a kml overlay
  2454. * @param options {KmlOverlayOptions} options
  2455. * @return {Promise<KmlOverlay>}
  2456. */
  2457. GoogleMap.prototype.addKmlOverlay = function (options) {
  2458. var _this = this;
  2459. return new Promise(function (resolve, reject) {
  2460. _this._objectInstance.addKmlOverlay(options, function (kmlOverlay) {
  2461. if (kmlOverlay) {
  2462. var overlayId_8 = kmlOverlay.getId();
  2463. var overlay_8 = new KmlOverlay(_this, kmlOverlay);
  2464. _this.get('_overlays')[overlayId_8] = overlay_8;
  2465. kmlOverlay.one(overlayId_8 + '_remove', function () {
  2466. if (_this.get('_overlays')) {
  2467. _this.get('_overlays')[overlayId_8] = null;
  2468. overlay_8.destroy();
  2469. }
  2470. });
  2471. resolve(overlay_8);
  2472. }
  2473. else {
  2474. reject();
  2475. }
  2476. });
  2477. });
  2478. };
  2479. /**
  2480. * Returns the base64 encoded screen capture of the map.
  2481. * @param options {ToDataUrlOptions} [options] options
  2482. * @return {Promise<string>}
  2483. */
  2484. GoogleMap.prototype.toDataURL = function (options) { return; };
  2485. __decorate([
  2486. InstanceCheck(),
  2487. __metadata("design:type", Function),
  2488. __metadata("design:paramtypes", [Object]),
  2489. __metadata("design:returntype", void 0)
  2490. ], GoogleMap.prototype, "setDiv", null);
  2491. __decorate([
  2492. CordovaInstance({ sync: true }),
  2493. __metadata("design:type", Function),
  2494. __metadata("design:paramtypes", []),
  2495. __metadata("design:returntype", HTMLElement)
  2496. ], GoogleMap.prototype, "getDiv", null);
  2497. __decorate([
  2498. CordovaInstance({ sync: true }),
  2499. __metadata("design:type", Function),
  2500. __metadata("design:paramtypes", [String]),
  2501. __metadata("design:returntype", void 0)
  2502. ], GoogleMap.prototype, "setMapTypeId", null);
  2503. __decorate([
  2504. CordovaInstance(),
  2505. __metadata("design:type", Function),
  2506. __metadata("design:paramtypes", [Object]),
  2507. __metadata("design:returntype", Promise)
  2508. ], GoogleMap.prototype, "animateCamera", null);
  2509. __decorate([
  2510. CordovaInstance(),
  2511. __metadata("design:type", Function),
  2512. __metadata("design:paramtypes", []),
  2513. __metadata("design:returntype", Promise)
  2514. ], GoogleMap.prototype, "animateCameraZoomIn", null);
  2515. __decorate([
  2516. CordovaInstance(),
  2517. __metadata("design:type", Function),
  2518. __metadata("design:paramtypes", []),
  2519. __metadata("design:returntype", Promise)
  2520. ], GoogleMap.prototype, "animateCameraZoomOut", null);
  2521. __decorate([
  2522. CordovaInstance(),
  2523. __metadata("design:type", Function),
  2524. __metadata("design:paramtypes", [Object]),
  2525. __metadata("design:returntype", Promise)
  2526. ], GoogleMap.prototype, "moveCamera", null);
  2527. __decorate([
  2528. CordovaInstance(),
  2529. __metadata("design:type", Function),
  2530. __metadata("design:paramtypes", []),
  2531. __metadata("design:returntype", Promise)
  2532. ], GoogleMap.prototype, "moveCameraZoomIn", null);
  2533. __decorate([
  2534. CordovaInstance(),
  2535. __metadata("design:type", Function),
  2536. __metadata("design:paramtypes", []),
  2537. __metadata("design:returntype", Promise)
  2538. ], GoogleMap.prototype, "moveCameraZoomOut", null);
  2539. __decorate([
  2540. CordovaInstance({ sync: true }),
  2541. __metadata("design:type", Function),
  2542. __metadata("design:paramtypes", []),
  2543. __metadata("design:returntype", Object)
  2544. ], GoogleMap.prototype, "getCameraPosition", null);
  2545. __decorate([
  2546. CordovaInstance({ sync: true }),
  2547. __metadata("design:type", Function),
  2548. __metadata("design:paramtypes", []),
  2549. __metadata("design:returntype", Object)
  2550. ], GoogleMap.prototype, "getCameraTarget", null);
  2551. __decorate([
  2552. CordovaInstance({ sync: true }),
  2553. __metadata("design:type", Function),
  2554. __metadata("design:paramtypes", []),
  2555. __metadata("design:returntype", Number)
  2556. ], GoogleMap.prototype, "getCameraZoom", null);
  2557. __decorate([
  2558. CordovaInstance({ sync: true }),
  2559. __metadata("design:type", Function),
  2560. __metadata("design:paramtypes", []),
  2561. __metadata("design:returntype", Number)
  2562. ], GoogleMap.prototype, "getCameraBearing", null);
  2563. __decorate([
  2564. CordovaInstance({ sync: true }),
  2565. __metadata("design:type", Function),
  2566. __metadata("design:paramtypes", []),
  2567. __metadata("design:returntype", Number)
  2568. ], GoogleMap.prototype, "getCameraTilt", null);
  2569. __decorate([
  2570. CordovaInstance({ sync: true }),
  2571. __metadata("design:type", Function),
  2572. __metadata("design:paramtypes", [Object]),
  2573. __metadata("design:returntype", void 0)
  2574. ], GoogleMap.prototype, "setCameraTarget", null);
  2575. __decorate([
  2576. CordovaInstance({ sync: true }),
  2577. __metadata("design:type", Function),
  2578. __metadata("design:paramtypes", [Number]),
  2579. __metadata("design:returntype", void 0)
  2580. ], GoogleMap.prototype, "setCameraZoom", null);
  2581. __decorate([
  2582. CordovaInstance({ sync: true }),
  2583. __metadata("design:type", Function),
  2584. __metadata("design:paramtypes", [Number]),
  2585. __metadata("design:returntype", void 0)
  2586. ], GoogleMap.prototype, "setCameraTilt", null);
  2587. __decorate([
  2588. CordovaInstance({ sync: true }),
  2589. __metadata("design:type", Function),
  2590. __metadata("design:paramtypes", [Object]),
  2591. __metadata("design:returntype", void 0)
  2592. ], GoogleMap.prototype, "setCameraBearing", null);
  2593. __decorate([
  2594. CordovaInstance({ sync: true }),
  2595. __metadata("design:type", Function),
  2596. __metadata("design:paramtypes", [Number, Number]),
  2597. __metadata("design:returntype", void 0)
  2598. ], GoogleMap.prototype, "panBy", null);
  2599. __decorate([
  2600. CordovaInstance({ sync: true }),
  2601. __metadata("design:type", Function),
  2602. __metadata("design:paramtypes", []),
  2603. __metadata("design:returntype", VisibleRegion)
  2604. ], GoogleMap.prototype, "getVisibleRegion", null);
  2605. __decorate([
  2606. CordovaInstance(),
  2607. __metadata("design:type", Function),
  2608. __metadata("design:paramtypes", [Object]),
  2609. __metadata("design:returntype", Promise)
  2610. ], GoogleMap.prototype, "getMyLocation", null);
  2611. __decorate([
  2612. CordovaInstance({ sync: true }),
  2613. __metadata("design:type", Function),
  2614. __metadata("design:paramtypes", [Boolean]),
  2615. __metadata("design:returntype", void 0)
  2616. ], GoogleMap.prototype, "setClickable", null);
  2617. __decorate([
  2618. CordovaInstance(),
  2619. __metadata("design:type", Function),
  2620. __metadata("design:paramtypes", []),
  2621. __metadata("design:returntype", Promise)
  2622. ], GoogleMap.prototype, "remove", null);
  2623. __decorate([
  2624. InstanceCheck(),
  2625. __metadata("design:type", Function),
  2626. __metadata("design:paramtypes", []),
  2627. __metadata("design:returntype", Promise)
  2628. ], GoogleMap.prototype, "clear", null);
  2629. __decorate([
  2630. CordovaInstance(),
  2631. __metadata("design:type", Function),
  2632. __metadata("design:paramtypes", [Object]),
  2633. __metadata("design:returntype", Promise)
  2634. ], GoogleMap.prototype, "fromLatLngToPoint", null);
  2635. __decorate([
  2636. CordovaInstance(),
  2637. __metadata("design:type", Function),
  2638. __metadata("design:paramtypes", [Array]),
  2639. __metadata("design:returntype", Promise)
  2640. ], GoogleMap.prototype, "fromPointToLatLng", null);
  2641. __decorate([
  2642. CordovaInstance({ sync: true }),
  2643. __metadata("design:type", Function),
  2644. __metadata("design:paramtypes", [Boolean]),
  2645. __metadata("design:returntype", void 0)
  2646. ], GoogleMap.prototype, "setMyLocationEnabled", null);
  2647. __decorate([
  2648. CordovaInstance({ sync: true }),
  2649. __metadata("design:type", Function),
  2650. __metadata("design:paramtypes", [Boolean]),
  2651. __metadata("design:returntype", void 0)
  2652. ], GoogleMap.prototype, "setMyLocationButtonEnabled", null);
  2653. __decorate([
  2654. CordovaInstance(),
  2655. __metadata("design:type", Function),
  2656. __metadata("design:paramtypes", []),
  2657. __metadata("design:returntype", Promise)
  2658. ], GoogleMap.prototype, "getFocusedBuilding", null);
  2659. __decorate([
  2660. CordovaInstance({ sync: true }),
  2661. __metadata("design:type", Function),
  2662. __metadata("design:paramtypes", [Boolean]),
  2663. __metadata("design:returntype", void 0)
  2664. ], GoogleMap.prototype, "setIndoorEnabled", null);
  2665. __decorate([
  2666. CordovaInstance({ sync: true }),
  2667. __metadata("design:type", Function),
  2668. __metadata("design:paramtypes", [Boolean]),
  2669. __metadata("design:returntype", void 0)
  2670. ], GoogleMap.prototype, "setTrafficEnabled", null);
  2671. __decorate([
  2672. CordovaInstance({ sync: true }),
  2673. __metadata("design:type", Function),
  2674. __metadata("design:paramtypes", [Boolean]),
  2675. __metadata("design:returntype", void 0)
  2676. ], GoogleMap.prototype, "setCompassEnabled", null);
  2677. __decorate([
  2678. CordovaInstance({ sync: true }),
  2679. __metadata("design:type", Function),
  2680. __metadata("design:paramtypes", [Boolean]),
  2681. __metadata("design:returntype", void 0)
  2682. ], GoogleMap.prototype, "setAllGesturesEnabled", null);
  2683. __decorate([
  2684. CordovaInstance({ sync: true }),
  2685. __metadata("design:type", Function),
  2686. __metadata("design:paramtypes", [Boolean]),
  2687. __metadata("design:returntype", void 0)
  2688. ], GoogleMap.prototype, "setVisible", null);
  2689. __decorate([
  2690. CordovaInstance({ sync: true }),
  2691. __metadata("design:type", Function),
  2692. __metadata("design:paramtypes", [Number, Number, Number, Number]),
  2693. __metadata("design:returntype", void 0)
  2694. ], GoogleMap.prototype, "setPadding", null);
  2695. __decorate([
  2696. CordovaInstance({ sync: true }),
  2697. __metadata("design:type", Function),
  2698. __metadata("design:paramtypes", [Object]),
  2699. __metadata("design:returntype", void 0)
  2700. ], GoogleMap.prototype, "setOptions", null);
  2701. __decorate([
  2702. InstanceCheck(),
  2703. __metadata("design:type", Function),
  2704. __metadata("design:paramtypes", [Object]),
  2705. __metadata("design:returntype", Promise)
  2706. ], GoogleMap.prototype, "addMarker", null);
  2707. __decorate([
  2708. InstanceCheck(),
  2709. __metadata("design:type", Function),
  2710. __metadata("design:paramtypes", [Object]),
  2711. __metadata("design:returntype", Marker)
  2712. ], GoogleMap.prototype, "addMarkerSync", null);
  2713. __decorate([
  2714. InstanceCheck(),
  2715. __metadata("design:type", Function),
  2716. __metadata("design:paramtypes", [Object]),
  2717. __metadata("design:returntype", Promise)
  2718. ], GoogleMap.prototype, "addMarkerCluster", null);
  2719. __decorate([
  2720. InstanceCheck(),
  2721. __metadata("design:type", Function),
  2722. __metadata("design:paramtypes", [Object]),
  2723. __metadata("design:returntype", MarkerCluster)
  2724. ], GoogleMap.prototype, "addMarkerClusterSync", null);
  2725. __decorate([
  2726. InstanceCheck(),
  2727. __metadata("design:type", Function),
  2728. __metadata("design:paramtypes", [Object]),
  2729. __metadata("design:returntype", Promise)
  2730. ], GoogleMap.prototype, "addCircle", null);
  2731. __decorate([
  2732. InstanceCheck(),
  2733. __metadata("design:type", Function),
  2734. __metadata("design:paramtypes", [Object]),
  2735. __metadata("design:returntype", Circle)
  2736. ], GoogleMap.prototype, "addCircleSync", null);
  2737. __decorate([
  2738. InstanceCheck(),
  2739. __metadata("design:type", Function),
  2740. __metadata("design:paramtypes", [Object]),
  2741. __metadata("design:returntype", Promise)
  2742. ], GoogleMap.prototype, "addPolygon", null);
  2743. __decorate([
  2744. InstanceCheck(),
  2745. __metadata("design:type", Function),
  2746. __metadata("design:paramtypes", [Object]),
  2747. __metadata("design:returntype", Polygon)
  2748. ], GoogleMap.prototype, "addPolygonSync", null);
  2749. __decorate([
  2750. InstanceCheck(),
  2751. __metadata("design:type", Function),
  2752. __metadata("design:paramtypes", [Object]),
  2753. __metadata("design:returntype", Promise)
  2754. ], GoogleMap.prototype, "addPolyline", null);
  2755. __decorate([
  2756. InstanceCheck(),
  2757. __metadata("design:type", Function),
  2758. __metadata("design:paramtypes", [Object]),
  2759. __metadata("design:returntype", Polyline)
  2760. ], GoogleMap.prototype, "addPolylineSync", null);
  2761. __decorate([
  2762. InstanceCheck(),
  2763. __metadata("design:type", Function),
  2764. __metadata("design:paramtypes", [Object]),
  2765. __metadata("design:returntype", Promise)
  2766. ], GoogleMap.prototype, "addTileOverlay", null);
  2767. __decorate([
  2768. InstanceCheck(),
  2769. __metadata("design:type", Function),
  2770. __metadata("design:paramtypes", [Object]),
  2771. __metadata("design:returntype", TileOverlay)
  2772. ], GoogleMap.prototype, "addTileOverlaySync", null);
  2773. __decorate([
  2774. InstanceCheck(),
  2775. __metadata("design:type", Function),
  2776. __metadata("design:paramtypes", [Object]),
  2777. __metadata("design:returntype", Promise)
  2778. ], GoogleMap.prototype, "addGroundOverlay", null);
  2779. __decorate([
  2780. InstanceCheck(),
  2781. __metadata("design:type", Function),
  2782. __metadata("design:paramtypes", [Object]),
  2783. __metadata("design:returntype", GroundOverlay)
  2784. ], GoogleMap.prototype, "addGroundOverlaySync", null);
  2785. __decorate([
  2786. InstanceCheck(),
  2787. __metadata("design:type", Function),
  2788. __metadata("design:paramtypes", [Object]),
  2789. __metadata("design:returntype", Promise)
  2790. ], GoogleMap.prototype, "addKmlOverlay", null);
  2791. __decorate([
  2792. CordovaInstance(),
  2793. __metadata("design:type", Function),
  2794. __metadata("design:paramtypes", [Object]),
  2795. __metadata("design:returntype", Promise)
  2796. ], GoogleMap.prototype, "toDataURL", null);
  2797. GoogleMap = __decorate([
  2798. Plugin({
  2799. pluginName: 'GoogleMaps',
  2800. plugin: 'cordova-plugin-googlemaps'
  2801. }),
  2802. __metadata("design:paramtypes", [Object, Object])
  2803. ], GoogleMap);
  2804. return GoogleMap;
  2805. }(BaseClass));
  2806. export { GoogleMap };
  2807. /**
  2808. * @hidden
  2809. */
  2810. var GroundOverlay = (function (_super) {
  2811. __extends(GroundOverlay, _super);
  2812. function GroundOverlay(_map, _objectInstance) {
  2813. var _this = _super.call(this) || this;
  2814. _this._map = _map;
  2815. _this._objectInstance = _objectInstance;
  2816. return _this;
  2817. }
  2818. /**
  2819. * Returns the ID of instance.
  2820. * @return {string}
  2821. */
  2822. GroundOverlay.prototype.getId = function () { return; };
  2823. /**
  2824. * Returns the map instance.
  2825. * @return {GoogleMap}
  2826. */
  2827. GroundOverlay.prototype.getMap = function () { return this._map; };
  2828. /**
  2829. * Changes the bounds of the GroundOverlay
  2830. * @param bounds { ILatLng[]}
  2831. */
  2832. GroundOverlay.prototype.setBounds = function (bounds) { };
  2833. /**
  2834. * Changes the bearing of the ground overlay
  2835. * @param bearing {number}
  2836. */
  2837. GroundOverlay.prototype.setBearing = function (bearing) { };
  2838. /**
  2839. * Returns the current bearing value
  2840. */
  2841. GroundOverlay.prototype.getBearing = function () { return; };
  2842. /**
  2843. * Changes the image of the ground overlay
  2844. * @param imageUrl {string} URL of image
  2845. */
  2846. GroundOverlay.prototype.setImage = function (imageUrl) { };
  2847. ;
  2848. /**
  2849. * Changes the opacity of the ground overlay from 0.0 to 1.0
  2850. * @param opacity {number}
  2851. */
  2852. GroundOverlay.prototype.setOpacity = function (opacity) { };
  2853. /**
  2854. * Returns the current opacity
  2855. * @return {number}
  2856. */
  2857. GroundOverlay.prototype.getOpacity = function () { return; };
  2858. /**
  2859. * Changes click-ability of the ground overlay
  2860. * @param clickable {boolean}
  2861. */
  2862. GroundOverlay.prototype.setClickable = function (clickable) { };
  2863. /**
  2864. * Returns true if the ground overlay is clickable
  2865. * @return {boolean}
  2866. */
  2867. GroundOverlay.prototype.getClickable = function () { return; };
  2868. /**
  2869. * Changes visibility of the ground overlay
  2870. * @param visible {boolean}
  2871. */
  2872. GroundOverlay.prototype.setVisible = function (visible) { };
  2873. /**
  2874. * Returns true if the ground overlay is visible
  2875. * @return {boolean}
  2876. */
  2877. GroundOverlay.prototype.getVisible = function () { return; };
  2878. /**
  2879. * Changes the ground overlay zIndex order
  2880. * @param index {number}
  2881. */
  2882. GroundOverlay.prototype.setZIndex = function (index) { };
  2883. /**
  2884. * Returns the current ground overlay zIndex
  2885. * @return {number}
  2886. */
  2887. GroundOverlay.prototype.getZIndex = function () { return; };
  2888. /**
  2889. * Remove the ground overlay
  2890. */
  2891. GroundOverlay.prototype.remove = function () {
  2892. delete this._objectInstance.getMap().get('_overlays')[this.getId()];
  2893. this._objectInstance.remove();
  2894. this.destroy();
  2895. };
  2896. __decorate([
  2897. CordovaInstance({ sync: true }),
  2898. __metadata("design:type", Function),
  2899. __metadata("design:paramtypes", []),
  2900. __metadata("design:returntype", String)
  2901. ], GroundOverlay.prototype, "getId", null);
  2902. __decorate([
  2903. CordovaInstance({ sync: true }),
  2904. __metadata("design:type", Function),
  2905. __metadata("design:paramtypes", [Array]),
  2906. __metadata("design:returntype", void 0)
  2907. ], GroundOverlay.prototype, "setBounds", null);
  2908. __decorate([
  2909. CordovaInstance({ sync: true }),
  2910. __metadata("design:type", Function),
  2911. __metadata("design:paramtypes", [Number]),
  2912. __metadata("design:returntype", void 0)
  2913. ], GroundOverlay.prototype, "setBearing", null);
  2914. __decorate([
  2915. CordovaInstance({ sync: true }),
  2916. __metadata("design:type", Function),
  2917. __metadata("design:paramtypes", []),
  2918. __metadata("design:returntype", Number)
  2919. ], GroundOverlay.prototype, "getBearing", null);
  2920. __decorate([
  2921. CordovaInstance({ sync: true }),
  2922. __metadata("design:type", Function),
  2923. __metadata("design:paramtypes", [String]),
  2924. __metadata("design:returntype", void 0)
  2925. ], GroundOverlay.prototype, "setImage", null);
  2926. __decorate([
  2927. CordovaInstance({ sync: true }),
  2928. __metadata("design:type", Function),
  2929. __metadata("design:paramtypes", [Number]),
  2930. __metadata("design:returntype", void 0)
  2931. ], GroundOverlay.prototype, "setOpacity", null);
  2932. __decorate([
  2933. CordovaInstance({ sync: true }),
  2934. __metadata("design:type", Function),
  2935. __metadata("design:paramtypes", []),
  2936. __metadata("design:returntype", Number)
  2937. ], GroundOverlay.prototype, "getOpacity", null);
  2938. __decorate([
  2939. CordovaInstance({ sync: true }),
  2940. __metadata("design:type", Function),
  2941. __metadata("design:paramtypes", [Boolean]),
  2942. __metadata("design:returntype", void 0)
  2943. ], GroundOverlay.prototype, "setClickable", null);
  2944. __decorate([
  2945. CordovaInstance({ sync: true }),
  2946. __metadata("design:type", Function),
  2947. __metadata("design:paramtypes", []),
  2948. __metadata("design:returntype", Boolean)
  2949. ], GroundOverlay.prototype, "getClickable", null);
  2950. __decorate([
  2951. CordovaInstance({ sync: true }),
  2952. __metadata("design:type", Function),
  2953. __metadata("design:paramtypes", [Boolean]),
  2954. __metadata("design:returntype", void 0)
  2955. ], GroundOverlay.prototype, "setVisible", null);
  2956. __decorate([
  2957. CordovaInstance({ sync: true }),
  2958. __metadata("design:type", Function),
  2959. __metadata("design:paramtypes", []),
  2960. __metadata("design:returntype", Boolean)
  2961. ], GroundOverlay.prototype, "getVisible", null);
  2962. __decorate([
  2963. CordovaInstance({ sync: true }),
  2964. __metadata("design:type", Function),
  2965. __metadata("design:paramtypes", [Number]),
  2966. __metadata("design:returntype", void 0)
  2967. ], GroundOverlay.prototype, "setZIndex", null);
  2968. __decorate([
  2969. CordovaInstance({ sync: true }),
  2970. __metadata("design:type", Function),
  2971. __metadata("design:paramtypes", []),
  2972. __metadata("design:returntype", Number)
  2973. ], GroundOverlay.prototype, "getZIndex", null);
  2974. __decorate([
  2975. CordovaCheck(),
  2976. __metadata("design:type", Function),
  2977. __metadata("design:paramtypes", []),
  2978. __metadata("design:returntype", void 0)
  2979. ], GroundOverlay.prototype, "remove", null);
  2980. return GroundOverlay;
  2981. }(BaseClass));
  2982. export { GroundOverlay };
  2983. /**
  2984. * @hidden
  2985. */
  2986. var HtmlInfoWindow = (function (_super) {
  2987. __extends(HtmlInfoWindow, _super);
  2988. function HtmlInfoWindow() {
  2989. var _this = _super.call(this) || this;
  2990. _this._objectInstance = new (GoogleMaps.getPlugin().HtmlInfoWindow)();
  2991. return _this;
  2992. }
  2993. /**
  2994. * Changes the backgroundColor
  2995. * @param color {string}
  2996. */
  2997. HtmlInfoWindow.prototype.setBackgroundColor = function (color) { };
  2998. /**
  2999. * Set your HTML contents.
  3000. * @param content {any} String containing text or HTML element
  3001. * @param cssOptions? {any} CSS styles for the container element of HTMLInfoWindow
  3002. */
  3003. HtmlInfoWindow.prototype.setContent = function (content, cssOptions) { };
  3004. /**
  3005. * Open the htmlInfoWindow
  3006. * @param marker {Marker}
  3007. */
  3008. HtmlInfoWindow.prototype.open = function (marker) { };
  3009. /**
  3010. * Close the htmlInfoWindow
  3011. */
  3012. HtmlInfoWindow.prototype.close = function () { };
  3013. __decorate([
  3014. CordovaInstance(),
  3015. __metadata("design:type", Function),
  3016. __metadata("design:paramtypes", [String]),
  3017. __metadata("design:returntype", void 0)
  3018. ], HtmlInfoWindow.prototype, "setBackgroundColor", null);
  3019. __decorate([
  3020. CordovaInstance(),
  3021. __metadata("design:type", Function),
  3022. __metadata("design:paramtypes", [Object, Object]),
  3023. __metadata("design:returntype", void 0)
  3024. ], HtmlInfoWindow.prototype, "setContent", null);
  3025. __decorate([
  3026. CordovaInstance(),
  3027. __metadata("design:type", Function),
  3028. __metadata("design:paramtypes", [Object]),
  3029. __metadata("design:returntype", Object)
  3030. ], HtmlInfoWindow.prototype, "open", null);
  3031. __decorate([
  3032. CordovaInstance(),
  3033. __metadata("design:type", Function),
  3034. __metadata("design:paramtypes", []),
  3035. __metadata("design:returntype", void 0)
  3036. ], HtmlInfoWindow.prototype, "close", null);
  3037. HtmlInfoWindow = __decorate([
  3038. Plugin({
  3039. plugin: 'cordova-plugin-googlemaps',
  3040. pluginName: 'GoogleMaps',
  3041. pluginRef: 'plugin.google.maps.HtmlInfoWindow',
  3042. repo: ''
  3043. }),
  3044. __metadata("design:paramtypes", [])
  3045. ], HtmlInfoWindow);
  3046. return HtmlInfoWindow;
  3047. }(BaseClass));
  3048. export { HtmlInfoWindow };
  3049. /**
  3050. * @hidden
  3051. */
  3052. var Marker = (function (_super) {
  3053. __extends(Marker, _super);
  3054. function Marker(_map, _objectInstance) {
  3055. var _this = _super.call(this) || this;
  3056. _this._map = _map;
  3057. _this._objectInstance = _objectInstance;
  3058. return _this;
  3059. }
  3060. /**
  3061. * Returns the ID of instance.
  3062. * @return {string}
  3063. */
  3064. Marker.prototype.getId = function () { return; };
  3065. /**
  3066. * Returns the map instance.
  3067. * @return {GoogleMap}
  3068. */
  3069. Marker.prototype.getMap = function () { return this._map; };
  3070. /**
  3071. * Set the marker position.
  3072. * @param latLng {ILatLng}
  3073. */
  3074. Marker.prototype.setPosition = function (latLng) { return; };
  3075. /**
  3076. * Returns the marker position.
  3077. * @return {ILatLng}
  3078. */
  3079. Marker.prototype.getPosition = function () { return; };
  3080. /**
  3081. * Show the normal infoWindow of the marker.
  3082. */
  3083. Marker.prototype.showInfoWindow = function () { };
  3084. /**
  3085. * Hide the normal infoWindow of the marker.
  3086. */
  3087. Marker.prototype.hideInfoWindow = function () { };
  3088. /**
  3089. * Specify the animation either `DROP` or `BOUNCE`
  3090. * @param animation {string}
  3091. */
  3092. Marker.prototype.setAnimation = function (animation) { };
  3093. /**
  3094. * Set true if you **do not want** to move the map when you click on the marker.
  3095. * @param disableAutoPan {boolean}
  3096. */
  3097. Marker.prototype.setDisableAutoPan = function (disableAutoPan) { };
  3098. /**
  3099. * Set false if you want to hide the marker.
  3100. * @param visible
  3101. */
  3102. Marker.prototype.setVisible = function (visible) { };
  3103. /**
  3104. * Returns true if the marker is visible
  3105. */
  3106. Marker.prototype.isVisible = function () { return; };
  3107. /**
  3108. * Changes title of the normal infoWindow.
  3109. * @param title {string}
  3110. */
  3111. Marker.prototype.setTitle = function (title) { };
  3112. /**
  3113. * Returns the title strings.
  3114. * @return {string}
  3115. */
  3116. Marker.prototype.getTitle = function () { return; };
  3117. /**
  3118. * Changes snippet of the normal infoWindow.
  3119. * @param snippet {string}
  3120. */
  3121. Marker.prototype.setSnippet = function (snippet) { };
  3122. /**
  3123. * Returns the snippet strings.
  3124. * @return {string}
  3125. */
  3126. Marker.prototype.getSnippet = function () { return; };
  3127. /**
  3128. * Changes the marker opacity from 0.0 to 1.0.
  3129. * @param alpha {number} Opacity
  3130. */
  3131. Marker.prototype.setOpacity = function (alpha) { };
  3132. /**
  3133. * Returns the marker opacity.
  3134. * @return {number} Opacity
  3135. */
  3136. Marker.prototype.getOpacity = function () { return; };
  3137. /**
  3138. * Remove the marker.
  3139. */
  3140. Marker.prototype.remove = function () {
  3141. delete this._objectInstance.getMap().get('_overlays')[this.getId()];
  3142. this._objectInstance.remove();
  3143. this.destroy();
  3144. };
  3145. /**
  3146. * Changes the info window anchor. This defaults to 50% from the left of the image and at the bottom of the image.
  3147. * @param x {number} Distance from left of the icon image in pixels.
  3148. * @param y {number} Distance from top of the icon image in pixels.
  3149. */
  3150. Marker.prototype.setIconAnchor = function (x, y) { };
  3151. /**
  3152. * Changes the info window anchor. This defaults to 50% from the left of the image and at the top of the image.
  3153. * @param x {number} Distance from left of the icon image in pixels.
  3154. * @param y {number} Distance from top of the icon image in pixels.
  3155. */
  3156. Marker.prototype.setInfoWindowAnchor = function (x, y) { };
  3157. /**
  3158. * Returns true if the infoWindow is shown on the marker
  3159. * @return {boolean}
  3160. */
  3161. Marker.prototype.isInfoWindowShown = function () { return; };
  3162. /**
  3163. * Higher zIndex value overlays will be drawn on top of lower zIndex value tile layers and overlays.
  3164. * @param y {number} z-index
  3165. */
  3166. Marker.prototype.setZIndex = function (zIndex) { };
  3167. /**
  3168. * Get z-index
  3169. * @return {number}
  3170. */
  3171. Marker.prototype.getZIndex = function () { return; };
  3172. /**
  3173. * Set true if you allow all users to drag the marker.
  3174. * @param draggable {boolean}
  3175. */
  3176. Marker.prototype.setDraggable = function (draggable) { };
  3177. /**
  3178. * Returns true if the marker drag is enabled.
  3179. * @return {boolean}
  3180. */
  3181. Marker.prototype.isDraggable = function () { return; };
  3182. /**
  3183. * Set true if you want to be flat marker.
  3184. * @param flat {boolean}
  3185. */
  3186. Marker.prototype.setFlat = function (flat) { return; };
  3187. /**
  3188. * Changes icon url and/or size
  3189. * @param icon
  3190. */
  3191. Marker.prototype.setIcon = function (icon) { return; };
  3192. /**
  3193. * Set the marker rotation angle.
  3194. * @param rotation {number}
  3195. */
  3196. Marker.prototype.setRotation = function (rotation) { };
  3197. /**
  3198. * Returns the marker rotation angle.
  3199. * @return {number}
  3200. */
  3201. Marker.prototype.getRotation = function () { return; };
  3202. __decorate([
  3203. CordovaInstance({ sync: true }),
  3204. __metadata("design:type", Function),
  3205. __metadata("design:paramtypes", []),
  3206. __metadata("design:returntype", String)
  3207. ], Marker.prototype, "getId", null);
  3208. __decorate([
  3209. CordovaInstance({ sync: true }),
  3210. __metadata("design:type", Function),
  3211. __metadata("design:paramtypes", [Object]),
  3212. __metadata("design:returntype", void 0)
  3213. ], Marker.prototype, "setPosition", null);
  3214. __decorate([
  3215. CordovaInstance({ sync: true }),
  3216. __metadata("design:type", Function),
  3217. __metadata("design:paramtypes", []),
  3218. __metadata("design:returntype", Object)
  3219. ], Marker.prototype, "getPosition", null);
  3220. __decorate([
  3221. CordovaInstance({ sync: true }),
  3222. __metadata("design:type", Function),
  3223. __metadata("design:paramtypes", []),
  3224. __metadata("design:returntype", void 0)
  3225. ], Marker.prototype, "showInfoWindow", null);
  3226. __decorate([
  3227. CordovaInstance({ sync: true }),
  3228. __metadata("design:type", Function),
  3229. __metadata("design:paramtypes", []),
  3230. __metadata("design:returntype", void 0)
  3231. ], Marker.prototype, "hideInfoWindow", null);
  3232. __decorate([
  3233. CordovaInstance({ sync: true }),
  3234. __metadata("design:type", Function),
  3235. __metadata("design:paramtypes", [String]),
  3236. __metadata("design:returntype", void 0)
  3237. ], Marker.prototype, "setAnimation", null);
  3238. __decorate([
  3239. CordovaInstance({ sync: true }),
  3240. __metadata("design:type", Function),
  3241. __metadata("design:paramtypes", [Boolean]),
  3242. __metadata("design:returntype", void 0)
  3243. ], Marker.prototype, "setDisableAutoPan", null);
  3244. __decorate([
  3245. CordovaInstance({ sync: true }),
  3246. __metadata("design:type", Function),
  3247. __metadata("design:paramtypes", [Boolean]),
  3248. __metadata("design:returntype", void 0)
  3249. ], Marker.prototype, "setVisible", null);
  3250. __decorate([
  3251. CordovaInstance({ sync: true }),
  3252. __metadata("design:type", Function),
  3253. __metadata("design:paramtypes", []),
  3254. __metadata("design:returntype", Boolean)
  3255. ], Marker.prototype, "isVisible", null);
  3256. __decorate([
  3257. CordovaInstance({ sync: true }),
  3258. __metadata("design:type", Function),
  3259. __metadata("design:paramtypes", [String]),
  3260. __metadata("design:returntype", void 0)
  3261. ], Marker.prototype, "setTitle", null);
  3262. __decorate([
  3263. CordovaInstance({ sync: true }),
  3264. __metadata("design:type", Function),
  3265. __metadata("design:paramtypes", []),
  3266. __metadata("design:returntype", String)
  3267. ], Marker.prototype, "getTitle", null);
  3268. __decorate([
  3269. CordovaInstance({ sync: true }),
  3270. __metadata("design:type", Function),
  3271. __metadata("design:paramtypes", [String]),
  3272. __metadata("design:returntype", void 0)
  3273. ], Marker.prototype, "setSnippet", null);
  3274. __decorate([
  3275. CordovaInstance({ sync: true }),
  3276. __metadata("design:type", Function),
  3277. __metadata("design:paramtypes", []),
  3278. __metadata("design:returntype", String)
  3279. ], Marker.prototype, "getSnippet", null);
  3280. __decorate([
  3281. CordovaInstance({ sync: true }),
  3282. __metadata("design:type", Function),
  3283. __metadata("design:paramtypes", [Number]),
  3284. __metadata("design:returntype", void 0)
  3285. ], Marker.prototype, "setOpacity", null);
  3286. __decorate([
  3287. CordovaInstance({ sync: true }),
  3288. __metadata("design:type", Function),
  3289. __metadata("design:paramtypes", []),
  3290. __metadata("design:returntype", Number)
  3291. ], Marker.prototype, "getOpacity", null);
  3292. __decorate([
  3293. CordovaCheck(),
  3294. __metadata("design:type", Function),
  3295. __metadata("design:paramtypes", []),
  3296. __metadata("design:returntype", void 0)
  3297. ], Marker.prototype, "remove", null);
  3298. __decorate([
  3299. CordovaInstance({ sync: true }),
  3300. __metadata("design:type", Function),
  3301. __metadata("design:paramtypes", [Number, Number]),
  3302. __metadata("design:returntype", void 0)
  3303. ], Marker.prototype, "setIconAnchor", null);
  3304. __decorate([
  3305. CordovaInstance({ sync: true }),
  3306. __metadata("design:type", Function),
  3307. __metadata("design:paramtypes", [Number, Number]),
  3308. __metadata("design:returntype", void 0)
  3309. ], Marker.prototype, "setInfoWindowAnchor", null);
  3310. __decorate([
  3311. CordovaInstance({ sync: true }),
  3312. __metadata("design:type", Function),
  3313. __metadata("design:paramtypes", []),
  3314. __metadata("design:returntype", Boolean)
  3315. ], Marker.prototype, "isInfoWindowShown", null);
  3316. __decorate([
  3317. CordovaInstance({ sync: true }),
  3318. __metadata("design:type", Function),
  3319. __metadata("design:paramtypes", [Number]),
  3320. __metadata("design:returntype", void 0)
  3321. ], Marker.prototype, "setZIndex", null);
  3322. __decorate([
  3323. CordovaInstance({ sync: true }),
  3324. __metadata("design:type", Function),
  3325. __metadata("design:paramtypes", []),
  3326. __metadata("design:returntype", Number)
  3327. ], Marker.prototype, "getZIndex", null);
  3328. __decorate([
  3329. CordovaInstance({ sync: true }),
  3330. __metadata("design:type", Function),
  3331. __metadata("design:paramtypes", [Boolean]),
  3332. __metadata("design:returntype", void 0)
  3333. ], Marker.prototype, "setDraggable", null);
  3334. __decorate([
  3335. CordovaInstance({ sync: true }),
  3336. __metadata("design:type", Function),
  3337. __metadata("design:paramtypes", []),
  3338. __metadata("design:returntype", Boolean)
  3339. ], Marker.prototype, "isDraggable", null);
  3340. __decorate([
  3341. CordovaInstance({ sync: true }),
  3342. __metadata("design:type", Function),
  3343. __metadata("design:paramtypes", [Boolean]),
  3344. __metadata("design:returntype", void 0)
  3345. ], Marker.prototype, "setFlat", null);
  3346. __decorate([
  3347. CordovaInstance({ sync: true }),
  3348. __metadata("design:type", Function),
  3349. __metadata("design:paramtypes", [Object]),
  3350. __metadata("design:returntype", void 0)
  3351. ], Marker.prototype, "setIcon", null);
  3352. __decorate([
  3353. CordovaInstance({ sync: true }),
  3354. __metadata("design:type", Function),
  3355. __metadata("design:paramtypes", [Number]),
  3356. __metadata("design:returntype", void 0)
  3357. ], Marker.prototype, "setRotation", null);
  3358. __decorate([
  3359. CordovaInstance({ sync: true }),
  3360. __metadata("design:type", Function),
  3361. __metadata("design:paramtypes", []),
  3362. __metadata("design:returntype", Number)
  3363. ], Marker.prototype, "getRotation", null);
  3364. return Marker;
  3365. }(BaseClass));
  3366. export { Marker };
  3367. /**
  3368. * @hidden
  3369. */
  3370. var MarkerCluster = (function (_super) {
  3371. __extends(MarkerCluster, _super);
  3372. function MarkerCluster(_map, _objectInstance) {
  3373. var _this = _super.call(this) || this;
  3374. _this._map = _map;
  3375. _this._objectInstance = _objectInstance;
  3376. return _this;
  3377. }
  3378. /**
  3379. * Returns the ID of instance.
  3380. * @return {string}
  3381. */
  3382. MarkerCluster.prototype.getId = function () { return; };
  3383. /**
  3384. * Add one marker location
  3385. * @param marker {MarkerOptions} one location
  3386. * @param skipRedraw? {boolean} marker cluster does not redraw the marker cluster if true.
  3387. */
  3388. MarkerCluster.prototype.addMarker = function (marker, skipRedraw) { };
  3389. /**
  3390. * Add marker locations
  3391. * @param markers {MarkerOptions[]} multiple location
  3392. */
  3393. MarkerCluster.prototype.addMarkers = function (markers) { };
  3394. /**
  3395. * Remove the marker cluster
  3396. */
  3397. MarkerCluster.prototype.remove = function () {
  3398. this._objectInstance.set('_overlays', undefined);
  3399. delete this._objectInstance.getMap().get('_overlays')[this.getId()];
  3400. this._objectInstance.remove();
  3401. this.destroy();
  3402. };
  3403. /**
  3404. * Returns the map instance.
  3405. * @return {GoogleMap}
  3406. */
  3407. MarkerCluster.prototype.getMap = function () { return this._map; };
  3408. __decorate([
  3409. CordovaInstance({ sync: true }),
  3410. __metadata("design:type", Function),
  3411. __metadata("design:paramtypes", []),
  3412. __metadata("design:returntype", String)
  3413. ], MarkerCluster.prototype, "getId", null);
  3414. __decorate([
  3415. CordovaInstance({ sync: true }),
  3416. __metadata("design:type", Function),
  3417. __metadata("design:paramtypes", [Object, Boolean]),
  3418. __metadata("design:returntype", void 0)
  3419. ], MarkerCluster.prototype, "addMarker", null);
  3420. __decorate([
  3421. CordovaInstance({ sync: true }),
  3422. __metadata("design:type", Function),
  3423. __metadata("design:paramtypes", [Array]),
  3424. __metadata("design:returntype", void 0)
  3425. ], MarkerCluster.prototype, "addMarkers", null);
  3426. __decorate([
  3427. InstanceCheck(),
  3428. __metadata("design:type", Function),
  3429. __metadata("design:paramtypes", []),
  3430. __metadata("design:returntype", void 0)
  3431. ], MarkerCluster.prototype, "remove", null);
  3432. return MarkerCluster;
  3433. }(BaseClass));
  3434. export { MarkerCluster };
  3435. /**
  3436. * @hidden
  3437. */
  3438. var Polygon = (function (_super) {
  3439. __extends(Polygon, _super);
  3440. function Polygon(_map, _objectInstance) {
  3441. var _this = _super.call(this) || this;
  3442. _this._map = _map;
  3443. _this._objectInstance = _objectInstance;
  3444. return _this;
  3445. }
  3446. /**
  3447. * Returns the ID of instance.
  3448. * @return {string}
  3449. */
  3450. Polygon.prototype.getId = function () { return; };
  3451. /**
  3452. * Returns the map instance.
  3453. * @return {GoogleMap}
  3454. */
  3455. Polygon.prototype.getMap = function () { return this._map; };
  3456. /**
  3457. * Changes the polygon points.
  3458. * @param points {ILatLng[]}
  3459. */
  3460. Polygon.prototype.setPoints = function (points) { };
  3461. /**
  3462. * Returns an instance of the BaseArrayClass.
  3463. * You can modify the points.
  3464. * @return {BaseArrayClass<ILatLng>}
  3465. */
  3466. Polygon.prototype.getPoints = function () {
  3467. return new BaseArrayClass(this._objectInstance.getPoints());
  3468. };
  3469. /**
  3470. * Changes the polygon holes.
  3471. * @param holes {ILatLng[][]}
  3472. */
  3473. Polygon.prototype.setHoles = function (holes) { };
  3474. /**
  3475. * Returns an instance of the BaseArrayClass.
  3476. * You can modify the holes.
  3477. * @return {BaseArrayClass<ILatLng[]>}
  3478. */
  3479. Polygon.prototype.getHoles = function () {
  3480. var holes = this._objectInstance.getPoints();
  3481. var results = new BaseArrayClass();
  3482. holes.forEach(function (hole) {
  3483. results.push(hole);
  3484. });
  3485. return results;
  3486. };
  3487. /**
  3488. * Changes the filling color (inner color)
  3489. * @param fillColor {string}
  3490. */
  3491. Polygon.prototype.setFillColor = function (fillColor) { };
  3492. /**
  3493. * Returns the current polygon filling color (inner color).
  3494. * @return {string}
  3495. */
  3496. Polygon.prototype.getFillColor = function () { return; };
  3497. /**
  3498. * Changes the stroke color (outer color)
  3499. * @param strokeColor {string}
  3500. */
  3501. Polygon.prototype.setStrokeColor = function (strokeColor) { };
  3502. /**
  3503. * Returns the current polygon stroke color (outer color)
  3504. * @return {string}
  3505. */
  3506. Polygon.prototype.getStrokeColor = function () { return; };
  3507. /**
  3508. * Changes click-ability of the polygon
  3509. * @param clickable {boolean}
  3510. */
  3511. Polygon.prototype.setClickable = function (clickable) { };
  3512. /**
  3513. * Returns true if the polygon is clickable
  3514. */
  3515. Polygon.prototype.getClickable = function () { return; };
  3516. /**
  3517. * Changes visibility of the polygon
  3518. * @param visible {boolean}
  3519. */
  3520. Polygon.prototype.setVisible = function (visible) { };
  3521. /**
  3522. * Returns true if the polygon is visible
  3523. * @return {boolean}
  3524. */
  3525. Polygon.prototype.getVisible = function () { return; };
  3526. /**
  3527. * Changes the polygon zIndex order.
  3528. * @param zIndex {number}
  3529. */
  3530. Polygon.prototype.setZIndex = function (zIndex) { };
  3531. /**
  3532. * Returns the current polygon zIndex
  3533. * @return {number}
  3534. */
  3535. Polygon.prototype.getZIndex = function () { return; };
  3536. /**
  3537. * Remove the polygon.
  3538. */
  3539. Polygon.prototype.remove = function () {
  3540. delete this._objectInstance.getMap().get('_overlays')[this.getId()];
  3541. this._objectInstance.remove();
  3542. this.destroy();
  3543. };
  3544. /**
  3545. * Changes the polygon stroke width
  3546. */
  3547. Polygon.prototype.setStrokeWidth = function (strokeWidth) { };
  3548. /**
  3549. * Returns the polygon stroke width
  3550. */
  3551. Polygon.prototype.getStrokeWidth = function () { return; };
  3552. /**
  3553. * When true, edges of the polygon are interpreted as geodesic and will follow the curvature of the Earth.
  3554. * @param geodesic {boolean}
  3555. */
  3556. Polygon.prototype.setGeodesic = function (geodesic) { };
  3557. /**
  3558. * Returns true if the polygon is geodesic.
  3559. * @return {boolean}
  3560. */
  3561. Polygon.prototype.getGeodesic = function () { return; };
  3562. __decorate([
  3563. CordovaInstance({ sync: true }),
  3564. __metadata("design:type", Function),
  3565. __metadata("design:paramtypes", []),
  3566. __metadata("design:returntype", String)
  3567. ], Polygon.prototype, "getId", null);
  3568. __decorate([
  3569. CordovaInstance({ sync: true }),
  3570. __metadata("design:type", Function),
  3571. __metadata("design:paramtypes", [Array]),
  3572. __metadata("design:returntype", void 0)
  3573. ], Polygon.prototype, "setPoints", null);
  3574. __decorate([
  3575. CordovaCheck(),
  3576. __metadata("design:type", Function),
  3577. __metadata("design:paramtypes", []),
  3578. __metadata("design:returntype", BaseArrayClass)
  3579. ], Polygon.prototype, "getPoints", null);
  3580. __decorate([
  3581. CordovaInstance({ sync: true }),
  3582. __metadata("design:type", Function),
  3583. __metadata("design:paramtypes", [Array]),
  3584. __metadata("design:returntype", void 0)
  3585. ], Polygon.prototype, "setHoles", null);
  3586. __decorate([
  3587. CordovaCheck(),
  3588. __metadata("design:type", Function),
  3589. __metadata("design:paramtypes", []),
  3590. __metadata("design:returntype", BaseArrayClass)
  3591. ], Polygon.prototype, "getHoles", null);
  3592. __decorate([
  3593. CordovaInstance({ sync: true }),
  3594. __metadata("design:type", Function),
  3595. __metadata("design:paramtypes", [String]),
  3596. __metadata("design:returntype", void 0)
  3597. ], Polygon.prototype, "setFillColor", null);
  3598. __decorate([
  3599. CordovaInstance({ sync: true }),
  3600. __metadata("design:type", Function),
  3601. __metadata("design:paramtypes", []),
  3602. __metadata("design:returntype", String)
  3603. ], Polygon.prototype, "getFillColor", null);
  3604. __decorate([
  3605. CordovaInstance({ sync: true }),
  3606. __metadata("design:type", Function),
  3607. __metadata("design:paramtypes", [String]),
  3608. __metadata("design:returntype", void 0)
  3609. ], Polygon.prototype, "setStrokeColor", null);
  3610. __decorate([
  3611. CordovaInstance({ sync: true }),
  3612. __metadata("design:type", Function),
  3613. __metadata("design:paramtypes", []),
  3614. __metadata("design:returntype", String)
  3615. ], Polygon.prototype, "getStrokeColor", null);
  3616. __decorate([
  3617. CordovaInstance({ sync: true }),
  3618. __metadata("design:type", Function),
  3619. __metadata("design:paramtypes", [Boolean]),
  3620. __metadata("design:returntype", void 0)
  3621. ], Polygon.prototype, "setClickable", null);
  3622. __decorate([
  3623. CordovaInstance({ sync: true }),
  3624. __metadata("design:type", Function),
  3625. __metadata("design:paramtypes", []),
  3626. __metadata("design:returntype", Boolean)
  3627. ], Polygon.prototype, "getClickable", null);
  3628. __decorate([
  3629. CordovaInstance({ sync: true }),
  3630. __metadata("design:type", Function),
  3631. __metadata("design:paramtypes", [Boolean]),
  3632. __metadata("design:returntype", void 0)
  3633. ], Polygon.prototype, "setVisible", null);
  3634. __decorate([
  3635. CordovaInstance({ sync: true }),
  3636. __metadata("design:type", Function),
  3637. __metadata("design:paramtypes", []),
  3638. __metadata("design:returntype", Boolean)
  3639. ], Polygon.prototype, "getVisible", null);
  3640. __decorate([
  3641. CordovaInstance({ sync: true }),
  3642. __metadata("design:type", Function),
  3643. __metadata("design:paramtypes", [Number]),
  3644. __metadata("design:returntype", void 0)
  3645. ], Polygon.prototype, "setZIndex", null);
  3646. __decorate([
  3647. CordovaInstance({ sync: true }),
  3648. __metadata("design:type", Function),
  3649. __metadata("design:paramtypes", []),
  3650. __metadata("design:returntype", Number)
  3651. ], Polygon.prototype, "getZIndex", null);
  3652. __decorate([
  3653. InstanceCheck(),
  3654. __metadata("design:type", Function),
  3655. __metadata("design:paramtypes", []),
  3656. __metadata("design:returntype", void 0)
  3657. ], Polygon.prototype, "remove", null);
  3658. __decorate([
  3659. CordovaInstance({ sync: true }),
  3660. __metadata("design:type", Function),
  3661. __metadata("design:paramtypes", [Number]),
  3662. __metadata("design:returntype", void 0)
  3663. ], Polygon.prototype, "setStrokeWidth", null);
  3664. __decorate([
  3665. CordovaInstance({ sync: true }),
  3666. __metadata("design:type", Function),
  3667. __metadata("design:paramtypes", []),
  3668. __metadata("design:returntype", Number)
  3669. ], Polygon.prototype, "getStrokeWidth", null);
  3670. __decorate([
  3671. CordovaInstance({ sync: true }),
  3672. __metadata("design:type", Function),
  3673. __metadata("design:paramtypes", [Boolean]),
  3674. __metadata("design:returntype", void 0)
  3675. ], Polygon.prototype, "setGeodesic", null);
  3676. __decorate([
  3677. CordovaInstance({ sync: true }),
  3678. __metadata("design:type", Function),
  3679. __metadata("design:paramtypes", []),
  3680. __metadata("design:returntype", Boolean)
  3681. ], Polygon.prototype, "getGeodesic", null);
  3682. return Polygon;
  3683. }(BaseClass));
  3684. export { Polygon };
  3685. /**
  3686. * @hidden
  3687. */
  3688. var Polyline = (function (_super) {
  3689. __extends(Polyline, _super);
  3690. function Polyline(_map, _objectInstance) {
  3691. var _this = _super.call(this) || this;
  3692. _this._map = _map;
  3693. _this._objectInstance = _objectInstance;
  3694. return _this;
  3695. }
  3696. /**
  3697. * Returns the ID of instance.
  3698. * @return {string}
  3699. */
  3700. Polyline.prototype.getId = function () { return; };
  3701. /**
  3702. * Returns the map instance.
  3703. * @return {GoogleMap}
  3704. */
  3705. Polyline.prototype.getMap = function () { return this._map; };
  3706. /**
  3707. * Changes the polyline points.
  3708. * @param points {ILatLng[]}
  3709. */
  3710. Polyline.prototype.setPoints = function (points) { };
  3711. /**
  3712. * Returns an instance of the BaseArrayClass
  3713. * You can modify the points.
  3714. * @return {BaseArrayClass<ILatLng>}
  3715. */
  3716. Polyline.prototype.getPoints = function () {
  3717. return new BaseArrayClass(this._objectInstance.getPoints());
  3718. };
  3719. /**
  3720. * When true, edges of the polyline are interpreted as geodesic and will follow the curvature of the Earth.
  3721. * @param geoDesic {boolean}
  3722. */
  3723. Polyline.prototype.setGeoDesic = function (geoDesic) { };
  3724. /**
  3725. * Returns true if the polyline is geodesic
  3726. */
  3727. Polyline.prototype.getGeodesic = function () { return; };
  3728. /**
  3729. * Changes visibility of the polyline
  3730. * @param visible {boolean}
  3731. */
  3732. Polyline.prototype.setVisible = function (visible) { };
  3733. /**
  3734. * Returns true if the polyline is visible
  3735. * @return {boolean}
  3736. */
  3737. Polyline.prototype.getVisible = function () { return; };
  3738. /**
  3739. * Changes click-ability of the polyline
  3740. * @param clickable {boolean}
  3741. */
  3742. Polyline.prototype.setClickable = function (clickable) { };
  3743. /**
  3744. * Returns true if the polyline is clickable
  3745. * @return {boolean}
  3746. */
  3747. Polyline.prototype.getClickable = function () { return; };
  3748. /**
  3749. * Changes the polyline color
  3750. * @param strokeColor {string}
  3751. */
  3752. Polyline.prototype.setStrokeColor = function (strokeColor) { };
  3753. /**
  3754. * Returns the current polyline color
  3755. * @return {string}
  3756. */
  3757. Polyline.prototype.getStrokeColor = function () { return; };
  3758. /**
  3759. * Changes the polyline stroke width
  3760. * @param strokeWidth {number}
  3761. */
  3762. Polyline.prototype.setStrokeWidth = function (strokeWidth) { };
  3763. /**
  3764. * Returns the current stroke width (unit: pixel).
  3765. * @return {number}
  3766. */
  3767. Polyline.prototype.getStrokeWidth = function () { return; };
  3768. /**
  3769. * Changes the polyline zIndex order.
  3770. * @param index {number}
  3771. */
  3772. Polyline.prototype.setZIndex = function (index) { };
  3773. /**
  3774. * Returns the current polyline zIndex
  3775. * @return {number}
  3776. */
  3777. Polyline.prototype.getZIndex = function () { return; };
  3778. /**
  3779. * Remove the polyline
  3780. */
  3781. Polyline.prototype.remove = function () {
  3782. delete this._objectInstance.getMap().get('_overlays')[this.getId()];
  3783. this._objectInstance.remove();
  3784. this.destroy();
  3785. };
  3786. __decorate([
  3787. CordovaInstance({ sync: true }),
  3788. __metadata("design:type", Function),
  3789. __metadata("design:paramtypes", []),
  3790. __metadata("design:returntype", String)
  3791. ], Polyline.prototype, "getId", null);
  3792. __decorate([
  3793. CordovaInstance({ sync: true }),
  3794. __metadata("design:type", Function),
  3795. __metadata("design:paramtypes", [Array]),
  3796. __metadata("design:returntype", void 0)
  3797. ], Polyline.prototype, "setPoints", null);
  3798. __decorate([
  3799. CordovaCheck(),
  3800. __metadata("design:type", Function),
  3801. __metadata("design:paramtypes", []),
  3802. __metadata("design:returntype", BaseArrayClass)
  3803. ], Polyline.prototype, "getPoints", null);
  3804. __decorate([
  3805. CordovaInstance({ sync: true }),
  3806. __metadata("design:type", Function),
  3807. __metadata("design:paramtypes", [Boolean]),
  3808. __metadata("design:returntype", void 0)
  3809. ], Polyline.prototype, "setGeoDesic", null);
  3810. __decorate([
  3811. CordovaInstance({ sync: true }),
  3812. __metadata("design:type", Function),
  3813. __metadata("design:paramtypes", []),
  3814. __metadata("design:returntype", Boolean)
  3815. ], Polyline.prototype, "getGeodesic", null);
  3816. __decorate([
  3817. CordovaInstance({ sync: true }),
  3818. __metadata("design:type", Function),
  3819. __metadata("design:paramtypes", [Boolean]),
  3820. __metadata("design:returntype", void 0)
  3821. ], Polyline.prototype, "setVisible", null);
  3822. __decorate([
  3823. CordovaInstance({ sync: true }),
  3824. __metadata("design:type", Function),
  3825. __metadata("design:paramtypes", []),
  3826. __metadata("design:returntype", Boolean)
  3827. ], Polyline.prototype, "getVisible", null);
  3828. __decorate([
  3829. CordovaInstance({ sync: true }),
  3830. __metadata("design:type", Function),
  3831. __metadata("design:paramtypes", [Boolean]),
  3832. __metadata("design:returntype", void 0)
  3833. ], Polyline.prototype, "setClickable", null);
  3834. __decorate([
  3835. CordovaInstance({ sync: true }),
  3836. __metadata("design:type", Function),
  3837. __metadata("design:paramtypes", []),
  3838. __metadata("design:returntype", Boolean)
  3839. ], Polyline.prototype, "getClickable", null);
  3840. __decorate([
  3841. CordovaInstance({ sync: true }),
  3842. __metadata("design:type", Function),
  3843. __metadata("design:paramtypes", [String]),
  3844. __metadata("design:returntype", void 0)
  3845. ], Polyline.prototype, "setStrokeColor", null);
  3846. __decorate([
  3847. CordovaInstance({ sync: true }),
  3848. __metadata("design:type", Function),
  3849. __metadata("design:paramtypes", []),
  3850. __metadata("design:returntype", String)
  3851. ], Polyline.prototype, "getStrokeColor", null);
  3852. __decorate([
  3853. CordovaInstance({ sync: true }),
  3854. __metadata("design:type", Function),
  3855. __metadata("design:paramtypes", [Number]),
  3856. __metadata("design:returntype", void 0)
  3857. ], Polyline.prototype, "setStrokeWidth", null);
  3858. __decorate([
  3859. CordovaInstance({ sync: true }),
  3860. __metadata("design:type", Function),
  3861. __metadata("design:paramtypes", []),
  3862. __metadata("design:returntype", Number)
  3863. ], Polyline.prototype, "getStrokeWidth", null);
  3864. __decorate([
  3865. CordovaInstance({ sync: true }),
  3866. __metadata("design:type", Function),
  3867. __metadata("design:paramtypes", [Number]),
  3868. __metadata("design:returntype", void 0)
  3869. ], Polyline.prototype, "setZIndex", null);
  3870. __decorate([
  3871. CordovaInstance({ sync: true }),
  3872. __metadata("design:type", Function),
  3873. __metadata("design:paramtypes", []),
  3874. __metadata("design:returntype", Number)
  3875. ], Polyline.prototype, "getZIndex", null);
  3876. __decorate([
  3877. InstanceCheck(),
  3878. __metadata("design:type", Function),
  3879. __metadata("design:paramtypes", []),
  3880. __metadata("design:returntype", void 0)
  3881. ], Polyline.prototype, "remove", null);
  3882. return Polyline;
  3883. }(BaseClass));
  3884. export { Polyline };
  3885. /**
  3886. * @hidden
  3887. */
  3888. var TileOverlay = (function (_super) {
  3889. __extends(TileOverlay, _super);
  3890. function TileOverlay(_map, _objectInstance) {
  3891. var _this = _super.call(this) || this;
  3892. _this._map = _map;
  3893. _this._objectInstance = _objectInstance;
  3894. return _this;
  3895. }
  3896. /**
  3897. * Returns the ID of instance.
  3898. * @return {string}
  3899. */
  3900. TileOverlay.prototype.getId = function () { return; };
  3901. /**
  3902. * Returns the map instance.
  3903. * @return {GoogleMap}
  3904. */
  3905. TileOverlay.prototype.getMap = function () { return this._map; };
  3906. /**
  3907. * Set whether the tiles should fade in.
  3908. * @param fadeIn {boolean}
  3909. */
  3910. TileOverlay.prototype.setFadeIn = function (fadeIn) { };
  3911. /**
  3912. * Get whether the tiles should fade in
  3913. * @return {boolean}
  3914. */
  3915. TileOverlay.prototype.getFadeIn = function () { return; };
  3916. /**
  3917. * Set the zIndex of the tile overlay
  3918. * @param zIndex {number}
  3919. */
  3920. TileOverlay.prototype.setZIndex = function (zIndex) { };
  3921. /**
  3922. * Returns the zIndex of the tile overlay
  3923. * @return {number}
  3924. */
  3925. TileOverlay.prototype.getZIndex = function () { return; };
  3926. /**
  3927. * Set the opacity of the tile overlay
  3928. * @param opacity {number}
  3929. */
  3930. TileOverlay.prototype.setOpacity = function (opacity) { };
  3931. /**
  3932. * Returns the opacity of the tile overlay
  3933. * @return {number}
  3934. */
  3935. TileOverlay.prototype.getOpacity = function () { return; };
  3936. /**
  3937. * Set false if you want to hide
  3938. * @param visible {boolean}
  3939. */
  3940. TileOverlay.prototype.setVisible = function (visible) { };
  3941. /**
  3942. * Returns true if the tile overlay is visible
  3943. * @return {boolean}
  3944. */
  3945. TileOverlay.prototype.getVisible = function () { return; };
  3946. /**
  3947. * Get tile size
  3948. */
  3949. TileOverlay.prototype.getTileSize = function () { return; };
  3950. /**
  3951. * Remove the tile overlay
  3952. */
  3953. TileOverlay.prototype.remove = function () {
  3954. delete this._objectInstance.getMap().get('_overlays')[this.getId()];
  3955. this._objectInstance.remove();
  3956. this.destroy();
  3957. };
  3958. __decorate([
  3959. CordovaInstance({ sync: true }),
  3960. __metadata("design:type", Function),
  3961. __metadata("design:paramtypes", []),
  3962. __metadata("design:returntype", String)
  3963. ], TileOverlay.prototype, "getId", null);
  3964. __decorate([
  3965. CordovaInstance({ sync: true }),
  3966. __metadata("design:type", Function),
  3967. __metadata("design:paramtypes", [Boolean]),
  3968. __metadata("design:returntype", void 0)
  3969. ], TileOverlay.prototype, "setFadeIn", null);
  3970. __decorate([
  3971. CordovaInstance({ sync: true }),
  3972. __metadata("design:type", Function),
  3973. __metadata("design:paramtypes", []),
  3974. __metadata("design:returntype", Boolean)
  3975. ], TileOverlay.prototype, "getFadeIn", null);
  3976. __decorate([
  3977. CordovaInstance({ sync: true }),
  3978. __metadata("design:type", Function),
  3979. __metadata("design:paramtypes", [Number]),
  3980. __metadata("design:returntype", void 0)
  3981. ], TileOverlay.prototype, "setZIndex", null);
  3982. __decorate([
  3983. CordovaInstance({ sync: true }),
  3984. __metadata("design:type", Function),
  3985. __metadata("design:paramtypes", []),
  3986. __metadata("design:returntype", Number)
  3987. ], TileOverlay.prototype, "getZIndex", null);
  3988. __decorate([
  3989. CordovaInstance({ sync: true }),
  3990. __metadata("design:type", Function),
  3991. __metadata("design:paramtypes", [Number]),
  3992. __metadata("design:returntype", void 0)
  3993. ], TileOverlay.prototype, "setOpacity", null);
  3994. __decorate([
  3995. CordovaInstance({ sync: true }),
  3996. __metadata("design:type", Function),
  3997. __metadata("design:paramtypes", []),
  3998. __metadata("design:returntype", Number)
  3999. ], TileOverlay.prototype, "getOpacity", null);
  4000. __decorate([
  4001. CordovaInstance({ sync: true }),
  4002. __metadata("design:type", Function),
  4003. __metadata("design:paramtypes", [Boolean]),
  4004. __metadata("design:returntype", void 0)
  4005. ], TileOverlay.prototype, "setVisible", null);
  4006. __decorate([
  4007. CordovaInstance({ sync: true }),
  4008. __metadata("design:type", Function),
  4009. __metadata("design:paramtypes", []),
  4010. __metadata("design:returntype", Boolean)
  4011. ], TileOverlay.prototype, "getVisible", null);
  4012. __decorate([
  4013. CordovaInstance({ sync: true }),
  4014. __metadata("design:type", Function),
  4015. __metadata("design:paramtypes", []),
  4016. __metadata("design:returntype", Object)
  4017. ], TileOverlay.prototype, "getTileSize", null);
  4018. __decorate([
  4019. CordovaCheck(),
  4020. __metadata("design:type", Function),
  4021. __metadata("design:paramtypes", []),
  4022. __metadata("design:returntype", void 0)
  4023. ], TileOverlay.prototype, "remove", null);
  4024. return TileOverlay;
  4025. }(BaseClass));
  4026. export { TileOverlay };
  4027. /**
  4028. * @hidden
  4029. */
  4030. var KmlOverlay = (function (_super) {
  4031. __extends(KmlOverlay, _super);
  4032. function KmlOverlay(_map, _objectInstance) {
  4033. var _this = _super.call(this) || this;
  4034. _this._map = _map;
  4035. _this._objectInstance = _objectInstance;
  4036. Object.defineProperty(self, 'camera', {
  4037. value: _this._objectInstance.camera,
  4038. writable: false
  4039. });
  4040. Object.defineProperty(self, 'kmlData', {
  4041. value: _this._objectInstance.kmlData,
  4042. writable: false
  4043. });
  4044. return _this;
  4045. }
  4046. /**
  4047. * Returns the viewport to contains all overlays
  4048. */
  4049. KmlOverlay.prototype.getDefaultViewport = function () { return; };
  4050. /**
  4051. * Returns the ID of instance.
  4052. * @return {string}
  4053. */
  4054. KmlOverlay.prototype.getId = function () { return; };
  4055. /**
  4056. * Returns the map instance.
  4057. * @return {GoogleMap}
  4058. */
  4059. KmlOverlay.prototype.getMap = function () { return this._map; };
  4060. /**
  4061. * Changes visibility of the kml overlay
  4062. * @param visible {boolean}
  4063. */
  4064. KmlOverlay.prototype.setVisible = function (visible) { };
  4065. /**
  4066. * Returns true if the kml overlay is visible
  4067. * @return {boolean}
  4068. */
  4069. KmlOverlay.prototype.getVisible = function () { return; };
  4070. /**
  4071. * Changes click-ability of the KmlOverlay
  4072. * @param clickable {boolean}
  4073. */
  4074. KmlOverlay.prototype.setClickable = function (clickable) { };
  4075. /**
  4076. * Returns true if the KmlOverlay is clickable
  4077. * @return {boolean}
  4078. */
  4079. KmlOverlay.prototype.getClickable = function () { return; };
  4080. /**
  4081. * Remove the KmlOverlay
  4082. */
  4083. KmlOverlay.prototype.remove = function () {
  4084. delete this._objectInstance.getMap().get('_overlays')[this.getId()];
  4085. this._objectInstance.remove();
  4086. this.destroy();
  4087. };
  4088. __decorate([
  4089. CordovaInstance({ sync: true }),
  4090. __metadata("design:type", Function),
  4091. __metadata("design:paramtypes", []),
  4092. __metadata("design:returntype", Object)
  4093. ], KmlOverlay.prototype, "getDefaultViewport", null);
  4094. __decorate([
  4095. CordovaInstance({ sync: true }),
  4096. __metadata("design:type", Function),
  4097. __metadata("design:paramtypes", []),
  4098. __metadata("design:returntype", String)
  4099. ], KmlOverlay.prototype, "getId", null);
  4100. __decorate([
  4101. CordovaInstance({ sync: true }),
  4102. __metadata("design:type", Function),
  4103. __metadata("design:paramtypes", [Boolean]),
  4104. __metadata("design:returntype", void 0)
  4105. ], KmlOverlay.prototype, "setVisible", null);
  4106. __decorate([
  4107. CordovaInstance({ sync: true }),
  4108. __metadata("design:type", Function),
  4109. __metadata("design:paramtypes", []),
  4110. __metadata("design:returntype", Boolean)
  4111. ], KmlOverlay.prototype, "getVisible", null);
  4112. __decorate([
  4113. CordovaInstance({ sync: true }),
  4114. __metadata("design:type", Function),
  4115. __metadata("design:paramtypes", [Boolean]),
  4116. __metadata("design:returntype", void 0)
  4117. ], KmlOverlay.prototype, "setClickable", null);
  4118. __decorate([
  4119. CordovaInstance({ sync: true }),
  4120. __metadata("design:type", Function),
  4121. __metadata("design:paramtypes", []),
  4122. __metadata("design:returntype", Boolean)
  4123. ], KmlOverlay.prototype, "getClickable", null);
  4124. __decorate([
  4125. InstanceCheck(),
  4126. __metadata("design:type", Function),
  4127. __metadata("design:paramtypes", []),
  4128. __metadata("design:returntype", void 0)
  4129. ], KmlOverlay.prototype, "remove", null);
  4130. return KmlOverlay;
  4131. }(BaseClass));
  4132. export { KmlOverlay };
  4133. //# sourceMappingURL=index.js.map