From 5cf9fde50585c02afb070a5aa1f0c927071a4a21 Mon Sep 17 00:00:00 2001 From: Ibrahim Hadeed Date: Wed, 25 May 2016 16:59:32 -0400 Subject: [PATCH] add InstanceProperty decorator --- src/plugins/googlemaps.ts | 113 +++++++++++++++++++++++++++++++++----- 1 file changed, 100 insertions(+), 13 deletions(-) diff --git a/src/plugins/googlemaps.ts b/src/plugins/googlemaps.ts index 26255c24..3f9d63bf 100644 --- a/src/plugins/googlemaps.ts +++ b/src/plugins/googlemaps.ts @@ -5,6 +5,7 @@ import {Cordova, Plugin} from './plugin'; import {Observable} from 'rxjs/Rx'; import {CordovaInstance} from './plugin'; +import {InstanceProperty} from "../../dist/plugins/plugin"; /** * Created by Ibrahim on 3/29/2016. */ @@ -354,23 +355,23 @@ export interface VisibleRegion { } export class GoogleMapsMarker { - icon: any; - title: string; - snippet: string; - position: GoogleMapsLatLng; - infoWindowAnchor: number[]; - draggable: boolean; - flat: boolean; - rotation: number; - visible: boolean; - styles: any; - animation: string; - zIndex: number; + @InstanceProperty icon: any; + @InstanceProperty title: string; + @InstanceProperty snippet: string; + @InstanceProperty position: GoogleMapsLatLng; + @InstanceProperty infoWindowAnchor: number[]; + @InstanceProperty draggable: boolean; + @InstanceProperty flat: boolean; + @InstanceProperty rotation: number; + @InstanceProperty visible: boolean; + @InstanceProperty styles: any; + @InstanceProperty animation: string; + @InstanceProperty zIndex: number; constructor (private _objectInstance: any) { } @CordovaInstance() - getPosition (): Promise {return; } + getPosition (): Promise {return; } @CordovaInstance({ sync: true @@ -505,6 +506,92 @@ export interface GoogleMapsMarkerIcon { } } +export class GoogleMapsCircle { + @InstanceProperty center: GoogleMapsLatLng; + @InstanceProperty visible: boolean; + @InstanceProperty radius: number; + @InstanceProperty strokeColor: string; + @InstanceProperty strokeWidth: number; + @InstanceProperty fillColor: string; + @InstanceProperty visible: boolean; + @InstanceProperty zIndex: number; + + constructor(private _objectInstnace: any) { } + + @CordovaInstance({ + sync: true + }) + getCenter(): GoogleMapsLatLng {return; } + +@CordovaInstance({ + sync: true +}) + getRadius(): number {return; } + +@CordovaInstance({ + sync: true +}) + getStrokeColor(): string {return; } + + @CordovaInstance({ + sync: true + }) + getVisible(): boolean {return; } + +@CordovaInstance({ + sync: true +}) + getZIndex(): number {return; } + +@CordovaInstance({ + sync: true +}) + remove(): void { } + +@CordovaInstance({ + sync: true +}) + setCenter(latLng: GoogleMapsLatLng): void { } + +@CordovaInstance({ + sync: true +}) + setFillColor(fillColor: string): void { } + +@CordovaInstance({ + sync: true +}) + setStrokeColor(strokeColor: string): void { } + +@CordovaInstance({ + sync: true +}) + setStrokeWidth(strokeWidth: number): void { } + +@CordovaInstance({ + sync: true +}) + setVisible(visible: boolean): void { } + +@CordovaInstance({ + sync: true +}) + setZIndex(zIndex: number): void { } + +@CordovaInstance({ + sync: true +}) + setRadius(radius: number): void { } + +@CordovaInstance({ + sync: true +}) + getMap(): GoogleMaps {return; } + + + +} + export class GoogleMapsLatLng { constructor (public lat: string, public lng: string) { return plugin.google.maps.LatLng(lat, lng);