Select to view content in your preferred language

Pop-ups and layer visibility:  Map Gallery vs ArcGIS.com viewer

796
6
Jump to solution
01-09-2012 07:24 AM
MarcWeinshenker1
Regular Contributor
I'm seeing a pop-up behavior discrepancy that I swore was not there even yesterday.  I have a map with two map services (layers) configured for pop-ups. 

Here is the Map Gallery version of the map http://maps.rockvillemd.gov/gallery/map.html?webmap=a3e9b5d81c844a5181fa8eaf69b870c3

Here is the the ArcGIS.com viewer equivalent http://www.arcgis.com/home/webmap/viewer.html?webmap=a3e9b5d81c844a5181fa8eaf69b870c3

Problem 1: In the ArcGIS.com viewer version of the map, the pop-ups appear only for the layers checked on for visibility. If both are checked on I get multiple pages where features overlap.  This is the preferred behavior.  In the Map Gallery (v1.4) version of the map, however, pop-ups appear for both layers even if one or both are checked off for visibility.  Is this a bug or have I messed something up?

Problem 2: As a default condition I would like to have one of the layers (Zoning Overlays) configured to be checked off for visibility but allow the user to turn it on as optional data to view.  Again, this works fine in the ArcGIS.com viewer where the user can turn on the layer and then get the respective pop-up when they click over the feature on the map.  This is the preferred behavior.  In the Map Gallery version, however, checking on the Zoning Overlays layer (which was off by default) will display the layer on the map but its pop-ups never show up.  Is this a bug or have I messed something up??

For now, to address these problems in the Map Gallery map, I have had to turn on the optional layer visibility as a default and see all pop-ups regardless of which layers are visible.  This is not good.  So, are there bugs in the Map Gallery mapping or is there something I'm doing incorrectly?

Thanks.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Esriwebmap
Occasional Contributor
Thanks very much for looking into this.  I'm looking forward to a fix.


Hi Marc,

Can you try updating the arcgis api to version 2.6? Just do a search in each HTML file for 2.5 and replace it with 2.6. It should be in a few places in the head of each HTMl file. (a couple CSS files and a JS file).

<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.6/js/dojo/dijit/themes/tundra/tundra.css"> <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.6/js/esri/dijit/css/Popup.css"> <link rel="stylesheet" type="text/css" href="styles/popup.css"> <!-- END STYLES --> <!-- JAVASCRIPT --> <script type="text/javascript" src="scripts/plugins/modernizr.min.js"></script> <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.14/jquery-ui.min.js"></script> <script type="text/javascript" src="scripts/plugins/jquery.ui.touch-punch.min.js"></script> <script type="text/javascript" src="scripts/plugins/jquery.cookie.js"></script> <script type="text/javascript">djConfig = { parseOnLoad:true };</script> <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.6"></script>


I think that will fix the issue. Let me know if that works.

Thanks!

View solution in original post

0 Kudos
6 Replies
MikeMinami
Esri Notable Contributor
This appears to be a bug with the Map Gallery. I can reproduce the behavior you describe. It seems like the application only considers the initial drawing state of the visible layers to determine which popups will display. Altering the visibility by checking the boxes doesn't seem to have any impact.

We'll have to take a look at this.

Thanks,

Mike
0 Kudos
Esriwebmap
Occasional Contributor
Yes, this is a bug. The layer toggle for the Public Maps Gallery only toggles the visibility of the layer.

I'll need to see what I have to do to have it toggle the info windows as well as the visibility.

It may be something easy, maybe not 🙂 I'll look into it.
0 Kudos
MarcWeinshenker1
Regular Contributor
Thanks very much for looking into this.  I'm looking forward to a fix.
0 Kudos
Esriwebmap
Occasional Contributor
Thanks very much for looking into this.  I'm looking forward to a fix.


Hi Marc,

Can you try updating the arcgis api to version 2.6? Just do a search in each HTML file for 2.5 and replace it with 2.6. It should be in a few places in the head of each HTMl file. (a couple CSS files and a JS file).

<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.6/js/dojo/dijit/themes/tundra/tundra.css"> <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.6/js/esri/dijit/css/Popup.css"> <link rel="stylesheet" type="text/css" href="styles/popup.css"> <!-- END STYLES --> <!-- JAVASCRIPT --> <script type="text/javascript" src="scripts/plugins/modernizr.min.js"></script> <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.14/jquery-ui.min.js"></script> <script type="text/javascript" src="scripts/plugins/jquery.ui.touch-punch.min.js"></script> <script type="text/javascript" src="scripts/plugins/jquery.cookie.js"></script> <script type="text/javascript">djConfig = { parseOnLoad:true };</script> <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.6"></script>


I think that will fix the issue. Let me know if that works.

Thanks!
0 Kudos
MarcWeinshenker1
Regular Contributor
Yes!  That fixed it.  I only found "2.5" in two files, though  -- map.html and embed.html

Marc
0 Kudos
Esriwebmap
Occasional Contributor
Yes!  That fixed it.  I only found "2.5" in two files, though  -- map.html and embed.html

Marc


Yep, that's it. I just meant there were two JS files and one CSS file that use the "2.5" reference to the API version.

Glad it's working.
0 Kudos