Configuring Popups in AGOL using the customized attribute display content question

3133
9
Jump to solution
07-17-2015 10:31 AM
GeraldLee_
New Contributor III

I have configured PopUps in AGOL using the customized Attribute display Content option, but when i view them inside my WAB Application, they appear smaller in overall size and text wrap & do not justify correctly. Has anyone else experienced this problem and know any fixes or is it just the usual Operator Error issues? Is it possible to change the overall popup dimensions to correct this, using WEB Developer Edition after the initial popup creation using AGOL?

Thanks- Gerald

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Esteemed Contributor

Gerald,

  Sure you can change the default size of the popup info window because you are using WAB Dev. Open the MapManager.js and fine these line around line # 255:

          // set default size of infoWindow.
          map.infoWindow.resize(270, 316);

View solution in original post

9 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Gerald,

  Sure you can change the default size of the popup info window because you are using WAB Dev. Open the MapManager.js and fine these line around line # 255:

          // set default size of infoWindow.
          map.infoWindow.resize(270, 316);
GeraldLee_
New Contributor III

Beautiful. Thanks Robert. That did the trick.

Thank you again, for all your contributions to the Community

Gerald

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Gerald,

   Glad to help. If you don't mind though can you click the "Correct Answer" button on my reply that answered your question. Right now you have clicked your own reply back to me as the "Correct Answer".

0 Kudos
GeraldLee_
New Contributor III

Thanks Robert,

Sure thing.Sorry about that.

( i dont ask that many questions because usually you have already answered them for someone else..:)

0 Kudos
DavidColey
Frequent Contributor

Robert - can you direct me as to which MapManager.js file should be modified?  I too need to get at my popups for various config changes and I see that I can access MapManager from the

\\client\stemapp\jimu.js folder

or from the

\\server\apps\3\jimu.js folder?

Thanks-

David

0 Kudos
NathanielRoth
New Contributor III

I believe that the version you want to be editing is the version that you get if you select the option to download your WAB App (as a zip file) from the developer.

Once that's done, its in jimu.js/MapManager.js

Others may have differing opinions, but I'd be cautious about editing files that are still connected to the WAB directly. That said, the latter of your links is the one that is associated with one of the Apps you've created in WAB.

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

David,

   if you want the changes you make to apply to all future apps then modify the one in the StemApp if not just do the one in the server app folder.

DavidColey
Frequent Contributor

Thanks Robert - One more quick question.  We deal with alot of poorly formatted attributes and so in nearly all of my jsapi apps I've got various formatting functions set up e.g if I want to return acreage out of my shape_area field, I'll apply a convertSQft function like:

convertSqFt = function(evt) {
     if (!isNaN(parseFloat(evt))) {

       } else {
            if (evt.charAt(0) == "<") {
            var acVal =  evt.substring((evt.indexOf(">") + 1),evt.lastIndexOf("<"));
            evt = acVal; 
             }
       }
       var acreage = evt * 0.000023;
       return number.format(acreage, {
            places : 2
       });
     };

and pass that into my popop template descrioption option value:

var plyParcels = new PopupTemplate({
     title : "GIS Parcel Info",
     description : "<b>Account Number:</b> {ACCOUNT}" + "<br><b>Acreage:</b> {Shape_Area:convertSqFt}" +
       "<br><b><a target='_blank' href=http://www.sc-pa.com/testsearch/parcel/{ACCOUNT}>Account Details</a></b>"
 });

if you wanted to make these kind of changes, what module or modules would you attempt to apply this kind of formatting?

Thanks-

David

0 Kudos
DavidColey
Frequent Contributor

Hmm, doesn't really look like I can.  I did some initial searching in \\server\apps\3\jimu.js\dijit\Popup.js and PopupConfig.js files and I would say that all formatting is coming in on the fly via esriRequest and url params . . .

thanks

0 Kudos