-
Notifications
You must be signed in to change notification settings - Fork 917
Ionic Side Menu with the plugin
When using a Ionic's <ion-side-menus>
, the map will be overlayed by the side menu as shown below.
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!
If you get an error, feel free to ask me on the official community or the issue list.
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
New versions will be announced through the official community. Stay tune!
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