我正在开发一个Ionic应用程序,我正在使用侧边菜单。导航到模板时,该模板只是用于渲染Google Maps的div(使用cordova-plugin-maps本地)。侧边菜单覆盖在地图上。奇怪的是我可以通过侧边菜单与地图互动。
使用Javascript Google地图时效果很好。
以下是它的外观截图:
同样的东西出现在Android设备上。
非常感谢帮助解决!!
修改 我忘了提到我正在从正常页面(而不是侧面菜单)转换,因此上面的后退按钮。我希望这更具体。
答案 0 :(得分:5)
这对我有用: 1.将ng-hide放到
<ion-side-menu side="left" data-ng-hide="hideLeft">
// hack sidemenu overlay
$scope.$watch(function () {
return $ionicSideMenuDelegate.getOpenRatio();
}, function (newValue, oldValue) {
if (newValue == 0) {
$scope.hideLeft = true;
} else {
$scope.hideLeft = false;
}
});
答案 1 :(得分:2)
scss ionic.app.scss或www / csss /
body.menu-open .menu.menu-left {
visibility: visible;
}
.menu.menu-left {
visibility: hidden;
}
答案 2 :(得分:1)
你实际上可以这样设置:
地图
<ion-item nav-clear menu-close ng-click="fuction to call the map page">
或
<ion-item nav-clear menu-close ui-sref="url to page">
*当您点击菜单中的地图时,侧边菜单关闭,页面显示。
答案 3 :(得分:1)
就个人而言,我找到了一个优雅的解决方案(右侧菜单):
var get = prompt("Enter what you would like to encode!","At the current time decoding is still a WIP").toLowerCase();
var ina = [...get];
for(i = 0; i < get.length; i++) {
var code = get.charCodeAt(i);
if (97 <= code && code <= 122) { // 'a' and 'z' ordinal values
// Invert lowercase letters with simple math and convert back to character
ina[i] = String.fromCharCode((122 + 97) - code);
}
// No need to handle non-lowercase/non-ASCII since ina initialized to match get
}
答案 4 :(得分:1)
您需要在标记The following error occurred while trying to add or remove files in the installation directory:
[Errno 13] Permission denied: 'C:\\Program Files\\Anaconda3\\Lib\\site-packages\\test-easy-install-4760.write-test'The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was: C:\Program Files\Anaconda3\Lib\site-packages\
ion-menu
答案 5 :(得分:0)
因为cordova-google-maps插件的地图遵循mapDiv位置。
离子框架在地图div下创建侧边菜单。
您应该在地图div上方创建侧边菜单。
点击这里。 https://forum.ionicframework.com/t/using-google-maps-cordova-plugin/4456/49
答案 6 :(得分:0)
我发现它最终!!
转换到地图时,您必须隐藏<ion-side-menu>
。例如(我做了什么):
document.getElementById("side-menu").style.visibility = 'hidden';
当转移离开地图时,在$ stateChangeSuccess回调中,将其设置回"visible"
希望这有帮助!