Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ionic Sidemenu and Native Google Maps

I am developing an Ionic application where I'm using the side-menu. When navigating to a template that's only a div for rendering Google Maps (native using cordova-plugin-maps). The side-menu is overlayed over the map. The weird thing is I can interact with the map through the side-menu.

It works fine when using Javascript Google Maps.

Here's a screenshot of how it looks:

enter image description here

The same thing appears on an Android device.

The help in resolving is highly appreciated!!

EDIT: I forgot to mention that I'm transitioning from a normal page (not the side-menu), hence the back button above. I hope that makes it more specific.

like image 951
coding4fun Avatar asked Mar 18 '16 23:03

coding4fun


People also ask

How do I add Google Maps to ionic?

In order to use the Google Maps SDK, you'll need to create a Google Cloud account and create your project. Within your project, you should enable the Android, iOS, and JavaScript Maps SDKs. Once you've enabled the SDKs, you can create an API Key to include in your project.

How do you integrate a map?

Google Map Integration Related Configuration :Create one project and name as per your choice. Enable Google Map SDK for Android & iOS Platforms in Google Developers Console. You will get Google Map API Key through Credential Page. Select your project and then click on Create Credentials button and choose the API key.


2 Answers

This works for me: 1. Place ng-hide to

<ion-side-menu side="left" data-ng-hide="hideLeft">
  1. watch the $ionicSideMenuDelegate in menu controller

// hack sidemenu overlay $scope.$watch(function () { return $ionicSideMenuDelegate.getOpenRatio(); }, function (newValue, oldValue) { if (newValue == 0) { $scope.hideLeft = true; } else { $scope.hideLeft = false; } });

like image 108
Peter.Wang Avatar answered Sep 27 '22 23:09

Peter.Wang


scss ionic.app.scss or www/csss/

body.menu-open .menu.menu-left {
    visibility: visible;
}
.menu.menu-left {
    visibility: hidden;
}
like image 40
Thiago Bezerra Avatar answered Sep 27 '22 23:09

Thiago Bezerra