Skip to content

Ionic Side Menu with the plugin

assemmarwan edited this page Mar 19, 2016 · 2 revisions

When using a Ionic's <ion-side-menus>, the map will be overlayed by the side menu as shown below.

Overlayed side menu

The Solution:

To overcome this, the <ion-side-menus> visibility should be set to "hidden".

First of all, in the controller of the side-menu, add the following:

$rootScope.side_menu = document.getElementsByTagName("ion-side-menu")[0];

 $rootScope.$on('$stateChangeSuccess', function (event, toState, toParams, fromParams, toParams) {
    if (toState.name != <MAPS_STATENAME>) {
        $rootScope.side_menu.style.visibility = "visible";
    }
});

Then, add this line in the map's controller:

$rootScope.side_menu.style.visibility = "hidden";

ENJOY!

Join the official community

New versions will be announced through the official community. Stay tune!

Do you have a question or feature request?

Feel free to ask me on the issues tracker.

Or on the official community is also welcome!


New version 2.0-beta2 is available.

The cordova-googlemaps-plugin v2.0 has more faster, more features.

https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/tree/master/v2.0.0/README.md

Clone this wiki locally