Modify Identify Widget

284
12
Jump to solution
06-11-2018 07:10 AM
Highlighted
Occasional Contributor

Hello Robert,

I am not sure if this is the right place to ask you questions. I would like to ask you the question directly. I really like your identify widget (Identify Widget Version 2.7 - 02/23/2018 )..I have a question in using the widget.

In the configuration, i use cyan color for polygon boundary and hollow for polygon fill. When identify a feature,  I choose all layers to be identified, I highlight the tax parcel in the identify result panel, the map is zoomed to my parcel with parcel is highlighted. Since I select identify all layers, the zoning polygon is highlighted. The highlighted zoning polygon and taxparcel polygon is mixed together, which is kind of misleading (see attached screen shot. What kind of customization can I do to highlight only the taxparcel feature when taxparcel is selected in the identify window? I would like to have "All Layers" identified. I am about the do the customization, since it is developed by you, can you give me a direction? Thanks so much.

Helen

Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
MVP Esteemed Contributor

Helen,

   OK that makes a lot more sense. Here is the code change for that:

      showInfoWin: function (idResult) {
        array.map(this.graphicsLayer.graphics, lang.hitch(this, function(gra){
          gra.hide();
        }));
        idResult.graphic.show();
        // if (this.map.infoWindow) {
        //   idResult.graphic.setInfoTemplate(this._configurePopupTemplate(idResult));
        //   this.map.infoWindow.setFeatures([idResult.graphic]);
        //   if (this.map.infoWindow.reposition) {
        //     this.map.infoWindow.reposition();
        //   }
        //   this.map.infoWindow.show(idResult.centerpoint);
        // }
      },

View solution in original post

12 Replies
Highlighted
MVP Esteemed Contributor

Helen,

   When I hover over a identify result the the infowindow appears and the polygon is highlighted where it is different from the other overlapping polygon. Do you have the widget configured to not show the info window?

Reply
0 Kudos
Highlighted
Occasional Contributor

Hi Robert,

Users don't want the pop up window shows up, so I comment out the following section in the widget.js file. I am checking to see if the code can be customized so that only the tax parcel feature is highlighted when the taxparcel is selected in the identified panel -no other overlapping features are highlighted. Thanks

Helen

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

Helen,

  OK. That is a pretty strange request. You want Identify all put if the taxparcel layer is found then throw away all other results and just show tax parcel results?.. If that is the case then why not just select TaxParcel from the identify layers dropdown?

Reply
0 Kudos
Highlighted
Occasional Contributor

Sorry, Robert. I may have given you confused information. The reason we want identify all features is - our layers are added dynamically so we can't per-configure almost 100 layers. The request is when all layers are identified, identified results are loaded in the identify information panel(current design is good with us for this part). Only the feature is highlighted when that feature's identify result is selected. That is to say, when taxparcel is selected in the identified list panel, all graphices are cleared except the one for the identified taxparcel feature. Same to zoning - When zoning feature is selected in the identified result panel, only the identified zoning feature is highlighted. In that way, the overlapping feature will not give users misleading vision in the map. Do you have any direction that where i can start working on the customization?

Thanks

Helen

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

Helen,

   OK that makes a lot more sense. Here is the code change for that:

      showInfoWin: function (idResult) {
        array.map(this.graphicsLayer.graphics, lang.hitch(this, function(gra){
          gra.hide();
        }));
        idResult.graphic.show();
        // if (this.map.infoWindow) {
        //   idResult.graphic.setInfoTemplate(this._configurePopupTemplate(idResult));
        //   this.map.infoWindow.setFeatures([idResult.graphic]);
        //   if (this.map.infoWindow.reposition) {
        //     this.map.infoWindow.reposition();
        //   }
        //   this.map.infoWindow.show(idResult.centerpoint);
        // }
      },

View solution in original post

Highlighted
Occasional Contributor

Thanks Robert. Yes, it works!!

Reply
0 Kudos
Highlighted
New Contributor III

Robert,

Would it possible to make this same change to your Enhanced Search widget results?

Thanks,

Jeremy

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

Jeremy,

  That is a pretty confusing request as the eSearch is only searching one layer and there are not multiple layers highlighted as in the Identify widgets case...

Reply
0 Kudos
Highlighted
New Contributor III

Sorry I should have been more clear, and you're correct this is a bit different than the original request.

When multiple features are returned for the searched layer I was curious if there was a way to "highlight" only the feature that you hover over in the results pane. I am using the Popup Panel widget in my app and not the default popup, so when a user hovers over a feature in the results pane they do not know which feature on the map they are hovering over. Since they can simply click on the result and zoom into the feature this is not a major need, just curious if it might be possible. Thanks

Reply
0 Kudos