title: why ionic 3 google map with lat lang is not loading on android
body: <p>Why my <code>google map</code> is not appearing in on <code>android</code> device.</p>
  
  <p>I'm able <code>console.log(); lat, lang</code> in browser. device will ask permission for location access but it will not <code>render map</code>.</p>
  
  <p><strong>below code works fine for predefined <code>lat, lang</code></strong></p>
  
  <pre><code> ionViewDidLoad() {
      console.log('ionViewDidLoad GoogleMapTestPage');
     this.loadMapHandler();    
  
    }
  
      loadMapHandler() {
  
        //console.log(lat,lang);
  
       // create a new map by passing HTMLElement
       let element: HTMLElement = document.getElementById('map');
  
       let map: GoogleMap = this.googleMaps.create(element);
  
  
  
       // create CameraPosition 
       let position: any = {
         target: LatLng,    
         zoom: 18,
         tilt: 30
       };
  
       map.one(GoogleMapsEvent.MAP_READY).then(() =&gt; {
           console.log('Map is ready!');
           // Now you can add elements to the map like the marker
            map.moveCamera(position);
  
           // create new marker
          let markerOptions:any = {
              position: LatLng,
              title: 'Ionic'
          };
  
          const marker:any = map.addMarker(markerOptions)
              .then((marker: Marker) =&gt; {
                  marker.showInfoWindow();
              });
          });
  
  
        }
  </code></pre>
  
  <p><strong>The above code works fine on android</strong></p>
  
  <p>when i try to get current location of user and  and pass lat, lang to another </p>
  
  <p>function then i will not work</p>
  
  <p><strong>below is my code which is not working</strong></p>
  
  <p><strong>code not working on android:</strong> ask permission but doesn't work</p>
  
  <pre><code>    import { Geolocation ,GeolocationOptions } from '@ionic-native/geolocation';
       constructor(...,public googleMaps: GoogleMaps,private geolocation : Geolocation) {
        }
  
    ionViewDidLoad() {
  
     this.loadMap();    
  
    }
      loadMap(){
  
           this.geolocation.getCurrentPosition().then((position) =&gt; {
  
             this.loadMapHandler(position.coords.latitude,position.coords.longitude);       
  
  
          }, (err) =&gt; {
            console.log(err);             
          });
      }
  
      loadMapHandler(lat,lang) {
  
        console.log(lat,lang);  // console.log('is giving map co-ordinates');
  
       // create a new map by passing HTMLElement
       let element: HTMLElement = document.getElementById('map');
  
       let map: GoogleMap = this.googleMaps.create(element);
  
       let ionic: LatLng = new LatLng(lat,lang);  
  
       // create CameraPosition 
       let position: any = {
         target: LatLng,    
         zoom: 18,
         tilt: 30
       };
  
       map.one(GoogleMapsEvent.MAP_READY).then(() =&gt; {
           console.log('Map is ready!');
           // Now you can add elements to the map like the marker
            map.moveCamera(position);
  
           // create new marker
          let markerOptions:any = {
              position: LatLng,
              title: 'Ionic'
          };
  
          const marker:any = map.addMarker(markerOptions)
              .then((marker: Marker) =&gt; {
                  marker.showInfoWindow();
              });
          });
  
      }
  </code></pre>
  
  <p>Thanks in Advance!!!</p>