Disable the Maximize Window option in the AGOL mapviewer pop up

3031
3
Jump to solution
02-26-2016 06:37 AM
BugPie
by
Occasional Contributor III

We are using the standard Web Map viewer within ArcGIS Online to create and publish a web map that will be used in a website. Once the map has been created I am using the "share" option within the viewer to share with Everyone and then click the embed in website button to get the HTML string to give to the web developer in order to include the iframe map in the website.

One of the issues we have is that once a pop up has been opened there is a "maximize"  button/icon next to the close "X" button on the top right of the pop up. When I click this maximize button, the pop up window maximizes, but the content within stays the same size. So it's just adds extra "white space" to our pop up. Is there a way to make our content dynamically fill out the maximized pop up window or can we disable to maximize option in the pop up window all together? this maximize option It's not working for us as is, pretty much useless, I'm guessing there is a fix somewhere out there?!

0 Kudos
1 Solution

Accepted Solutions
SteveCole
Frequent Contributor

Upon further review, my answer *is* correct but only under certain limited situations. It will only work if you have "direct access" (or ownership) of the source files you're attempting to modify. You don't have that direct access if you're IFraming an AGOL map. This is one of those examples of browser restrictions to prevent malicious actions.

Link

Unless someone from ESRI chimes in, I don't think you'll be able to modify this.

View solution in original post

3 Replies
SteveCole
Frequent Contributor

Since you mention that you're embedding the map into other pages, it may be possible to remove the maximize button using CSS. I work with the Javascript API and adding the following to my CSS stylesheets will remove the maximize button from popups:

.esriPopup .titleButton.maximize { 
    display: none !important;
}

Then again, Iframes are literally a browser within a browser so you may have to add this CSS style rule using javascript on the fly. I wish ESRI would give us the ability to disable/enable this buttton on our own..

Steve

BugPie
by
Occasional Contributor III

Thanks for your response Steve. I think you might be correct in that you can't disable this on our own, within the AGOL environment.  I can't find anything that shows this option. At the very least, i wish it would just WORK if it's going to be there. I have yet to find an example where it works and the content expands with the window. I don't get it.

You will have to excuse my lack of knowledge on this, but how to you access the CSS for the embed map option? One of the limitations we are running into using this platform is that it seems our web developer is not able to adjust the CSS for the iframe code we provide using the "Embed Map" option. If there was a way they could access the CSS to 1)turn that button off 2) use custom fonts within the pop-ups. It would solve my problems for the most part.  

Is this something I can tell/help them figure out?

Cheers

0 Kudos
SteveCole
Frequent Contributor

Upon further review, my answer *is* correct but only under certain limited situations. It will only work if you have "direct access" (or ownership) of the source files you're attempting to modify. You don't have that direct access if you're IFraming an AGOL map. This is one of those examples of browser restrictions to prevent malicious actions.

Link

Unless someone from ESRI chimes in, I don't think you'll be able to modify this.