How to use the @ionic-native/google-maps.GoogleMapsMapTypeId.ROADMAP function in @ionic-native/google-maps

To help you get started, we’ve selected a few @ionic-native/google-maps 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 UCL-INGI / StudUCLouvain / src / providers / map-services / map-service.ts View on Github external
(position) => {
          console.log("initDeviceMap - geolocation answered");
          this.userLocation = new MapLocation( "Ma Position",
                                      "",
                                      String(position.latLng.lat),
                                      String(position.latLng.lng),
                                      "MYPOS");

          //let latLng = new LatLng(position.coords.latitude, position.coords.longitude);
          let latLng = position.latLng;
          let mapOptions = {
            center: latLng,
            zoom: 15,
            mapTypeId: GoogleMapsMapTypeId.ROADMAP
          }
          // create CameraPosition
          let camPos: CameraPosition = {
            target: latLng,
            zoom: 15
          };
          //this.map = new GoogleMap(this.mapElement, mapOptions);
          this.map = GoogleMaps.create(this.mapElement, mapOptions);
          this.map.on(GoogleMapsEvent.MAP_READY).subscribe(() => {
            console.log('Map is ready!');
            this.map.moveCamera(camPos);
            resolve(true);
          });
        }, (error) => {
          console.log("Map error initDeviceMap : " + error);