# Google maps integration, V2

**URL:** <https://forum.ionicframework.com/t/google-maps-integration-v2/55307>\
**Category:** ionic-v1\
**Created:** [June 20, 2016, 5:25pm UTC](https://forum.ionicframework.com/t/google-maps-integration-v2/55307 "2016-06-20T17:25:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pwrreques](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/pwrreques/32/74240_2.png) [@pwrreques](https://forum.ionicframework.com/u/pwrreques)\
**Post date:** [June 20, 2016, 5:25pm UTC](https://forum.ionicframework.com/t/google-maps-integration-v2/55307/1 "2016-06-20T17:25:36Z")

</div>

I’m using mapsplugin/cordova-plugin-googlemaps and my problem is that de map when the app start the map appear like transparent or white but the map is loaded cuz when i scroll the “lat” and “lng” on camera\_change function they show me different cords, and also the map how up when i switch tabs, i m using tab template.

CAN SOME ONE tell me about it?

**CONTROLLER HERE:**

.controller(‘DashCtrl’, function($scope, Parking) {

document.addEventListener(“deviceready”, function() {

```
var mapDiv = document.getElementById("map_canvas");

var DR = new plugin.google.maps.LatLng( 18.468860,-69.904866 );

$scope.map = plugin.google.maps.Map.getMap( mapDiv, {
  'controls': {
    'compass': true,
    'myLocationButton': true,
    'zoom': true,
  },
  'camera': {
    'zoom': 17
  }
});

```

var locatonList = Parking.all();

```
$scope.map.addEventListener(plugin.google.maps.event.MAP_READY, function() {
      $scope.map.setCenter( DR );
});

```

})

---

<div class="post-metadata">

**Author:** ![rgecy](https://avatars.discourse-cdn.com/v4/letter/r/ac8455/32.png) [@rgecy](https://forum.ionicframework.com/u/rgecy)\
**Post date:** [June 20, 2016, 8:17pm UTC](https://forum.ionicframework.com/t/google-maps-integration-v2/55307/2 "2016-06-20T20:17:19Z")

</div>

The google maps plugin is a native view that actually sits behind your HTML so the containing div must be transparent. Can we see your HTML and CSS. That may help.

---

<div class="post-metadata">

**Author:** ![pwrreques](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/pwrreques/32/74240_2.png) [@pwrreques](https://forum.ionicframework.com/u/pwrreques)\
**Post date:** [June 21, 2016, 6:45pm UTC](https://forum.ionicframework.com/t/google-maps-integration-v2/55307/4 "2016-06-21T18:45:24Z")

</div>

.scroll,  
.scroll-content \> .scroll {  
width: 100%;  
height: 100%;  
}  
#map\_canvas {  
width: 100%;  
height: 100%;  
position: relative;  
}

 ![image](https://global.discourse-cdn.com/ionicframework/original/3X/7/f/7fc069c0a7e1cfebb9ab8fdd76cd232c5c226b18.png)

---

<div class="post-metadata">

**Author:** ![pwrreques](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/pwrreques/32/74240_2.png) [@pwrreques](https://forum.ionicframework.com/u/pwrreques)\
**Post date:** [June 23, 2016, 3:41am UTC](https://forum.ionicframework.com/t/google-maps-integration-v2/55307/5 "2016-06-23T03:41:20Z")

</div>

fixe it, Thanks for your help  
if( $rootScope.map ) {  
$rootScope.map.clear();  
$rootScope.map.remove();  
//$(’#map\_canvas’).remove();  
$(’.map\_canvas:not(:last)’).remove();  
$rootScope.map = ‘’;  
}

setTimeout(function(){

```
var mapDiv = document.getElementById("map_canvas");

var DR = new plugin.google.maps.LatLng( 18.468860,-69.904866 );

$rootScope.map = plugin.google.maps.Map.getMap( mapDiv, {
  'controls': {
    'compass': true,
    'zoom': true,
  },
  'camera': {
    'zoom': 17
  }
});

```

bla bla bla…
