Attribute Inspector conflict other info windows

4596
5
Jump to solution
12-23-2014 11:32 AM
williamcarr
Occasional Contributor II

This is a continuation from a previous thread: Re: How do I resolve the conflict of info Windows on multiple widgets?

Kelly,

I have the fiddle set up here Edit fiddle - JSFiddle .  I have added a second layer to test for the multiple layers. This demonstrates the same problems I am having.

Thanks

0 Kudos
1 Solution

Accepted Solutions
KellyHutchins
Esri Frequent Contributor

William,

This link shows one approach for activating/deactivating the attribute inspector/popup:

Create a Map

In the example above popup clicks are disabled when the edit button is pressed and re-activated when the chart button is pressed.

However an easier approach might be to display the attribute content elsewhere - perhaps in a side panel or additional floating panel instead of displaying in the popup.

View solution in original post

0 Kudos
5 Replies
KellyHutchins
Esri Frequent Contributor

I have a few questions. You mentioned in the other thread that you have several layers (5 I think) some of which don't require the popup. So it sounds like you want users to be able to click on the features for one particular layer and get the attribute inspector, then click on some other layer and get the popup info and then for the rest no popup at all? Is that correct?

Answers to the above questions may mean there's a different (simpler) way to do this but perhaps this modified version of your fiddle will help:

Create a Map

0 Kudos
williamcarr
Occasional Contributor II

Correct, some of the layers should open with the attribute inspector, some with the infoWindow for charts, and a few will just be for visible reference. One of the layers will need to have the option for both, hence the toggle, but I noticed in one of my many permutations of getting this to work yielded a attribute inspector(wanted) then a next button that would switch to the infoWindow chart(also wanted) this would be the best case scenario for the end user but it only happend when there was a single layer with the:

function initSelectToolbar(layer) {

         var petroFieldsFL = layer;

inserted, rather than the (well, a working variation of)

       function initSelectToolbar(evt) {

          var asdf = evt.layers[0].layer;

Any attempts to toggle between the two, that I know of, required calling the initSelectToolbar(rather than on layer add). Trying to pass the (evt) throws an error as undefined any way I engage it.

0 Kudos
KellyHutchins
Esri Frequent Contributor

William,

This link shows one approach for activating/deactivating the attribute inspector/popup:

Create a Map

In the example above popup clicks are disabled when the edit button is pressed and re-activated when the chart button is pressed.

However an easier approach might be to display the attribute content elsewhere - perhaps in a side panel or additional floating panel instead of displaying in the popup.

0 Kudos
williamcarr
Occasional Contributor II

Fantastic! This is an excellent solution to a few of my problems.

Many thanks!

0 Kudos
williamcarr
Occasional Contributor II

I put this project down for a couple weeks and now realize that when I try to use your example with my secure layers I am getting:

Error: Unable to complete operation.

Stack trace:

w/h.load@http://js.arcgis.com/3.12/:885:426

.cache["dojo/_base/xhr"]/</b._ioSetArgs/<@http://js.arcgis.com/3.12/:191:67

c@http://js.arcgis.com/3.12/:76:221

d@http://js.arcgis.com/3.12/:76:10..................

in the console window and the attribute inspector won't show up.. The infowindow with the chart will pop up, but not the attribute inspector.

I am a bit perplexed as to why the sample layers work, but not mine?

0 Kudos