| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448 |
- import { IonicNativePlugin } from '@ionic-native/core';
- import { Observable } from 'rxjs/Observable';
- import 'rxjs/add/observable/fromEvent';
- export declare type MapType = 'MAP_TYPE_NORMAL' | 'MAP_TYPE_ROADMAP' | 'MAP_TYPE_SATELLITE' | 'MAP_TYPE_HYBRID' | 'MAP_TYPE_TERRAIN' | 'MAP_TYPE_NONE';
- /**
- * @hidden
- */
- export declare class LatLng implements ILatLng {
- lat: number;
- lng: number;
- constructor(lat: number, lng: number);
- equals(other: ILatLng): boolean;
- toString(): string;
- toUrlValue(precision?: number): string;
- }
- export interface ILatLngBounds {
- northeast: ILatLng;
- southwest: ILatLng;
- }
- /**
- * @hidden
- */
- export declare class LatLngBounds implements ILatLngBounds {
- private _objectInstance;
- northeast: ILatLng;
- southwest: ILatLng;
- type: string;
- constructor(points?: ILatLng[]);
- /**
- * Converts to string
- * @return {string}
- */
- toString(): string;
- /**
- * 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.
- * @param precision {number}
- * @return {string}
- */
- toUrlValue(precision?: number): string;
- /**
- * Extends this bounds to contain the given point.
- * @param LatLng {ILatLng}
- */
- extend(latLng: ILatLng): void;
- /**
- * Returns true if the given lat/lng is in this bounds.
- * @param LatLng {ILatLng}
- */
- contains(LatLng: ILatLng): boolean;
- /**
- * Computes the center of this LatLngBounds
- * @return {LatLng}
- */
- getCenter(): LatLng;
- }
- export interface GoogleMapControlOptions {
- /**
- * Turns the compass on or off.
- */
- compass?: boolean;
- /**
- * Turns the myLocation button on or off. If turns on this button, the application displays a permission dialog to obtain the geolocation data.
- */
- myLocationButton?: boolean;
- /**
- * Turns the myLocation control(blue dot) on or off. If turns on this control, the application displays a permission dialog to obtain the geolocation data.
- */
- myLocation?: boolean;
- /**
- * Turns the indoor picker on or off.
- */
- indoorPicker?: boolean;
- /**
- * **Android**
- * Turns the map toolbar on or off.
- */
- mapToolbar?: boolean;
- /**
- * **Android**
- * Turns the zoom controller on or off.
- */
- zoom?: boolean;
- /**
- * Accept extra properties for future updates
- */
- [key: string]: any;
- }
- export interface GoogleMapGestureOptions {
- /**
- * Set false to disable the scroll gesture (default: true)
- */
- scroll?: boolean;
- /**
- * Set false to disable the tilt gesture (default: true)
- */
- tilt?: boolean;
- /**
- * Set false to disable the zoom gesture (default: true)
- */
- zoom?: boolean;
- /**
- * Set false to disable the rotate gesture (default: true)
- */
- rotate?: boolean;
- /**
- * Accept extra properties for future updates
- */
- [key: string]: any;
- }
- export interface GoogleMapZoomOptions {
- minZoom?: number;
- maxZoom?: number;
- }
- export interface GoogleMapPaddingOptions {
- left?: number;
- top?: number;
- bottom?: number;
- right?: number;
- }
- export interface GoogleMapPreferenceOptions {
- /**
- * Minimum and maximum zoom levels for zooming gestures.
- */
- zoom?: GoogleMapZoomOptions;
- /**
- * Paddings of controls.
- */
- padding?: GoogleMapPaddingOptions;
- /**
- * Turns the 3D buildings layer on or off.
- */
- building?: boolean;
- /**
- * Accept extra properties for future updates
- */
- [key: string]: any;
- }
- export interface GoogleMapOptions {
- /**
- * mapType [options]
- */
- mapType?: MapType | string;
- /**
- * controls [options]
- */
- controls?: GoogleMapControlOptions;
- /**
- * gestures [options]
- */
- gestures?: GoogleMapGestureOptions;
- /**
- * Map styles [options]
- * @ref https://developers.google.com/maps/documentation/javascript/style-reference
- */
- styles?: any[];
- /**
- * Initial camera position [options]
- */
- camera?: CameraPosition<any>;
- /**
- * preferences [options]
- */
- preferences?: GoogleMapPreferenceOptions;
- /**
- * Accept extra properties for future updates
- */
- [key: string]: any;
- }
- export interface CameraPosition<T> {
- /**
- * The center location of the camera view.
- *
- * [usage 1]
- *
- * let cameraPos: CameraPosition<ILatLng> = {
- * target: {lat: ..., lng: ...},
- * zoom: 10
- * }
- *
- * [usage 2] The zoom property is ignored when you specify multiple position
- *
- * let cameraPos: CameraPosition<ILatLng[]> = {
- * target: [
- * {lat: ..., lng: ...},
- * {lat: ..., lng: ...},
- * {lat: ..., lng: ...}
- * ]
- * }
- */
- target?: T;
- /**
- * View angle
- */
- tilt?: number;
- /**
- * Zoom level
- */
- zoom?: number;
- /**
- * Map orientation
- */
- bearing?: number;
- /**
- * The duration of animation in milliseconds
- */
- duration?: number;
- /**
- * Camera padding in pixel
- */
- padding?: number;
- }
- export interface CircleOptions {
- /**
- * Center position of circle
- */
- center: ILatLng;
- /**
- * Radius of circle in meter
- */
- radius: number;
- /**
- * Set the stroke color
- * (rgb, rgba, #RRGGBB, "colorname", ...etc)
- */
- strokeColor?: string;
- /**
- * Set the stroke width in pixel
- */
- strokeWidth?: number;
- /**
- * Set the inside color of circle
- * (rgb, rgba, #RRGGBB, "colorname", ...etc)
- */
- fillColor?: string;
- /**
- * Set to true to receive the CIRCLE_CLICK event
- * (default: false)
- */
- clickable?: boolean;
- /**
- * Set to false to hide
- */
- visible?: boolean;
- /**
- * Z-index
- */
- zIndex?: number;
- /**
- * Accept own properties
- * You can get the property later using `get()` method.
- */
- [key: string]: any;
- }
- export interface GeocoderRequest {
- /**
- * The address property or position property is required.
- * You can not specify both property at the same time.
- *
- * [geocoding usage1]
- * let request: GeocoderRequest = {
- * address: "Los Angeles, California, USA"
- * };
- *
- * [geocoding usage2]
- * let request: GeocoderRequest = {
- * address: [
- * "Los Angeles, California, USA",
- * "San Francisco, California, USA",
- * ]
- * };
- */
- address?: string | string[];
- /**
- *
- * [reverse-geocoding usage1]
- * let request: GeocoderRequest = {
- * position: {"lat": 37.421655, "lng": -122.085637}
- * };
- *
- * [reverse-geocoding usage2]
- * let request: GeocoderRequest = {
- * position: [
- * {"lat": 37.421655, "lng": -122.085637},
- * {"lat": 37.332, "lng": -122.030781}
- * ]
- * };
- */
- position?: ILatLng | ILatLng[];
- }
- export interface GeocoderResult {
- adminArea?: string;
- country?: string;
- countryCode?: string;
- extra?: {
- featureName?: string;
- lines?: Array<string>;
- permises?: string;
- phone?: string;
- url?: string;
- };
- locale?: string;
- locality?: string;
- position?: ILatLng;
- postalCode?: string;
- subAdminArea?: string;
- subLocality?: string;
- subThoroughfare?: string;
- thoroughfare?: string;
- }
- export interface GroundOverlayOptions {
- /**
- * URL of overlay
- */
- url: string;
- /**
- * Bounds, array of ILatLng
- */
- bounds: Array<ILatLng>;
- /**
- * Set to true to receive the GROUND_OVERLAY_CLICK event
- * (default: false)
- */
- clickable?: boolean;
- /**
- * Set to false to hide
- */
- visible?: boolean;
- /**
- * Opacity. From 0.0 to 1.0 .
- */
- opacity?: number;
- /**
- * Bearing
- */
- bearing?: number;
- /**
- * Z-index
- */
- zIndex?: number;
- /**
- * Accept own properties
- * You can get the property later using `get()` method.
- */
- [key: string]: any;
- }
- export interface ILatLng {
- lat: number;
- lng: number;
- }
- export interface MarkerIcon {
- url?: string;
- size?: {
- width?: number;
- height?: number;
- };
- }
- export interface MarkerOptions {
- /**
- * The icon image url or properties. Also you can specify HTML Color values. Alternatively you can specify the image as Base64
- */
- icon?: any;
- /**
- * The content of the infoWindow.
- */
- title?: string;
- /**
- * The snippet of the infoWindow.
- */
- snippet?: string;
- /**
- * The position of the marker.
- */
- position: ILatLng;
- /**
- * Specify the anchor of the InfoWindow
- */
- infoWindowAnchor?: number[];
- /**
- * Specify the anchor of icon image
- */
- anchor?: number[];
- /**
- * Set true if you want to enable to drag the marker. (Default: false) Important! Drag starts after long pressed on the marker.
- */
- draggable?: boolean;
- /**
- * Set true if you want to use a flat marker. (Default: false)
- */
- flat?: boolean;
- /**
- * Set rotation angle. (Default: 0)
- */
- rotation?: number;
- /**
- * Set false if you want to hide. (Default: true)
- */
- visible?: boolean;
- /**
- * Specify the options for title. This property work for normal InfoWindow.
- */
- styles?: any;
- /**
- * Which animation to play when marker is added to a map.
- */
- animation?: string;
- /**
- * Higher zIndex value overlays will be drawn on top of lower zIndex value tile layers and overlays.
- */
- zIndex?: number;
- /**
- * Set to true to disable auto panning when the marker is clicked.
- */
- disableAutoPan?: boolean;
- /**
- * Accept own properties
- * You can get the property later using `get()` method.
- */
- [key: string]: any;
- }
- export interface MarkerLabel {
- /**
- * Set true if use bold font
- */
- bold?: boolean;
- /**
- * Set font size in pixel
- */
- fontSize?: number;
- /**
- * color strings
- */
- color?: string;
- /**
- * Set true if use italic font
- */
- italic?: boolean;
- }
- export interface MarkerClusterIcon {
- /**
- * Minimum number of clustering
- */
- min?: number;
- /**
- * Maximum number of clustering
- */
- max?: number;
- /**
- * anchor position of the marker
- */
- anchor?: any;
- /**
- * label option for clustered marker
- */
- label?: MarkerLabel;
- /**
- * icon url
- */
- url: string;
- /**
- * icon size
- */
- size?: {
- width?: number;
- height?: number;
- };
- }
- export interface MarkerClusterOptions {
- /**
- * Maximum zoom level of clustering
- * (default: 15, max: 18)
- */
- maxZoomLevel?: number;
- /**
- * Draw a rectangle that contains all locations of clustered when you tap on a cluster marker.
- * (default: true)
- */
- boundsDraw?: boolean;
- /**
- * Position list
- * [
- * {title: "store A", position: {lat: ..., lng: ...}},
- * {title: "store B", position: {lat: ..., lng: ...}},
- * {title: "store C", position: {lat: ..., lng: ...}}
- * ]
- */
- markers: MarkerOptions[];
- /**
- * Conditions of clustering
- * [
- * {icon: "assets/small.png", min: 2, max: 10},
- * {icon: "assets/middle.png", min: 11, max: 30},
- * {icon: "assets/large.png", min: 31}
- * ]
- */
- icons: MarkerClusterIcon[];
- /**
- * Accept own properties
- * You can get the property later using `get()` method.
- */
- [key: string]: any;
- }
- export interface MyLocation {
- latLng?: LatLng;
- elapsedRealtimeNanos?: any;
- time?: string;
- accuracy?: any;
- bearing?: number;
- altitude?: any;
- speed?: number;
- provider?: any;
- hashCode?: any;
- }
- export interface MyLocationOptions {
- /**
- * Set true if you want to try to use GPS mandatory.
- * In false, the plugin try to use GPS and network.
- * (default: false)
- */
- enableHighAccuracy?: boolean;
- }
- export interface PolygonOptions {
- /**
- * Pass ILatLng[] to specify the vertixes.
- * You need to contain two points at least.
- */
- points: Array<ILatLng>;
- /**
- * Set true if you want to draw the curve polygon based on the earth
- * (default: false)
- */
- geodesic?: boolean;
- /**
- * Set the stroke color
- * (rgb, rgba, #RRGGBB, "colorname", ...etc)
- */
- strokeColor?: string;
- /**
- * Set the stroke width in pixel
- */
- strokeWidth?: number;
- /**
- * Set the inside color of polygon
- * (rgb, rgba, #RRGGBB, "colorname", ...etc)
- */
- fillColor?: string;
- /**
- * Set false if you want to create invisible polygon
- * (Invisible polygon is not clickable, default true)
- */
- visible?: boolean;
- /**
- * Hierarchy z-index
- */
- zIndex?: number;
- /**
- * Pass ILatLng[][] to create holes in polygon
- */
- holes?: Array<Array<ILatLng>>;
- /**
- * Set true if you want to receive the POLYGON_CLICK event
- * (default: false)
- */
- clickable?: boolean;
- /**
- * Accept own properties
- * You can get the property later using `get()` method.
- */
- [key: string]: any;
- }
- export interface PolylineOptions {
- /**
- * Pass ILatLng[] to specify the vertixes.
- * You need to contain two points at least.
- */
- points: Array<ILatLng>;
- /**
- * Set false if you want to create invisible polyline
- * (Invisible polyline is not clickable, default true)
- */
- visible?: boolean;
- /**
- * Set true if you want to draw the curve polyline based on the earth
- * (default: false)
- */
- geodesic?: boolean;
- /**
- * Set the stroke color
- * (rgb, rgba, #RRGGBB, "colorname", ...etc)
- */
- color?: string;
- /**
- * Set the stroke width in pixel
- */
- width?: number;
- /**
- * Hierarchy z-index
- */
- zIndex?: number;
- /**
- * Set true if you want to receive the POLYLINE_CLICK event
- * (default: false)
- */
- clickable?: boolean;
- /**
- * Accept own properties
- * You can get the property later using `get()` method.
- */
- [key: string]: any;
- }
- export interface TileOverlayOptions {
- /**
- * This callback must Returns string of image URL.
- * If no tile, you need to Returns null.
- */
- getTile: (x: number, y: number, zoom: number) => string;
- /**
- * Set false if you want to create invisible tilelayer
- * (default true)
- */
- visible?: boolean;
- /**
- * Hierarchy z-index of tilelayer
- */
- zIndex?: number;
- /**
- * Default: 512px
- */
- tileSize?: number;
- /**
- * Default: 1.0
- */
- opacity?: number;
- /**
- * Set true if you want to display the tile information over the tile images.
- */
- debug?: boolean;
- /**
- * Accept own properties
- * You can get the property later using `get()` method.
- */
- [key: string]: any;
- }
- export interface ToDataUrlOptions {
- /**
- * True if you want get high quality map snapshot
- */
- uncompress?: boolean;
- }
- /**
- * Options for map.addKmlOverlay() method
- */
- export interface KmlOverlayOptions {
- url: string;
- clickable?: boolean;
- suppressInfoWindows?: boolean;
- /**
- * Accept own properties for future update
- */
- [key: string]: any;
- }
- /**
- * @hidden
- */
- export declare class VisibleRegion implements ILatLngBounds {
- private _objectInstance;
- /**
- * The northeast of the bounds that contains the farLeft, farRight, nearLeft and nearRight.
- * Since the map view is able to rotate, the farRight is not the same as the northeast.
- */
- northeast: ILatLng;
- /**
- * The southwest of the bounds that contains the farLeft, farRight, nearLeft and nearRight.
- * Since the map view is able to rotate, the nearLeft is not the same as the southwest.
- */
- southwest: ILatLng;
- /**
- * The farLeft indicates the lat/lng of the top-left of the map view.
- */
- farLeft: ILatLng;
- /**
- * The farRight indicates the lat/lng of the top-right of the map view.
- */
- farRight: ILatLng;
- /**
- * The nearLeft indicates the lat/lng of the bottom-left of the map view.
- */
- nearLeft: ILatLng;
- /**
- * The nearRight indicates the lat/lng of the bottom-right of the map view.
- */
- nearRight: ILatLng;
- /**
- * constant value : `VisibleRegion`
- */
- type: string;
- constructor(southwest: LatLngBounds, northeast: LatLngBounds, farLeft: ILatLng, farRight: ILatLng, nearLeft: ILatLng, nearRight: ILatLng);
- /**
- * Converts to string
- * @return {string}
- */
- toString(): string;
- /**
- * 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.
- * @param precision {number}
- * @return {string}
- */
- toUrlValue(precision?: number): string;
- /**
- * Returns true if the given lat/lng is in this bounds.
- * @param LatLng {ILatLng}
- */
- contains(LatLng: ILatLng): boolean;
- }
- /**
- * @hidden
- */
- export declare const StreetViewSource: {
- DEFAULT: string;
- OUTDOOR: string;
- };
- export interface SetPovOption {
- bearing: number;
- radius?: number;
- zoom?: number;
- duration: number;
- }
- export interface StreetViewSetPositionOption {
- target: ILatLng;
- source?: string;
- radius?: number;
- }
- export interface StreetViewCameraPano {
- target: string;
- bearing?: number;
- tilt?: number;
- zoom?: number;
- }
- export interface StreetViewCameraPosition {
- target: ILatLng;
- source?: string;
- radius?: number;
- bearing?: number;
- tilt?: number;
- zoom?: number;
- }
- export interface StreetViewOptions {
- camera?: StreetViewCameraPano | StreetViewCameraPosition;
- /**
- * controls [options]
- */
- controls?: {
- streetNames?: boolean;
- navigation?: boolean;
- };
- /**
- * gestures [options]
- */
- gestures?: {
- padding?: boolean;
- zooming?: boolean;
- };
- /**
- * Accept extra properties for future updates
- */
- [key: string]: any;
- }
- export interface StreetViewNavigationLink {
- /**
- * panorama Id
- */
- panoId: string;
- /**
- * bearing (heading)
- */
- bearing: number;
- }
- export interface StreetViewLocation {
- latLng: ILatLng;
- links: StreetViewNavigationLink[];
- }
- /**
- * @hidden
- * You can listen to these events where appropriate
- */
- export declare const GoogleMapsEvent: {
- MAP_READY: string;
- MAP_CLICK: string;
- MAP_LONG_CLICK: string;
- POI_CLICK: string;
- MY_LOCATION_CLICK: string;
- MY_LOCATION_BUTTON_CLICK: string;
- INDOOR_BUILDING_FOCUSED: string;
- INDOOR_LEVEL_ACTIVATED: string;
- CAMERA_MOVE_START: string;
- CAMERA_MOVE: string;
- CAMERA_MOVE_END: string;
- OVERLAY_CLICK: string;
- POLYGON_CLICK: string;
- POLYLINE_CLICK: string;
- CIRCLE_CLICK: string;
- GROUND_OVERLAY_CLICK: string;
- INFO_CLICK: string;
- INFO_LONG_CLICK: string;
- INFO_CLOSE: string;
- INFO_OPEN: string;
- MARKER_CLICK: string;
- MARKER_DRAG: string;
- MARKER_DRAG_START: string;
- MARKER_DRAG_END: string;
- MAP_DRAG: string;
- MAP_DRAG_START: string;
- MAP_DRAG_END: string;
- KML_CLICK: string;
- PANORAMA_READY: string;
- PANORAMA_CAMERA_CHANGE: string;
- PANORAMA_LOCATION_CHANGE: string;
- PANORAMA_CLICK: string;
- };
- /**
- * @hidden
- */
- export declare const GoogleMapsAnimation: {
- BOUNCE: string;
- DROP: string;
- };
- /**
- * @hidden
- */
- export declare const GoogleMapsMapTypeId: {
- NORMAL: string;
- ROADMAP: string;
- SATELLITE: string;
- HYBRID: string;
- TERRAIN: string;
- NONE: string;
- };
- /**
- * @name Google Maps
- * @description
- * This plugin uses the native Google Maps SDK
- * 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
- * @usage
- * ```typescript
- * import {
- * GoogleMaps,
- * GoogleMap,
- * GoogleMapsEvent,
- * GoogleMapOptions,
- * CameraPosition,
- * MarkerOptions,
- * Marker
- * } from '@ionic-native/google-maps';
- * import { Component } from "@angular/core/";
- *
- * @Component({
- * selector: 'page-home',
- * templateUrl: 'home.html'
- * })
- * export class HomePage {
- * map: GoogleMap;
- * constructor() { }
- *
- * ionViewDidLoad() {
- * this.loadMap();
- * }
- *
- * loadMap() {
- *
- * let mapOptions: GoogleMapOptions = {
- * camera: {
- * target: {
- * lat: 43.0741904,
- * lng: -89.3809802
- * },
- * zoom: 18,
- * tilt: 30
- * }
- * };
- *
- * this.map = GoogleMaps.create('map_canvas', mapOptions);
- *
- * // Wait the MAP_READY before using any methods.
- * this.map.one(GoogleMapsEvent.MAP_READY)
- * .then(() => {
- * console.log('Map is ready!');
- *
- * // Now you can use all methods safely.
- * this.map.addMarker({
- * title: 'Ionic',
- * icon: 'blue',
- * animation: 'DROP',
- * position: {
- * lat: 43.0741904,
- * lng: -89.3809802
- * }
- * })
- * .then(marker => {
- * marker.on(GoogleMapsEvent.MARKER_CLICK)
- * .subscribe(() => {
- * alert('clicked');
- * });
- * });
- *
- * });
- * }
- * }
- *
- * ```
- * @classes
- * GoogleMap
- * Circle
- * Encoding
- * Environment
- * Geocoder
- * GroundOverlay
- * HtmlInfoWindow
- * Geocoder
- * LatLng
- * LatLngBounds
- * Marker
- * MarkerCluster
- * Polygon
- * Polyline
- * Spherical
- * KmlOverlay
- * Poly
- * TileOverlay
- * BaseClass
- * BaseArrayClass
- * @interfaces
- * GoogleMapOptions
- * CameraPosition
- * CircleOptions
- * GeocoderRequest
- * GeocoderResult
- * GroundOverlayOptions
- * ILatLng
- * MarkerIcon
- * MarkerOptions
- * MarkerClusterIcon
- * MarkerClusterOptions
- * MyLocation
- * MyLocationOptions
- * PolygonOptions
- * PolylineOptions
- * TileOverlayOptions
- * KmlOverlayOptions
- * VisibleRegion
- */
- export declare class GoogleMaps extends IonicNativePlugin {
- /**
- * Creates a new GoogleMap instance
- * @param element {string | HTMLElement} Element ID or reference to attach the map to
- * @param options {GoogleMapOptions} [options] Options
- * @return {GoogleMap}
- */
- static create(element: string | HTMLElement | GoogleMapOptions, options?: GoogleMapOptions): GoogleMap;
- /**
- * @deprecation
- * @hidden
- */
- create(element: string | HTMLElement | GoogleMapOptions, options?: GoogleMapOptions): GoogleMap;
- /**
- * Creates a new StreetView instance
- * @param element {string | HTMLElement} Element ID or reference to attach the map to
- * @param options {StreetViewOptions} [options] Options
- * @return {StreetViewPanorama}
- */
- static createPanorama(element: string | HTMLElement, options?: StreetViewOptions): StreetViewPanorama;
- }
- /**
- * @hidden
- * https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v2.0.0/class/BaseClass/README.md
- */
- export declare class BaseClass {
- protected _objectInstance: any;
- /**
- * Adds an event listener.
- * @param eventName {string} event name you want to observe.
- * @return {Observable<any>}
- */
- addEventListener(eventName: string): Observable<any>;
- /**
- * Adds an event listener that works once.
- * @param eventName {string} event name you want to observe.
- * @return {Promise<any>}
- */
- addListenerOnce(eventName: string): Promise<any>;
- /**
- * Gets a value
- * @param key {any}
- */
- get(key: string): any;
- /**
- * Sets a value
- * @param key {string} The key name for the value. `(key)_changed` will be fired when you set value through this method.
- * @param value {any}
- * @param noNotify {boolean} [options] True if you want to prevent firing the `(key)_changed` event.
- */
- set(key: string, value: any, noNotify?: boolean): void;
- /**
- * Bind a key to another object
- * @param key {string} The property name you want to observe.
- * @param target {any} The target object you want to observe.
- * @param targetKey? {string} [options] The property name you want to observe. If you omit this, the `key` argument is used.
- * @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.
- */
- bindTo(key: string, target: any, targetKey?: string, noNotify?: boolean): void;
- /**
- * Alias of `addEventListener`
- * @param key {string} The property name you want to observe.
- * @return {Observable<any>}
- */
- on(eventName: string): Observable<any>;
- /**
- * Alias of `addEventListenerOnce`
- * @param key {string} The property name you want to observe.
- * @return {Promise<any>}
- */
- one(eventName: string): Promise<any>;
- /**
- * Clears all stored values
- */
- empty(): void;
- /**
- * Dispatch event.
- * @param eventName {string} Event name
- * @param parameters {any} [options] The data you want to pass to event listerners.
- */
- trigger(eventName: string, ...parameters: any[]): void;
- /**
- * Executes off() and empty()
- */
- destroy(): void;
- /**
- * Remove event listener(s)
- * The `removeEventListener()` has three usages:
- * - removeEventListener("eventName", listenerFunction);
- * This removes one particular event listener
- * - removeEventListener("eventName");
- * This removes the event listeners that added for the event name.
- * - removeEventListener();
- * This removes all listeners.
- *
- * @param eventName {string} [options] Event name
- * @param listener {Function} [options] Event listener
- */
- removeEventListener(eventName?: string, listener?: (...parameters: any[]) => void): void;
- /**
- * Alias of `removeEventListener`
- *
- * @param eventName {string} [options] Event name
- * @param listener {Function} [options] Event listener
- */
- off(eventName?: string, listener?: (...parameters: any[]) => void): void;
- }
- /**
- * @hidden
- * https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v2.0.0/class/BaseArrayClass/README.md
- */
- export declare class BaseArrayClass<T> extends BaseClass {
- constructor(initialData?: T[] | any);
- /**
- * Removes all elements from the array.
- * @param noNotify? {boolean} [options] Set true to prevent remove_at events.
- */
- empty(noNotify?: boolean): void;
- /**
- * Iterate over each element, calling the provided callback.
- * @param fn {Function}
- */
- forEach(fn: (element: T, index?: number) => void): void;
- /**
- * Iterate over each element, calling the provided callback.
- * @param fn {Function}
- * @return {Promise<void>}
- */
- forEachAsync(fn: ((element: T, callback: () => void) => void)): Promise<void>;
- /**
- * Iterate over each element, then Returns a new value.
- * Then you can get the results of each callback.
- * @param fn {Function}
- * @return {Array<Object>} returns a new array with the results
- */
- map(fn: (element: T, index: number) => any): any[];
- /**
- * Iterate over each element, calling the provided callback.
- * Then you can get the results of each callback.
- * @param fn {Function}
- * @param callback {Function}
- * @return {Promise<any>} returns a new array with the results
- */
- mapAsync(fn: ((element: T, callback: (newElement: any) => void) => void)): Promise<any[]>;
- /**
- * Same as `mapAsync`, but keep the execution order
- * @param fn {Function}
- * @param callback {Function}
- * @return {Promise<any>} returns a new array with the results
- */
- mapSeries(fn: ((element: T, callback: (newElement: any) => void) => void)): Promise<any[]>;
- /**
- * The filter() method creates a new array with all elements that pass the test implemented by the provided function.
- * @param fn {Function}
- * @return {T[]} returns a new filtered array
- */
- filter(fn: (element: T, index: number) => boolean): T[];
- /**
- * The filterAsync() method creates a new array with all elements that pass the test implemented by the provided function.
- * @param fn {Function}
- * @param callback {Function}
- * @return {Promise<T[]>} returns a new filtered array
- */
- filterAsync(fn: (element: T, callback: (result: boolean) => void) => void): Promise<T[]>;
- /**
- * Returns a reference to the underlying Array.
- * @return {Array<Object>}
- */
- getArray(): T[];
- /**
- * Returns the element at the specified index.
- * @param index {number}
- * @return {Object}
- */
- getAt(index: number): any;
- /**
- * Returns the number of the elements.
- * @return {number}
- */
- getLength(): number;
- /**
- * 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.
- * @param element {Object}
- * @return {number}
- */
- indexOf(element: T): number;
- /**
- * The reverse() method reverses an array in place.
- */
- reverse(): void;
- /**
- * The sort() method sorts the elements of an array in place and returns the array.
- */
- sort(): void;
- /**
- * Inserts an element at the specified index.
- * @param index {number}
- * @param element {Object}
- * @param noNotify? {boolean} [options] Set true to prevent insert_at event.
- * @return {Object}
- */
- insertAt(index: number, element: T, noNotify?: boolean): void;
- /**
- * Removes the last element of the array and returns that element.
- * @param noNotify? {boolean} [options] Set true to prevent remove_at event.
- * @return {Object}
- */
- pop(noNotify?: boolean): T;
- /**
- * Adds one element to the end of the array and returns the new length of the array.
- * @param element {object}
- * @param noNotify? {boolean} Set true to prevent insert_at events.
- */
- push(element: T, noNotify?: boolean): void;
- /**
- * Removes an element from the specified index.
- * @param index {number}
- * @param noNotify? {boolean} [options] Set true to prevent remove_at event.
- */
- removeAt(index: number, noNotify?: boolean): T;
- /**
- * Sets an element at the specified index.
- * @param index {number}
- * @param element {object}
- * @param noNotify? {boolean} [options] Set true to prevent set_at event.
- */
- setAt(index: number, element: T, noNotify?: boolean): void;
- }
- /**
- * @hidden
- * https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v2.0.0/class/Circle/README.md
- */
- export declare class Circle extends BaseClass {
- private _map;
- constructor(_map: GoogleMap, _objectInstance: any);
- /**
- * Returns the ID of instance.
- * @return {string}
- */
- getId(): string;
- /**
- * Returns the map instance.
- * @return {GoogleMap}
- */
- getMap(): GoogleMap;
- /**
- * Changes the center position.
- * @param latLng {ILatLng}
- */
- setCenter(latLng: ILatLng): void;
- /**
- * Returns the current center position
- * @return {ILatLng}
- */
- getCenter(): ILatLng;
- /**
- * Returns the current circle radius.
- * @return {number}
- */
- getRadius(): number;
- /**
- * Changes the circle radius.
- * @param radius {number}
- */
- setRadius(radius: number): void;
- /**
- * Changes the filling color (inner color).
- * @param color {string}
- */
- setFillColor(color: string): void;
- /**
- * Returns the current circle filling color (inner color).
- * @return {string}
- */
- getFillColor(): string;
- /**
- * Changes the stroke width.
- * @param strokeWidth {number}
- */
- setStrokeWidth(strokeWidth: number): void;
- /**
- * Returns the current circle stroke width (unit: pixel).
- * @return {number}
- */
- getStrokeWidth(): number;
- /**
- * Changes the stroke color (outter color).
- * @param strokeColor {string}
- */
- setStrokeColor(strokeColor: string): void;
- /**
- * Returns the current circle stroke color (outer color).
- * @return {string}
- */
- getStrokeColor(): string;
- /**
- * Changes click-ability of the circle.
- * @param clickable {boolean}
- */
- setClickable(clickable: boolean): void;
- /**
- * Returns true if the circle is clickable.
- * @return {boolean}
- */
- getClickable(): boolean;
- /**
- * Changes the circle zIndex order.
- * @param zIndex {number}
- */
- setZIndex(zIndex: number): void;
- /**
- * Returns the current circle zIndex.
- * @return {number}
- */
- getZIndex(): number;
- /**
- * Remove the circle.
- */
- remove(): void;
- /**
- * Returns the latLngBounds (rectangle) that contains the circle.
- * @return {LatLngBounds}
- */
- getBounds(): LatLngBounds;
- /**
- * Set circle visibility
- * @param visible {boolean}
- */
- setVisible(visible: boolean): void;
- /**
- * Returns true if the circle is visible.
- * @return {boolean}
- */
- getVisible(): boolean;
- }
- /**
- * @hidden
- */
- export declare class Environment {
- /**
- * Get the open source software license information for Google Maps SDK for iOS.
- * @return {Promise<any>}
- */
- static getLicenseInfo(): Promise<any>;
- /**
- * @deprecation
- * @hidden
- */
- getLicenseInfo(): Promise<any>;
- /**
- * Specifies the background color of the app.
- * @param color
- */
- static setBackgroundColor(color: string): void;
- /**
- * @deprecation
- * @hidden
- */
- setBackgroundColor(color: string): void;
- }
- /**
- * @hidden
- */
- export declare class Geocoder {
- /**
- * @deprecation
- * @hidden
- */
- geocode(request: GeocoderRequest): Promise<GeocoderResult[] | BaseArrayClass<GeocoderResult[]>>;
- /**
- * Converts position to address and vice versa
- * @param {GeocoderRequest} request Request object with either an address or a position
- * @return {Promise<GeocoderResult[] | BaseArrayClass<GeocoderResult>>}
- */
- static geocode(request: GeocoderRequest): Promise<GeocoderResult[] | BaseArrayClass<GeocoderResult[]>>;
- }
- /**
- * @hidden
- */
- export declare class LocationService {
- /**
- * Get the current device location without map
- * @return {Promise<MyLocation>}
- */
- static getMyLocation(options?: MyLocationOptions): Promise<MyLocation>;
- /**
- * Return true if the application has geolocation permission
- * @return {Promise<MyLocation>}
- */
- static hasPermission(): Promise<boolean>;
- }
- /**
- * @hidden
- */
- export declare class Encoding {
- /**
- * @deprecation
- * @hidden
- */
- decodePath(encoded: string, precision?: number): Array<ILatLng>;
- /**
- * @deprecation
- * @hidden
- */
- encodePath(path: Array<ILatLng> | BaseArrayClass<ILatLng>): string;
- /**
- * Decodes an encoded path string into a sequence of LatLngs.
- * @param encoded {string} an encoded path string
- * @param precision? {number} default: 5
- * @return {ILatLng[]}
- */
- static decodePath(encoded: string, precision?: number): Array<ILatLng>;
- /**
- * Encodes a sequence of LatLngs into an encoded path string.
- * @param path {Array<ILatLng> | BaseArrayClass<ILatLng>} a sequence of LatLngs
- * @return {string}
- */
- static encodePath(path: Array<ILatLng> | BaseArrayClass<ILatLng>): string;
- }
- /**
- * @hidden
- */
- export declare class Poly {
- /**
- * Returns true if the specified location is in the polygon path
- * @param location {ILatLng}
- * @param path {ILatLng[]}
- * @return {boolean}
- */
- static containsLocation(location: ILatLng, path: ILatLng[]): boolean;
- /**
- * Returns true if the specified location is on the polyline path
- * @param location {ILatLng}
- * @param path {ILatLng[]}
- * @return {boolean}
- */
- static isLocationOnEdge(location: ILatLng, path: ILatLng[]): boolean;
- }
- /**
- * @hidden
- */
- export declare class Spherical {
- /**
- * @deprecation
- * @hidden
- */
- computeDistanceBetween(from: ILatLng, to: ILatLng): number;
- /**
- * @deprecation
- * @hidden
- */
- computeOffset(from: ILatLng, distance: number, heading: number): LatLng;
- /**
- * @deprecation
- * @hidden
- */
- computeOffsetOrigin(to: ILatLng, distance: number, heading: number): LatLng;
- /**
- * @deprecation
- * @hidden
- */
- computeLength(path: Array<ILatLng> | BaseArrayClass<ILatLng>): number;
- /**
- * @deprecation
- * @hidden
- */
- computeArea(path: Array<ILatLng> | BaseArrayClass<ILatLng>): number;
- /**
- * @deprecation
- * @hidden
- */
- computeSignedArea(path: Array<ILatLng> | BaseArrayClass<ILatLng>): number;
- /**
- * @deprecation
- * @hidden
- */
- computeHeading(from: ILatLng, to: ILatLng): number;
- /**
- * @deprecation
- * @hidden
- */
- interpolate(from: ILatLng, to: ILatLng, fraction: number): LatLng;
- /**
- * Returns the distance, in meters, between two LatLngs.
- * @param locationA {ILatLng}
- * @param locationB {ILatLng}
- * @return {number}
- */
- static computeDistanceBetween(from: ILatLng, to: ILatLng): number;
- /**
- * Returns the LatLng resulting from moving a distance from an origin in the specified heading (expressed in degrees clockwise from north)
- * @param from {ILatLng}
- * @param distance {number}
- * @param heading {number}
- * @return {LatLng}
- */
- static computeOffset(from: ILatLng, distance: number, heading: number): LatLng;
- /**
- * 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.
- * @param to {ILatLng} The destination LatLng.
- * @param distance {number} The distance travelled, in meters.
- * @param heading {number} The heading in degrees clockwise from north.
- * @return {LatLng}
- */
- static computeOffsetOrigin(to: ILatLng, distance: number, heading: number): LatLng;
- /**
- * Returns the length of the given path.
- * @param path {Array<ILatLng> | BaseArrayClass<ILatLng>}
- * @return {number}
- */
- static computeLength(path: Array<ILatLng> | BaseArrayClass<ILatLng>): number;
- /**
- * Returns the area of a closed path. The computed area uses the same units as the radius.
- * @param path {Array<ILatLng> | BaseArrayClass<ILatLng>}.
- * @return {number}
- */
- static computeArea(path: Array<ILatLng> | BaseArrayClass<ILatLng>): number;
- /**
- * Returns the signed area of a closed path. The signed area may be used to determine the orientation of the path.
- * @param path {Array<ILatLng> | BaseArrayClass<ILatLng>}.
- * @return {number}
- */
- static computeSignedArea(path: Array<ILatLng> | BaseArrayClass<ILatLng>): number;
- /**
- * Returns the heading from one LatLng to another LatLng. Headings are expressed in degrees clockwise from North within the range (-180,180).
- * @param from {ILatLng}
- * @param to {ILatLng}
- * @return {number}
- */
- static computeHeading(from: ILatLng, to: ILatLng): number;
- /**
- * Returns the LatLng which lies the given fraction of the way between the origin LatLng and the destination LatLng.
- * @param from {ILatLng} The LatLng from which to start.
- * @param to {ILatLng} The LatLng toward which to travel.
- * @param fraction {number} A fraction of the distance to travel from 0.0 to 1.0 .
- * @return {LatLng}
- */
- static interpolate(from: ILatLng, to: ILatLng, fraction: number): LatLng;
- }
- /**
- * @hidden
- */
- export declare class StreetViewPanorama extends BaseClass {
- constructor(element: string | HTMLElement, options?: StreetViewOptions);
- /**
- * Sets the point of view for the Street View panorama.
- */
- setPov(pov: StreetViewCameraPano): void;
- /**
- * Sets the StreetViewPanorama to a given location.
- */
- setPosition(cameraPosition: String | StreetViewSetPositionOption): void;
- /**
- * Toggles the ability for users to use pan around on the panorama using gestures.
- * @param gestureEnable {boolean}
- */
- setPanningGesturesEnabled(gestureEnable: boolean): void;
- /**
- * Retrun true if the panning gesture is enabled.
- * @return {boolean}
- */
- getPanningGesturesEnabled(): boolean;
- /**
- * Toggles the ability for users to zoom on the panorama using gestures.
- * @param gestureEnable {boolean}
- */
- setZoomGesturesEnabled(gestureEnable: boolean): void;
- /**
- * Retrun true if the zooming gesture is enabled.
- * @return {boolean}
- */
- getZoomGesturesEnabled(): boolean;
- /**
- * Toggles the ability for users to see street names on the panorama.
- * @param gestureEnable {boolean}
- */
- setStreetNamesEnabled(gestureEnable: boolean): void;
- /**
- * Retrun true if the street names control is enabled.
- * @return {boolean}
- */
- getStreetNamesEnabled(): boolean;
- /**
- * Toggles the ability for users to move between panoramas.
- * @param gestureEnable {boolean}
- */
- setNavigationEnabled(gestureEnable: boolean): void;
- /**
- * Retrun true if the navigation control is enabled.
- * @return {boolean}
- */
- getNavigationEnabled(): boolean;
- /**
- * Retrun the navigation links (StreetViewLocation.links)
- * @return {StreetViewNavigationLink[]}
- */
- getLinks(): StreetViewNavigationLink[];
- /**
- * Retrun the current location
- * @return {StreetViewLocation}
- */
- getLocation(): StreetViewLocation;
- /**
- * Retrun the current panorama id
- * @return {string}
- */
- getPano(): string;
- /**
- * Retrun the current position (StreetViewLocation.latLng)
- * @return {string}
- */
- getPosition(): ILatLng;
- /**
- * Destroy a map completely
- * @return {Promise<any>}
- */
- remove(): Promise<any>;
- }
- /**
- * @hidden
- */
- export declare class GoogleMap extends BaseClass {
- constructor(element: string | HTMLElement, options?: GoogleMapOptions);
- /**
- * Changes the map div
- * @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.
- */
- setDiv(domNode?: HTMLElement | string): void;
- /**
- * Returns the map HTML element
- * @return {HTMLElement}
- */
- getDiv(): HTMLElement;
- /**
- * Changes the map type id
- * @param mapTypeId {string}
- */
- setMapTypeId(mapTypeId: MapType): void;
- /**
- * Moves the camera with animation
- * @return {Promise<any>}
- */
- animateCamera(cameraPosition: CameraPosition<any>): Promise<any>;
- /**
- * Zooming in the camera with animation
- * @return {Promise<any>}
- */
- animateCameraZoomIn(): Promise<any>;
- /**
- * Zooming out the camera with animation
- * @return {Promise<any>}
- */
- animateCameraZoomOut(): Promise<any>;
- /**
- * Moves the camera without animation
- * @return {Promise<any>}
- */
- moveCamera(cameraPosition: CameraPosition<any>): Promise<any>;
- /**
- * Zooming in the camera without animation
- * @return {Promise<any>}
- */
- moveCameraZoomIn(): Promise<any>;
- /**
- * Zooming out the camera without animation
- * @return {Promise<any>}
- */
- moveCameraZoomOut(): Promise<any>;
- /**
- * Get the position of the camera.
- * @return {CameraPosition}
- */
- getCameraPosition(): CameraPosition<ILatLng>;
- /**
- * Get the current camera target position
- * @return {ILatLng}
- */
- getCameraTarget(): ILatLng;
- /**
- * Get the current camera zoom level
- * @return {number}
- */
- getCameraZoom(): number;
- /**
- * Get the current camera bearing
- * @return {number}
- */
- getCameraBearing(): number;
- /**
- * Get the current camera tilt (view angle)
- * @return {number}
- */
- getCameraTilt(): number;
- /**
- * Set the center position of the camera view
- * @param latLng {ILatLng | Array<ILatLng>}
- */
- setCameraTarget(latLng: ILatLng | Array<ILatLng>): void;
- /**
- * Set zoom level of the camera
- * @param zoomLevel {number} Zoom level
- */
- setCameraZoom(zoomLevel: number): void;
- /**
- * Set the camera view angle
- * @param tiltAngle {number} Tilt angle
- */
- setCameraTilt(tiltAngle: number): void;
- /**
- * Set camera bearing
- * @param bearing {any}
- */
- setCameraBearing(bearing: any): void;
- /**
- * Changes the center of the map by the given distance in pixels
- * @param x {number}
- * @param y {number}
- */
- panBy(x: number, y: number): void;
- /**
- * Get the current visible region (southWest and northEast)
- * @return {VisibleRegion}
- */
- getVisibleRegion(): VisibleRegion;
- /**
- * Get the current device location
- * @return {Promise<MyLocation>}
- */
- getMyLocation(options?: MyLocationOptions): Promise<MyLocation>;
- /**
- * Set false to ignore all clicks on the map
- * @param isClickable {boolean}
- */
- setClickable(isClickable: boolean): void;
- /**
- * Destroy a map completely
- * @return {Promise<any>}
- */
- remove(): Promise<any>;
- /**
- * Remove all overlays, such as marker
- * @return {Promise<any>}
- */
- clear(): Promise<any>;
- /**
- * Convert the unit from LatLng to the pixels from the left/top of the map div
- * @return {Promise<any>}
- */
- fromLatLngToPoint(latLng: ILatLng): Promise<any[]>;
- /**
- * Convert the unit from the pixels from the left/top to the LatLng
- * @return {Promise<LatLng>}
- */
- fromPointToLatLng(point: number[]): Promise<LatLng>;
- /**
- * Set true if you want to show the MyLocation control (blue dot)
- * @param enabled {boolean}
- */
- setMyLocationEnabled(enabled: boolean): void;
- /**
- * Set true if you want to show the MyLocation button
- * @param enabled {boolean}
- */
- setMyLocationButtonEnabled(enabled: boolean): void;
- /**
- * Get the currently focused building
- * @return {Promise<any>}
- */
- getFocusedBuilding(): Promise<any>;
- /**
- * Set true if you want to show the indoor map
- * @param enabled {boolean}
- */
- setIndoorEnabled(enabled: boolean): void;
- /**
- * Set true if you want to show the traffic layer
- * @param enabled {boolean}
- */
- setTrafficEnabled(enabled: boolean): void;
- /**
- * Set true if you want to show the compass button
- * @param enabled {boolean}
- */
- setCompassEnabled(enabled: boolean): void;
- /**
- * Sets the preference for whether all gestures should be enabled or disabled
- * @param enabled {boolean}
- */
- setAllGesturesEnabled(enabled: boolean): void;
- /**
- * Set visibility of the map
- * @param visible {boolean}
- */
- setVisible(visible: boolean): void;
- /**
- * Adjust the map padding (same as CSS padding rule)
- * @param top {number}
- * @param right {number}
- * @param left {number}
- * @param bottom {number}
- */
- setPadding(top: number, right?: number, bottom?: number, left?: number): void;
- /**
- * Set options
- * @param options
- */
- setOptions(options: GoogleMapOptions): void;
- /**
- * Adds a marker
- * @param options {MarkerOptions} options
- * @return {Promise<Marker>}
- */
- addMarker(options: MarkerOptions): Promise<Marker>;
- /**
- * Adds a marker in synchronous
- * @param options {MarkerOptions} options
- * @Returns {Marker}
- */
- addMarkerSync(options: MarkerOptions): Marker;
- /**
- * Adds a marker cluster
- * @param options {MarkerClusterOptions} options
- * @return {Promise<MarkerCluster>}
- */
- addMarkerCluster(options: MarkerClusterOptions): Promise<MarkerCluster>;
- /**
- * Adds a marker cluster in synchronous
- * @param options {MarkerClusterOptions} options
- * @Returns {MarkerCluster}
- */
- addMarkerClusterSync(options: MarkerClusterOptions): MarkerCluster;
- /**
- * Adds a circle
- * @param options {CircleOptions} options
- * @return {Promise<Circle>}
- */
- addCircle(options: CircleOptions): Promise<Circle>;
- /**
- * Adds a circle in synchronous
- * @param options {CircleOptions} options
- * @return {Circle}
- */
- addCircleSync(options: CircleOptions): Circle;
- /**
- * Adds a polygon
- * @param options {PolygonOptions} options
- * @return {Promise<Polygon>}
- */
- addPolygon(options: PolygonOptions): Promise<Polygon>;
- /**
- * Adds a polygon in synchronous
- * @param options {PolygonOptions} options
- * @return {Polygon}
- */
- addPolygonSync(options: PolygonOptions): Polygon;
- /**
- * Adds a polyline
- * @param options {PolylineOptions} options
- * @return {Promise<Polyline>}
- */
- addPolyline(options: PolylineOptions): Promise<Polyline>;
- /**
- * Adds a polyline in synchronous
- * @param options {PolylineOptions} options
- * @return {Polyline}
- */
- addPolylineSync(options: PolylineOptions): Polyline;
- /**
- * Adds a tile overlay
- * @param options {TileOverlayOptions} options
- * @return {Promise<TileOverlay>}
- */
- addTileOverlay(options: TileOverlayOptions): Promise<TileOverlay>;
- /**
- * Adds a tile overlay in synchronous
- * @param options {TileOverlayOptions} options
- * @return {TileOverlay}
- */
- addTileOverlaySync(options: TileOverlayOptions): TileOverlay;
- /**
- * Adds a ground overlay
- * @param options {GroundOverlayOptions} options
- * @return {Promise<GroundOverlay>}
- */
- addGroundOverlay(options: GroundOverlayOptions): Promise<GroundOverlay>;
- /**
- * Adds a ground overlay in synchronous
- * @param options {GroundOverlayOptions} options
- * @return {GroundOverlay}
- */
- addGroundOverlaySync(options: GroundOverlayOptions): GroundOverlay;
- /**
- * Adds a kml overlay
- * @param options {KmlOverlayOptions} options
- * @return {Promise<KmlOverlay>}
- */
- addKmlOverlay(options: KmlOverlayOptions): Promise<KmlOverlay>;
- /**
- * Returns the base64 encoded screen capture of the map.
- * @param options {ToDataUrlOptions} [options] options
- * @return {Promise<string>}
- */
- toDataURL(options?: ToDataUrlOptions): Promise<string>;
- }
- /**
- * @hidden
- */
- export declare class GroundOverlay extends BaseClass {
- private _map;
- constructor(_map: GoogleMap, _objectInstance: any);
- /**
- * Returns the ID of instance.
- * @return {string}
- */
- getId(): string;
- /**
- * Returns the map instance.
- * @return {GoogleMap}
- */
- getMap(): GoogleMap;
- /**
- * Changes the bounds of the GroundOverlay
- * @param bounds { ILatLng[]}
- */
- setBounds(bounds: ILatLng[]): void;
- /**
- * Changes the bearing of the ground overlay
- * @param bearing {number}
- */
- setBearing(bearing: number): void;
- /**
- * Returns the current bearing value
- */
- getBearing(): number;
- /**
- * Changes the image of the ground overlay
- * @param imageUrl {string} URL of image
- */
- setImage(imageUrl: string): void;
- /**
- * Changes the opacity of the ground overlay from 0.0 to 1.0
- * @param opacity {number}
- */
- setOpacity(opacity: number): void;
- /**
- * Returns the current opacity
- * @return {number}
- */
- getOpacity(): number;
- /**
- * Changes click-ability of the ground overlay
- * @param clickable {boolean}
- */
- setClickable(clickable: boolean): void;
- /**
- * Returns true if the ground overlay is clickable
- * @return {boolean}
- */
- getClickable(): boolean;
- /**
- * Changes visibility of the ground overlay
- * @param visible {boolean}
- */
- setVisible(visible: boolean): void;
- /**
- * Returns true if the ground overlay is visible
- * @return {boolean}
- */
- getVisible(): boolean;
- /**
- * Changes the ground overlay zIndex order
- * @param index {number}
- */
- setZIndex(index: number): void;
- /**
- * Returns the current ground overlay zIndex
- * @return {number}
- */
- getZIndex(): number;
- /**
- * Remove the ground overlay
- */
- remove(): void;
- }
- /**
- * @hidden
- */
- export declare class HtmlInfoWindow extends BaseClass {
- constructor();
- /**
- * Changes the backgroundColor
- * @param color {string}
- */
- setBackgroundColor(color: string): void;
- /**
- * Set your HTML contents.
- * @param content {any} String containing text or HTML element
- * @param cssOptions? {any} CSS styles for the container element of HTMLInfoWindow
- */
- setContent(content: string | Element, cssOptions?: any): void;
- /**
- * Open the htmlInfoWindow
- * @param marker {Marker}
- */
- open(marker: any): any;
- /**
- * Close the htmlInfoWindow
- */
- close(): void;
- }
- /**
- * @hidden
- */
- export declare class Marker extends BaseClass {
- private _map;
- constructor(_map: GoogleMap, _objectInstance: any);
- /**
- * Returns the ID of instance.
- * @return {string}
- */
- getId(): string;
- /**
- * Returns the map instance.
- * @return {GoogleMap}
- */
- getMap(): GoogleMap;
- /**
- * Set the marker position.
- * @param latLng {ILatLng}
- */
- setPosition(latLng: ILatLng): void;
- /**
- * Returns the marker position.
- * @return {ILatLng}
- */
- getPosition(): ILatLng;
- /**
- * Show the normal infoWindow of the marker.
- */
- showInfoWindow(): void;
- /**
- * Hide the normal infoWindow of the marker.
- */
- hideInfoWindow(): void;
- /**
- * Specify the animation either `DROP` or `BOUNCE`
- * @param animation {string}
- */
- setAnimation(animation: string): void;
- /**
- * Set true if you **do not want** to move the map when you click on the marker.
- * @param disableAutoPan {boolean}
- */
- setDisableAutoPan(disableAutoPan: boolean): void;
- /**
- * Set false if you want to hide the marker.
- * @param visible
- */
- setVisible(visible: boolean): void;
- /**
- * Returns true if the marker is visible
- */
- isVisible(): boolean;
- /**
- * Changes title of the normal infoWindow.
- * @param title {string}
- */
- setTitle(title: string): void;
- /**
- * Returns the title strings.
- * @return {string}
- */
- getTitle(): string;
- /**
- * Changes snippet of the normal infoWindow.
- * @param snippet {string}
- */
- setSnippet(snippet: string): void;
- /**
- * Returns the snippet strings.
- * @return {string}
- */
- getSnippet(): string;
- /**
- * Changes the marker opacity from 0.0 to 1.0.
- * @param alpha {number} Opacity
- */
- setOpacity(alpha: number): void;
- /**
- * Returns the marker opacity.
- * @return {number} Opacity
- */
- getOpacity(): number;
- /**
- * Remove the marker.
- */
- remove(): void;
- /**
- * Changes the info window anchor. This defaults to 50% from the left of the image and at the bottom of the image.
- * @param x {number} Distance from left of the icon image in pixels.
- * @param y {number} Distance from top of the icon image in pixels.
- */
- setIconAnchor(x: number, y: number): void;
- /**
- * Changes the info window anchor. This defaults to 50% from the left of the image and at the top of the image.
- * @param x {number} Distance from left of the icon image in pixels.
- * @param y {number} Distance from top of the icon image in pixels.
- */
- setInfoWindowAnchor(x: number, y: number): void;
- /**
- * Returns true if the infoWindow is shown on the marker
- * @return {boolean}
- */
- isInfoWindowShown(): boolean;
- /**
- * Higher zIndex value overlays will be drawn on top of lower zIndex value tile layers and overlays.
- * @param y {number} z-index
- */
- setZIndex(zIndex: number): void;
- /**
- * Get z-index
- * @return {number}
- */
- getZIndex(): number;
- /**
- * Set true if you allow all users to drag the marker.
- * @param draggable {boolean}
- */
- setDraggable(draggable: boolean): void;
- /**
- * Returns true if the marker drag is enabled.
- * @return {boolean}
- */
- isDraggable(): boolean;
- /**
- * Set true if you want to be flat marker.
- * @param flat {boolean}
- */
- setFlat(flat: boolean): void;
- /**
- * Changes icon url and/or size
- * @param icon
- */
- setIcon(icon: MarkerIcon): void;
- /**
- * Set the marker rotation angle.
- * @param rotation {number}
- */
- setRotation(rotation: number): void;
- /**
- * Returns the marker rotation angle.
- * @return {number}
- */
- getRotation(): number;
- }
- /**
- * @hidden
- */
- export declare class MarkerCluster extends BaseClass {
- private _map;
- constructor(_map: GoogleMap, _objectInstance: any);
- /**
- * Returns the ID of instance.
- * @return {string}
- */
- getId(): string;
- /**
- * Add one marker location
- * @param marker {MarkerOptions} one location
- * @param skipRedraw? {boolean} marker cluster does not redraw the marker cluster if true.
- */
- addMarker(marker: MarkerOptions, skipRedraw?: boolean): void;
- /**
- * Add marker locations
- * @param markers {MarkerOptions[]} multiple location
- */
- addMarkers(markers: MarkerOptions[]): void;
- /**
- * Remove the marker cluster
- */
- remove(): void;
- /**
- * Returns the map instance.
- * @return {GoogleMap}
- */
- getMap(): GoogleMap;
- }
- /**
- * @hidden
- */
- export declare class Polygon extends BaseClass {
- private _map;
- constructor(_map: GoogleMap, _objectInstance: any);
- /**
- * Returns the ID of instance.
- * @return {string}
- */
- getId(): string;
- /**
- * Returns the map instance.
- * @return {GoogleMap}
- */
- getMap(): GoogleMap;
- /**
- * Changes the polygon points.
- * @param points {ILatLng[]}
- */
- setPoints(points: ILatLng[]): void;
- /**
- * Returns an instance of the BaseArrayClass.
- * You can modify the points.
- * @return {BaseArrayClass<ILatLng>}
- */
- getPoints(): BaseArrayClass<ILatLng>;
- /**
- * Changes the polygon holes.
- * @param holes {ILatLng[][]}
- */
- setHoles(holes: ILatLng[][]): void;
- /**
- * Returns an instance of the BaseArrayClass.
- * You can modify the holes.
- * @return {BaseArrayClass<ILatLng[]>}
- */
- getHoles(): BaseArrayClass<ILatLng[]>;
- /**
- * Changes the filling color (inner color)
- * @param fillColor {string}
- */
- setFillColor(fillColor: string): void;
- /**
- * Returns the current polygon filling color (inner color).
- * @return {string}
- */
- getFillColor(): string;
- /**
- * Changes the stroke color (outer color)
- * @param strokeColor {string}
- */
- setStrokeColor(strokeColor: string): void;
- /**
- * Returns the current polygon stroke color (outer color)
- * @return {string}
- */
- getStrokeColor(): string;
- /**
- * Changes click-ability of the polygon
- * @param clickable {boolean}
- */
- setClickable(clickable: boolean): void;
- /**
- * Returns true if the polygon is clickable
- */
- getClickable(): boolean;
- /**
- * Changes visibility of the polygon
- * @param visible {boolean}
- */
- setVisible(visible: boolean): void;
- /**
- * Returns true if the polygon is visible
- * @return {boolean}
- */
- getVisible(): boolean;
- /**
- * Changes the polygon zIndex order.
- * @param zIndex {number}
- */
- setZIndex(zIndex: number): void;
- /**
- * Returns the current polygon zIndex
- * @return {number}
- */
- getZIndex(): number;
- /**
- * Remove the polygon.
- */
- remove(): void;
- /**
- * Changes the polygon stroke width
- */
- setStrokeWidth(strokeWidth: number): void;
- /**
- * Returns the polygon stroke width
- */
- getStrokeWidth(): number;
- /**
- * When true, edges of the polygon are interpreted as geodesic and will follow the curvature of the Earth.
- * @param geodesic {boolean}
- */
- setGeodesic(geodesic: boolean): void;
- /**
- * Returns true if the polygon is geodesic.
- * @return {boolean}
- */
- getGeodesic(): boolean;
- }
- /**
- * @hidden
- */
- export declare class Polyline extends BaseClass {
- private _map;
- constructor(_map: GoogleMap, _objectInstance: any);
- /**
- * Returns the ID of instance.
- * @return {string}
- */
- getId(): string;
- /**
- * Returns the map instance.
- * @return {GoogleMap}
- */
- getMap(): GoogleMap;
- /**
- * Changes the polyline points.
- * @param points {ILatLng[]}
- */
- setPoints(points: ILatLng[]): void;
- /**
- * Returns an instance of the BaseArrayClass
- * You can modify the points.
- * @return {BaseArrayClass<ILatLng>}
- */
- getPoints(): BaseArrayClass<ILatLng>;
- /**
- * When true, edges of the polyline are interpreted as geodesic and will follow the curvature of the Earth.
- * @param geoDesic {boolean}
- */
- setGeoDesic(geoDesic: boolean): void;
- /**
- * Returns true if the polyline is geodesic
- */
- getGeodesic(): boolean;
- /**
- * Changes visibility of the polyline
- * @param visible {boolean}
- */
- setVisible(visible: boolean): void;
- /**
- * Returns true if the polyline is visible
- * @return {boolean}
- */
- getVisible(): boolean;
- /**
- * Changes click-ability of the polyline
- * @param clickable {boolean}
- */
- setClickable(clickable: boolean): void;
- /**
- * Returns true if the polyline is clickable
- * @return {boolean}
- */
- getClickable(): boolean;
- /**
- * Changes the polyline color
- * @param strokeColor {string}
- */
- setStrokeColor(strokeColor: string): void;
- /**
- * Returns the current polyline color
- * @return {string}
- */
- getStrokeColor(): string;
- /**
- * Changes the polyline stroke width
- * @param strokeWidth {number}
- */
- setStrokeWidth(strokeWidth: number): void;
- /**
- * Returns the current stroke width (unit: pixel).
- * @return {number}
- */
- getStrokeWidth(): number;
- /**
- * Changes the polyline zIndex order.
- * @param index {number}
- */
- setZIndex(index: number): void;
- /**
- * Returns the current polyline zIndex
- * @return {number}
- */
- getZIndex(): number;
- /**
- * Remove the polyline
- */
- remove(): void;
- }
- /**
- * @hidden
- */
- export declare class TileOverlay extends BaseClass {
- private _map;
- constructor(_map: GoogleMap, _objectInstance: any);
- /**
- * Returns the ID of instance.
- * @return {string}
- */
- getId(): string;
- /**
- * Returns the map instance.
- * @return {GoogleMap}
- */
- getMap(): GoogleMap;
- /**
- * Set whether the tiles should fade in.
- * @param fadeIn {boolean}
- */
- setFadeIn(fadeIn: boolean): void;
- /**
- * Get whether the tiles should fade in
- * @return {boolean}
- */
- getFadeIn(): boolean;
- /**
- * Set the zIndex of the tile overlay
- * @param zIndex {number}
- */
- setZIndex(zIndex: number): void;
- /**
- * Returns the zIndex of the tile overlay
- * @return {number}
- */
- getZIndex(): number;
- /**
- * Set the opacity of the tile overlay
- * @param opacity {number}
- */
- setOpacity(opacity: number): void;
- /**
- * Returns the opacity of the tile overlay
- * @return {number}
- */
- getOpacity(): number;
- /**
- * Set false if you want to hide
- * @param visible {boolean}
- */
- setVisible(visible: boolean): void;
- /**
- * Returns true if the tile overlay is visible
- * @return {boolean}
- */
- getVisible(): boolean;
- /**
- * Get tile size
- */
- getTileSize(): any;
- /**
- * Remove the tile overlay
- */
- remove(): void;
- }
- /**
- * @hidden
- */
- export declare class KmlOverlay extends BaseClass {
- private _map;
- constructor(_map: GoogleMap, _objectInstance: any);
- /**
- * Returns the viewport to contains all overlays
- */
- getDefaultViewport(): CameraPosition<ILatLng | ILatLng[]>;
- /**
- * Returns the ID of instance.
- * @return {string}
- */
- getId(): string;
- /**
- * Returns the map instance.
- * @return {GoogleMap}
- */
- getMap(): GoogleMap;
- /**
- * Changes visibility of the kml overlay
- * @param visible {boolean}
- */
- setVisible(visible: boolean): void;
- /**
- * Returns true if the kml overlay is visible
- * @return {boolean}
- */
- getVisible(): boolean;
- /**
- * Changes click-ability of the KmlOverlay
- * @param clickable {boolean}
- */
- setClickable(clickable: boolean): void;
- /**
- * Returns true if the KmlOverlay is clickable
- * @return {boolean}
- */
- getClickable(): boolean;
- /**
- * Remove the KmlOverlay
- */
- remove(): void;
- }
|