How to use the ionic-native.GoogleMap function in ionic-native

To help you get started, we’ve selected a few ionic-native examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aaronksaunders / ionic2GMapNative / app / pages / home / home.ts View on Github external
GoogleMap.isAvailable().then(() => {

      this.map = new GoogleMap('map_canvas');

      // this.map.on(GoogleMapsEvent.MAP_READY).subscribe(
      //   () => this.onMapReady(),
      //   () => alert("Error: onMapReady")
      // );

      // this.map.on(GoogleMapsEvent.MAP_READY).subscribe(
      //   (data: any) => {
      //     alert("GoogleMap.onMapReady(): ");
      //   },
      //   () => alert("Error: GoogleMapsEvent.MAP_READY")
      // );

      this.map.one(GoogleMapsEvent.MAP_READY).then((data: any) => {
        alert("GoogleMap.onMapReady(): " + JSON.stringify(data));
github zyra / ionic-native-playground / app / pages / main / main.ts View on Github external
this.platform.ready().then(()=> {

            this.googleMap = new GoogleMap("gmap");
            console.log("gmap is ", this.googleMap);
            let myPosition = new GoogleMapsLatLng(43.536476, -79.7304218);
            console.log("My position is", myPosition);
            let markerOptions: GoogleMapsMarkerOptions = {
                position: myPosition,
                title: 'Custom thing'
            };

            //marker.showInfoWindow();

            this.googleMap.on(GoogleMapsEvent.MAP_CLICK)
                .map(data=>data)
                .subscribe(
                (data: any) => console.log("GoogleMap.onMapClick(): ", data)
            );
github RioBus / ionic-app / src / components / maps / controller.ts View on Github external
private onPlatformReady(): void {
        this.map = new GoogleMap('map_canvas');
        this.mcontrol = new MarkerController(this.map);
        this.map.one(GoogleMapsEvent.MAP_READY)
            .then(() => this.onMapReady());
    }
github Lacka90 / ionic-photo-maps / src / pages / maps / maps.ts View on Github external
initMap() {
    const element: HTMLElement = document.getElementById('map');
    if (!this.map) {
      this.map = new GoogleMap(element);
      this.map.one(GoogleMapsEvent.MAP_READY).then(() => {
        this.loadImagePlaces(this.map)
          .then(coords => {
            const filtered = coords.filter(coord => coord);
            const bounds = filtered.map((coord: Coordinates) => {
              return new GoogleMapsLatLng(coord.latitude, coord.longitude);
            });

            this.map.moveCamera({
              target: bounds,
            });
          });
      });
    }
  }