In webapp (developer) in mobiel mode PopupMobile opens but minimized.
I want the PopupMobile opens and maximize automatically.
API does not provide a methode to maximize, only to :
Do you have an idea to do this?
Thanks,
Flavie
Solved! Go to Solution.
Flavie,
Sure in the MapManager.js find the resetInfoWindow function and have the following changes (lines 15 - 22):
resetInfoWindow: function(isNewMap) {
if(isNewMap){
this._mapInfoWindow = this.map.infoWindow;
if(this._mapMobileInfoWindow){
this._mapMobileInfoWindow.destroy();
}
this._mapMobileInfoWindow =
new PopupMobile(null, html.create("div", null, null, this.map.root));
this.isMobileInfoWindow = false;
}
if (window.appInfo.isRunInMobile && !this.isMobileInfoWindow) {
this.map.infoWindow.hide();
this.map.setInfoWindow(this._mapMobileInfoWindow);
this.isMobileInfoWindow = true;
this._mapMobileInfoWindow.on("show", lang.hitch(this, function(){
require(['dojo/query'], function(query) {
//Maximize popup
html.setStyle(query(".esriPopupMobile")[0], "display", "none");
html.setStyle(query(".esriMobileNavigationBar")[0], "display", "block");
html.setStyle(query(".esriMobileInfoView.esriMobilePopupInfoView")[0], "display", "block");
});
}));
Flavie,
Sure in the MapManager.js find the resetInfoWindow function and have the following changes (lines 15 - 22):
resetInfoWindow: function(isNewMap) {
if(isNewMap){
this._mapInfoWindow = this.map.infoWindow;
if(this._mapMobileInfoWindow){
this._mapMobileInfoWindow.destroy();
}
this._mapMobileInfoWindow =
new PopupMobile(null, html.create("div", null, null, this.map.root));
this.isMobileInfoWindow = false;
}
if (window.appInfo.isRunInMobile && !this.isMobileInfoWindow) {
this.map.infoWindow.hide();
this.map.setInfoWindow(this._mapMobileInfoWindow);
this.isMobileInfoWindow = true;
this._mapMobileInfoWindow.on("show", lang.hitch(this, function(){
require(['dojo/query'], function(query) {
//Maximize popup
html.setStyle(query(".esriPopupMobile")[0], "display", "none");
html.setStyle(query(".esriMobileNavigationBar")[0], "display", "block");
html.setStyle(query(".esriMobileInfoView.esriMobilePopupInfoView")[0], "display", "block");
});
}));
Great!
But just a little problem with minimize button. After clicking on this button, PopupMobile never appears.
For my needs I can hide this button, so no worries.
.esriMobileNavigationBar .esriMobileNavigationItem.right {
display: none !important;
}
Thank you Robert!