How to use the @ionic-native/google-maps.Environment.setEnv 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 bharathirajatut / ionic4 / google-map-example / home.page.ts View on Github external
loadMap() {

    // This code is necessary for browser
    Environment.setEnv({
      'API_KEY_FOR_BROWSER_RELEASE': 'API-KEY',
      'API_KEY_FOR_BROWSER_DEBUG': 'API-KEY'
    });

    let mapOptions: GoogleMapOptions = {
      camera: {
         target: {
          lat: 13.0380523,
          lng: 80.21371
         },
         zoom: 18,
         tilt: 30
       }
    };

    this.map = GoogleMaps.create('map', mapOptions);