Robert,
one more behavior I am curious about.
if it leave a layer unchecked and publish it as a service and then add the services to a agol webmap and use that webmap in the webappbuilder I can turn the layer on so it is visible but I cannot use the mouse and click on a feature and get a popup. all the layers that are published with the visibility on will show popups.
I have enabled popups in the webmap and configured them.
any ideas why?
Glenn,
I believe that issue is a bug that needs to be reported.
Try this work around:
MapManager.js:
Add line 4 and a comma to the end of line 3.
var webMapOptions = {
mapOptions: mapOptions,
bingMapsKey: appConfig.bingMapsKey,
usePopupManager: true
};
This change will not affect existing apps so create a new one to test.
Right now this work around only works for the developer version. You can not access the MapManager.js file for the AGOL web app builder.
When you use the usePopupManager: true it breaks other popups for the map like the measure and draw tools. What happens is when you want to measure something the map will measure but it still thinks that the identify tool is active and identifies things and the popup gets in the way. Here is another chunk of code to add to those widgets to fix that issue. So far it works for me, but not 100% sure it is the best fix.
For the measurement widget I opened \widgets\Measurement\Widget.js and commented out two lines and added two new ones right around line 69.
aspect.after(this.measurement, 'setTool', lang.hitch(this, function() { if (this.measurement.activeTool) { //this.disableWebMapPopup(); this.map.setInfoWindowOnClick(false); //added this } else { //this.enableWebMapPopup(); this.map.setInfoWindowOnClick(true); //added this } }));
It looks like you need to add these lines of code to other widgets that need map clicks like draw.
also see Identify Features
OK I did some more digging and found the place to fix the draw widget.
\jimu.js\dijit\DrawBox.js
around line 165
Comment out this.enableWebMapPopup(); and add in this.map.setInfoWindowOnClick(true);
deactivate:function(){ //this.enableWebMapPopup(); this.map.setInfoWindowOnClick(true); //Added this if(this.drawToolBar){ this.drawToolBar.deactivate(); } query('.draw-item',this.domNode).removeClass('selected'); },
around line 245
Comment out this.disableWebMapPopup(); and add in this.map.setInfoWindowOnClick(false);
_onItemClick:function(event){ var target = event.target||event.srcElement; var items = query('.draw-item',this.domNode); items.removeClass('selected'); html.addClass(target,'selected'); var geotype = target.getAttribute('data-geotype'); var commontype = target.getAttribute('data-commontype'); var tool = Draw[geotype]; //this.disableWebMapPopup(); this.map.setInfoWindowOnClick(false); // added this this.drawToolBar.activate(tool); this.onIconSelected(target,geotype,commontype); },
I have a question about the work flow for implementing this work around.
I have configured a web map application using Web App Builder 1.0 (Developer Edition). I am wondering if I understand the next work flow steps correctly.
Should I:
Thanks in advance for any help!
Marie,
This work around is for WAB Developer version hosted locally. I don't believe that you can get this workaround back to AGOL.
So it would only fix the popup problem on the specific computer hosting the web app builder developer edition?
Marie,
If you make the fix in WAB Dev version then all the apps that you build from that WAB Dev machine are going to contain the fix and those apps can be deployed to your own local web server.
I have the same issue and working with ESRI they could not replicate the problem with 10.3, however, my services worked in AGOL and WAB with popups on their side. I am still on 10.1 but I found adding my service from a shapefile and not a fgb or gdb allows the popups in both applications.