Enhanced Search Widget Version 2.23.1 - 11/22/22

518529
2820
07-14-2014 03:57 PM
Labels (1)

Enhanced Search Widget Version 2.23.1 - 11/22/22

Live Preview Site

Web AppBuilder for ArcGIS | Help - Enhanced Search widget

 

List of the latest enhancements and changes:

  1. Fixed issue with Spatial Relationship settings

Older enhancements or changes

Check the "Older enhancements or changes.txt" in the download for a complete list.

 

Older Versions

Last 2.21 version

Last 2.17 version

Last 2.13 version

Last 2.12 version

Last 2.11 version

Last 2.9 version

Last 2.7 version

Last 2.6 version

Last 2.5 version

Labels (1)
Attachments
Comments

sorry check that meant to say at 10.61 we used wab build 2.8 (enterprise and dev) with eSearch 2.7

Robert Scheitlin, GISP

I am having a difficult time configuring the eSearch widget (your 2.11) in Developer (my 2.12).  I see somebody posted a few months back that they did it without any problem though.  I am on AGS 10.6.1 as of last week.  Prior to the current efforts, I was on AGS 10.4.1, WAB 2.9 and eSearch 2.8.  I am only 'upgrading' now due to an issue with rendering at large scales in 10.6.1 and WAB 2.9 that appears to be corrected by 2.12.

I noticed that of your three default configurations only the Louisville Zoning is working when I pull eSearch into my app.  The other two show 'search failed!'.  I have tested six or seven configurations from my own services, across multiple services too, and have only been able to get one to work.  Normally when I upgrade WAB and eSearch I simply copy and paste the previous version's config into the new folder and that has pretty much always worked... until this time.

Are you aware of any issues pertaining to the versions I'm working with?  One of the services I'm trying to use in eSearch I also have configured in my ESRI Search widget and it works there, albeit slower than when we were on 10.4.1.

I see this console error when I try to execute a search (there are more js.arcgis lines below this):

Do you have any idea what might be going on? 

Robert Scheitlin, GISP

Sorry to reply to my own comment but I want to pass along that I was able to copy and paste the previous Identify config (from 2.9) into 2.12 and have everything work as it was configured.  Recall from my first post that I've done that in the past for eSearch and had things been ok, just not this time.  Also, a few of the REST endpoints being hit in the Identify widget are also being hit in the eSearch widget, but they're not working eSearch like they are in Identify.

Anonymous User

I can report I am using the current eSearch on WAB 2.12 for Server 10.5.1 and 10.6.1 and testing on 10.7.1.  All work great!

Thanks.  Do all three of Robert's default searches work when you add eSearch to a new app?  I'm most surprised by the fact that only one of three work on my end.

Which eSearch version Kevin? 2.11 with WAB 2.12?

Anonymous User

David yes 2.11.  Adam the Traffic Cams and Tax Sales work here on 2.12. Sometimes WAB gets off track if you do a lot of customization, and then leap forward a few versions. I would create a clean WAB 2.12 and eSearch, test it there, and see what happens, with the example services out of the box. Then if that works move on to test with your services. And then if all these are successful, proceed to port in your customizations, custom widgets, etc. Good luck!

Adam,

   So when you say AGS 10.6.1 are you saying your are working with Portal 10.6.1 or is that in reference to your ArcGIS Server being version 10.6.1?

ArcGIS Server = 10.6.1.  We have Portal 10.6.1 installed on another server but we're not running anything off it right now.  Everything is coming from AGO or AGS.

I installed WAB 2.12 on a laptop last Friday and in a test app there I am able to get all of your default searches to work.  Only one of them works in the version on my PC.  Weird.  My service I'm trying to use in eSearch won't work in WAB on my PC but it seems to be working on the laptop, and the same goes for another service I created this morning to test things further.  I am currently installing another instance of WAB 2.12 (in a different location) on my PC to see if I can replicate the problem there.

We've been having problems with the speed of the Search widget in our WAB 2.9 apps ever since we had the server updates two weeks ago.  Results used to populate within two seconds at worst and now we're waiting 10-15 seconds at times.  There were some changes (field length and type I believe) to our parcels layer that pre-dated the server updates but those same searches were running just fine before we went from 10.4.1 to 10.6.1, and the fields that were modified are not field I use for searching.  I have an open case with ESRI on that matter.  Note that I have overwritten and completely republished our services since we went to 10.6.1, hoping a fresh start on them would cure the issue(s) but to no avail.

I'm just trying to eliminate the source(s) of the problem and was curious if you had come across any similar issues.  Thanks.

Adam,

   Sorry I have not come across that issue. I know schema changes to the underlying map services can cause issues when the config.json is looking for a specific field name and type and that has changes in the underlying data.

Thanks.  I've done a little more testing of the Search and eSearch widgets in the 'new' version of 2.12 on my PC and haven't had any problems.  I even copied and pasted the eSearch config from my existing deployed app and it came in just fine.  Something apparently is just off with the other 2.12 I have on this PC or I've unintentionally made a subtle change to it that prevents eSearch from operating properly.  Thanks again.

2.11 that's what I thought thanks Kevin. 

Good day,

I am using latest version eLocate on WAB 2.8. Also installed in ArcGIS Portal 10.6. But when starting widget I getting errors. Could you please find out reason?

Create widget error: https://map.com/WAB_Widgets/eLocate/Widget


create [https://map.com/WAB_Widgets/eLocate/Widget] error:Error: dijit._WidgetsInTemplateMixin: parser returned unfilled promise (probably waiting for module auto-load), unsupported by _WidgetsInTemplateMixin. Must pre-load all supporting widgets before instantiation.
at Object._beforeFillContent (https://map.com/portal/jsapi/jsapi/init.js:2356:185)
at Object.buildRendering (https://map.com/portal/jsapi/jsapi/init.js:383:199)
at Object.f (https://map.com/portal/jsapi/jsapi/init.js:197:400)
at Object.buildRendering (https://map.com/portal/jsapi/jsapi/init.js:378:451)
at Object.create (https://map.com/portal/jsapi/jsapi/init.js:355:145)
at Object.postscript (https://map.com/portal/jsapi/jsapi/init.js:354:104)
at new <anonymous> (https://map.com/portal/jsapi/jsapi/init.js:200:129)
at Object.createWidget (https://map.com/portal/apps/webappbuilder/stemapp/jimu.js/main.js?wab_dv=2.6:185:401)
at Object.<anonymous> (https://map.com/portal/apps/webappbuilder/stemapp/jimu.js/main.js?wab_dv=2.6:180:506)
at https://map.com/portal/jsapi/jsapi/init.js:63:277
init.js:114 Error: dijit._WidgetsInTemplateMixin: parser returned unfilled promise (probably waiting for module auto-load), unsupported by _WidgetsInTemplateMixin. Must pre-load all supporting widgets before instantiation.
at Object._beforeFillContent (init.js:2356)
at Object.buildRendering (init.js:383)
at Object.f (init.js:197)
at Object.buildRendering (init.js:378)
at Object.create (init.js:355)
at Object.postscript (init.js:354)
at new <anonymous> (init.js:200)
at Object.createWidget (main.js?wab_dv=2.6:185)
at Object.<anonymous> (main.js?wab_dv=2.6:180)
at init.js:63 "Error: dijit._WidgetsInTemplateMixin: parser returned unfilled promise (probably waiting for module auto-load), unsupported by _WidgetsInTemplateMixin. Must pre-load all supporting widgets before instantiation.
at Object._beforeFillContent (https://map.com/portal/jsapi/jsapi/init.js:2356:185)
at Object.buildRendering (https://map.com/portal/jsapi/jsapi/init.js:383:199)
at Object.f (https://map.com/portal/jsapi/jsapi/init.js:197:400)
at Object.buildRendering (https://map.com/portal/jsapi/jsapi/init.js:378:451)
at Object.create (https://map.com/portal/jsapi/jsapi/init.js:355:145)
at Object.postscript (https://map.com/portal/jsapi/jsapi/init.js:354:104)
at new <anonymous> (https://map.com/portal/jsapi/jsapi/init.js:200:129)
at Object.createWidget (https://map.com/portal/apps/webappbuilder/stemapp/jimu.js/main.js?wab_dv=2.6:185:401)
at Object.<anonymous> (https://map.com/portal/apps/webappbuilder/stemapp/jimu.js/main.js?wab_dv=2.6:180:506)
at https://map.com/portal/jsapi/jsapi/init.js:63:277
----------------------------------------
rejected at a (https://map.com/portal/jsapi/jsapi/init.js:108:174)
at l (https://map.com/portal/jsapi/jsapi/init.js:107:450)
at t (https://map.com/portal/jsapi/jsapi/init.js:107:203)
at d.n.reject (https://map.com/portal/jsapi/jsapi/init.js:109:488)
at Object.<anonymous> (https://map.com/portal/apps/webappbuilder/stemapp/jimu.js/main.js?wab_dv=2.6:181:268)
at https://map.com/portal/jsapi/jsapi/init.js:63:277
at l (https://map.com/portal/jsapi/jsapi/init.js:107:277)
at t (https://map.com/portal/jsapi/jsapi/init.js:107:203)
at d.resolve (https://map.com/portal/jsapi/jsapi/init.js:109:280)
at Object.<anonymous> (https://map.com/portal/apps/webappbuilder/stemapp/jimu.js/main.js?wab_dv=2.6:182:471)
----------------------------------------
Error
at d.then.b.then (https://map.com/portal/jsapi/jsapi/init.js:110:97)
at Object.<anonymous> (https://map.com/portal/apps/webappbuilder/stemapp/jimu.js/main.js?wab_dv=2.6:1390:67)
at Object.forEach (https://map.com/portal/jsapi/jsapi/init.js:70:424)
at Object.loadAllWidgetsInOrder (https://map.com/portal/apps/webappbuilder/stemapp/jimu.js/main.js?wab_dv=2.6:1389:438)
at Object.startup (https://map.com/portal/apps/webappbuilder/stemapp/jimu.js/main.js?wab_dv=2.6:1389:258)
at Object.f (https://map.com/portal/jsapi/jsapi/init.js:197:400)
at Object.startup (https://map.com/portal/apps/webappbuilder/stemapp/themes/FoldableTheme/panels/FoldablePanel/Foldable...)
at Object.f (https://map.com/portal/jsapi/jsapi/init.js:197:400)
at Object.startup (https://map.com/portal/apps/webappbuilder/stemapp/themes/FoldableTheme/panels/FoldablePanel/Panel.js...)
at Object.openPanel (https://map.com/portal/apps/webappbuilder/stemapp/jimu.js/main.js?wab_dv=2.6:1373:112)"

t.openPanel (https://map.com/portal/apps/webappbuilder/stemapp/jimu.js/main.js?wab_dv=2.6:1373:112)" 

Kydyrov,

  First off there is a separate thread for the eLocate widget. Enhanced Locate Widget Version 2.9.0.1 - 11/5/2018 

This is the eSearch widget thread.

But to answer your question ArcGIS Portal 10.6 uses WAB 2.6 so you need to 2.5 version of eLocate widget (I did not make a 2.6 specific version).

Also in the eLocate thread you will find that some have had an issue with some missing files in Portal.

For anyone else that sees this comment, I had to copy ServiceBrowserRule.js and serverBrowserRuleUtils.js from "<WAB Dev Edition>\client\stemapp\jimu.js" to "C:\Program Files\ArcGIS\Portal\apps\webappbuilder\stemapp\jimu.js" and "..Portal\apps\webappviewer\jimu.js\" to get this widget to work in Portal 10.5.1.

Robert,

I'm implementing your v2.11 Search widget into my WAB v2.13 and I'm coming across a small issue with searching point layers (does not happen with polygons).  I have specified a pin as the symbology and the search results window is cutting the pins off in the list.  The white lines are cut in half and the gray lines seams to be overlapping into the white lines.  Then on the map there is two result boxes over one point.  I have attached an image for your reference.  My live site is built using WAB2.4 and v2.4 eSearch Widget and I don't experience either one of these issues.  Both the WABv2.13 and my live site I'm setting up the exact same way with the same service, I'm just getting to a newer version of WAB.

Lindsey,

  OK I see this issue and it is because you only have on field defined in the results. Hmm, basically I have not encountered this situation until now. So you definitely only want one attribute in your results? Currently if you define that field as the title then it will work ok.

But the full solution is to update a css rule in the css/style.css file (added line 6):

.search-list-item {
  line-height: 30px;
  font-size: 12px;
  white-space: pre;
  position: relative;
  min-height: 40px;
}

Robert that did the trick on the list.  But what about the double highlight box on the map?  If I close the popup one of the boxes automatically goes away.  It's like it is selecting the point for the popup and selecting the point again for the the entire list of search results and those two selections don't line up.  The polygons are the same way where it selects it for the selected item popup and for the entire list, only the polygons line up completely and you don't see any discrepancies. Here is an example of both with the popups after I selected an item out of the list and once I clicked the X in the popup window on both the polygons and points.

Lindsey,

   So I am not sure what is going on with the double highlight. Are you searching graphically or by value?

By value on both examples.

I played with settings some more.  In the search layer settings if I have "from Defaults" or "from Layer" I get the pushpin and two boxes around my points.  If I change the setting to "from Server"  I get NO pushpin and just one box.  Below are screenshots of how I am receiving the different results with the different settings.  I'm not getting the same results as the other day on polygon and it seems to working correctly.  I have no symbolgy set on this point layer as I just want the labels displayed on the map.  However, when searching I want it to place a pushpin to highlight the search.

Lindsey,

  OK now that makes sense. In the latest versions of eSearch I generate a cyan square around the point feature to symbolize that that particular result from the search results is selected. Then you have the popup highlighting the search result symbol (i.e. the push pin), resulting in a double box in your use case. Not sure how to resolve this right now as there was good reason to add the feature selection indicator so that you could see the selected result even if you had the search layer set to "Disable search result popup".

Lindsey,

  OK after some looking in the code you can fix your issue by commenting out one line in the eSearch widget.js. In the _selectResultItem function comment out

this.selectionGL.add(selGra);

That fixed it for me.  Thank you so much for the help!!!

Hello All,

I am trying to figure out how to show relationships, or related data using the esearch widget. I have a parcel feature class that has a join to a table containing tax data and I also have a relationship setup to a table containing permit data 1:M, all done in an mxd that is being published. I  can see the relationship in the service, have it enabled in AGOL to show in the webmap that is being consumed by my WAB 2.13 page with esearch 2.11. If I enable popups in the webmap I can select a feature in my WAB site, get the popup, and see the relationships at the bottom of the popup, and they show correctly when clicked on. I have setup esearch and have configured the relationship with the correct fields to show. It appears the only way to see these once a feature is selected in esearch is to have the esri table opening at startup, click/select the record in the esearch popup, then use the drop down on esearch to show relationships, they then show up in the table. I have esearch configured to load the selected data as an operational layer. Is there a way to get them to show directly from the popup without having to load the esri table to see them? I reviewed the live site to get an idea of how it might display if configured correctly but can't get any relates to show on the features there either.

Thanks for any guidance!

Norm,

   That is all that is available for relationships in the eSearch.

Robert,

Thanks as always! I'm trying to rebuild the look and feel of the flex esearch for users in WAB. We will need to adapt, and adopt a little bit of a workflow change. Keep up the great work, many of us rely on your tools and expert knowledge and skill!!

Norm,

   Was is different in the Flex eSearch? I don't recall.

Robert,

Let me take a closer look at the old flexviewer and get back to you. I think we were adding a relate to the attribute listing in the table on the fly. I'll know more in a few days and get back to you. I'm thinking that I might have to do the same and didn't get that far in the dev/config of esearch 2.11.

Norm:

What version of ArcGIS Enterprise (Server) are you working with?  If you are stuck with a quick deadline you can probably get the flexviewer to still work as a short-term solution until you get everything figured out with the WebAppBuilder version.  Again, only try to keep the flexviewer going if your deadline to get this working is too short for the longer term solution.

Hello Micheal,

We're actually still running the flexviewer on a single 10.7.1 server install and are just starting to port those functions over to WAB after our migration to 10.7.1 along with funding approval for the project. My deadline is soft, a month or two so I feel I'm in good shape to make things happen or be able to explain the functionality differences and come up with alternative workflows to accomplish the same results.  Thanks for your reply!! Everyone out on this forum is so willing to help when they can!

Anonymous User

As Rich Bell‌ mentioned in this thread back '17, I am also seeing duplicate Statistics. Although in Select.

And, actually Statistics is missing entirely from eSearch. I would like it there, as well, that would be great. I use eSearch for Parcels.  But I noticed it has an interaction with Select widget.

Select widget bug:

SAGIS Property Map Viewer 

I see two Statistics entries. The top one works. The bottom one, nothing happens when I click it.

Console says:

Cannot read property 'filter' of undefined
at Object.getNumbericFields (eShowStatistics.js?wab_dv=2.12:43)

It is also adding the second Zoom To.  How odd, in the first place, why would Select be adding pieces of eSearch?  

So, in my demo site it had WAB 2.12 / eSearch 2.9.

However I tried eSearch 2.11 and WAB 2.13 same issue.

So I decided to try building a fresh app with just Select.  Works fine...  only one Statistics.  As soon as I add a fresh copy of eSearch 2.11, same bug.  Duplicate Statistics and the console error.

ArcGIS Web Application   - just select.  Works fine.  I tested using the Schools layer (inside 'Map layers')  (draw a polygon with it, I just added Schools real quick to eSearch as a test)

ArcGIS Web Application  -  eSearch added... now the error happens. Thoughts?

I'd also still love to see Statistics in the main Parcel tool in my property viewer, not sure why it isn't showing in featureActions.

Kevin,

   Version 2.12 just released to address that issue.

Anonymous User

Hi Robert Scheitlin, GISP thank you so much, truly! Select's featureActions works perfect now.

Is 'Statistics' Supposed to show up in eSearch's featureActions menu?  While it's a junk number to show stats for, Schools in my test app  ArcGIS Web Application  has a ZIP code field. Statistics show up and now they work fine for the field in Select (2.12 removes the duplicate featureActions in Select) however there is no Statistics in eSearch's feature actions menu.  

Kevin,

   The search layer has to be configured as an operational layer for stats to work.

Anonymous User

Ah, very good! Yes that works nicely. My reasoning behind not checking this option off, was I noticed it does't remove it when the widget is closed.  I will look for the function in widget.js that removes the Operational layer, to add to onClose. That would be a cool option to add; 'hide layer on widget closing' which would turn the operational layer on/off.  Similar to how it works now with the temporary layer (without Operational checked) it hides, then re-adds when the user re-opens eSearch. (I looked and did not see anything like this unless I missed it!)  I am wondering, however, if I find the right function (looks like..  _clearLayers?).... will it add it back to the Layer List?  Because I liked how when Operation is not checked, first it hides, then it shows. If not, I will just wait to see if you maybe implement that in a future update. Not super important, just something that would be a neat addition.

Another thought that crossed my mind, is when I update datasets and add fields, the schema change necessitates additional eSearch configuration. I had an idea Robert.  What if there was an option to always at run-time, bring in and show all fields?  Or even to scale that out, perhaps even an 'all fields for all layers in eSearch' toggle; but at least a toggle per layer for "{*}" fields so to speak. Now this... would be super useful.

One last thought, I was wondering how to add a custom cursor when users activate a Drawing tool in the Graphical tab. I tried a few things and oddly couldn't get them to fire. I like to add custom cursors and icons for apps to spice things up. I was looking for the click handler that initiates the draw tool or even the handler on the actual buttons and tried a few things such as _onBtnGraSearchClicked but nothing fired, when placing an alert('test') test code line. Where would be the best place to stick a line to turn a custom map cursor on (and of course, to set the cursor back to 'default' after the draw is finished, because I have toggled your setting so it deactivates after a single use each time).

Thanks again Robert. I appreciate your guidance for all of us!

Kevin,

I noticed it does't remove it when the widget is closed

This is by design. When using a search result as an operational layer, most people want that layer to appear in the legend and thus print job and to be available to other widgets and tasks, thus it Not being removed when the widget is closed. 

The jimu statistics utils will not operate on a GraphicsLayer (i.e. what the search result is when use as operational layer is not checked).

If a layer is set to add as operational layer then the search results are added as a FeatureLayer. This FeatureLayer is added to the 

this.operationalLayers

array. You can loop through that array in the onClose method and hide the layers. You will have to show() them in the onOpen method too.

What if there was an option to always at run-time, bring in and show all fields?

This is a lot more work then you would expect and is not on my radar currently.

Where would be the best place to stick a line to turn a custom map cursor on

After any line like this in the code:

this.drawBox.activate(...

I am just trying out this widget. I add the widget to my app, then click OK to make sure it gets added to my app. Unfortunately, nothing happens except for this error thread in the JavaScript log:

init.js:114 TypeError: Cannot read property 'en-ca' of undefined
at Object.<anonymous> (FeatureActionManager.js?wab_dv=2.9:174)
at Object.forEach (init.js:70)
at Object.registerWidgetFeatureActions (FeatureActionManager.js?wab_dv=2.9:162)
at Object.<anonymous> (FeatureActionManager.js?wab_dv=2.9:207)
at init.js:63
at visitBigSection (utils.js?wab_dv=2.9:148)
at Object.visitElement (utils.js?wab_dv=2.9:112)
at Object.c.visitElement (ConfigManager.js?wab_dv=2.9:190)
at Object._reRegisterWidgetActions (FeatureActionManager.js?wab_dv=2.9:204)
at Object._onAppConfigChanged (FeatureActionManager.js?wab_dv=2.9:252) "TypeError: Cannot read property 'en-ca' of undefined
at Object.<anonymous> (https://dlc-p520-1825.lakecountry.bc.ca:3344/webappbuilder/apps/88/jimu.js/FeatureActionManager.js?w...)
at Object.forEach (https://js.arcgis.com/3.25/init.js:70:486)
at Object.registerWidgetFeatureActions (https://dlc-p520-1825.lakecountry.bc.ca:3344/webappbuilder/apps/88/jimu.js/FeatureActionManager.js?w...)
at Object.<anonymous> (https://dlc-p520-1825.lakecountry.bc.ca:3344/webappbuilder/apps/88/jimu.js/FeatureActionManager.js?w...)
at https://js.arcgis.com/3.25/init.js:63:337
at visitBigSection (https://dlc-p520-1825.lakecountry.bc.ca:3344/webappbuilder/apps/88/jimu.js/shared/utils.js?wab_dv=2....)
at Object.visitElement (https://dlc-p520-1825.lakecountry.bc.ca:3344/webappbuilder/apps/88/jimu.js/shared/utils.js?wab_dv=2....)
at Object.c.visitElement (https://dlc-p520-1825.lakecountry.bc.ca:3344/webappbuilder/apps/88/jimu.js/ConfigManager.js?wab_dv=2...)
at Object._reRegisterWidgetActions (https://dlc-p520-1825.lakecountry.bc.ca:3344/webappbuilder/apps/88/jimu.js/FeatureActionManager.js?w...)
at Object._onAppConfigChanged (https://dlc-p520-1825.lakecountry.bc.ca:3344/webappbuilder/apps/88/jimu.js/FeatureActionManager.js?w...)
----------------------------------------
rejected at a (https://js.arcgis.com/3.25/init.js:108:174)
at k (https://js.arcgis.com/3.25/init.js:107:436)
at b.extend.then.then.b.then (https://js.arcgis.com/3.25/init.js:110:152)
at Object.onOk (https://dlc-p520-1825.lakecountry.bc.ca:3344/webappbuilder/builder/main.js?wab_dv=2.9:6801:30)
at Object.onClick (https://js.arcgis.com/3.25/init.js:63:337)
at Object.<anonymous> (https://dlc-p520-1825.lakecountry.bc.ca:3344/webappbuilder/stemapp/jimu.js/dijit/Popup.js?wab_dv=2.9...)
at HTMLDivElement.<anonymous> (https://js.arcgis.com/3.25/init.js:63:337)
----------------------------------------
Error
at b.extend.then.then.b.then (https://js.arcgis.com/3.25/init.js:110:97)
at Object.onOk (https://dlc-p520-1825.lakecountry.bc.ca:3344/webappbuilder/builder/main.js?wab_dv=2.9:6801:30)
at Object.onClick (https://js.arcgis.com/3.25/init.js:63:337)
at Object.<anonymous> (https://dlc-p520-1825.lakecountry.bc.ca:3344/webappbuilder/stemapp/jimu.js/dijit/Popup.js?wab_dv=2.9...)
at HTMLDivElement.<anonymous> (https://js.arcgis.com/3.25/init.js:63:337)"

Has anyone experienced this before?

Thanks,

M

It appears you are using WAB 2.9. So are you making sure you are using eSearch version 2.9?

Good point. Will be careful to download the correct version!

Thanks.

M

One thing I did notice is the draw order of the selected graphics is a bit strange. Is there a way to ensure selected features are above source features and the buffer is above the selected features?

Thanks in advance,

M

Sure. Configure the search layer and the buffer to be added as operational layers.

Hello Robert  ~ 2 requests that were asked of me: Can I remove the Clear Fields link, and only show Clear; can I change the syntax to only read Search Hydrant layer, and remove "Hydrant" and "Search by Location ID" text below it?

John,

   There is not a widget configuration option for those changes, they would have to be made in code.

Right. I have the code, and I was looking in the config file for that widget but didn't see anywhere where I could make those specific changes. Is that something I could do or did you hard code those settings into the widget?

John,

   Correct those are not things that you can change in the config. You will have to edit the html and widget.js files

Got it, thank you.

     I do have the widget.js and html file. My question is where in the code in those specific files can I make the changes that were requested?

John, 

 OK, looking into the code, I see I was mistaken about being able to configure one of your requirements.

To remove the "Search by Location ID" text you just need to remove the search expressions "search label" text.

Your other two requests require code changes.

To change the "Search layer" to "Search Hydrant layer" you go into the Widget.html change this line:

<label>${nls.searchLayer}</label>

to this line:

<label data-dojo-attach-point="searchbyLbl">${nls.searchLayer}</label>

In the Widget.js there will be two instances of this line.

this.labelLayerAttribute.innerHTML = attribOptions[0].label;

Change both to:

                var lblArr = this.nls.searchLayer.split(' ');
                this.labelLayerAttribute.innerHTML = lblArr[0] + " " + attribOptions[0].label + " " + lblArr[1];
                html.setStyle(this.searchbyLbl, 'display', 'none');

To prevent the "clear fields" link from showing you Search the Widget.js file for "this.btnClear4" and you will find a block of code like this.

        this.own(on(this.btnClear2, "click", lang.hitch(this, this.clear, true)));
        this.own(on(this.btnClear3, "click", lang.hitch(this, this.clear, true)));
        this.own(on(this.btnClear4, "click", lang.hitch(this, this.clearFields, true)));
        this.own(on(this.btnClearBuffer2, "click", lang.hitch(this, this.clearbuffer)));
        this.own(on(this.btnClearBuffer3, "click", lang.hitch(this, this.clearbuffer)));
        html.setStyle(this.btnClearBuffer2, 'display', 'none');
        html.setStyle(this.btnClearBuffer3, 'display', 'none');
        html.setStyle(this.btnClear2, 'display', 'none');
        html.setStyle(this.btnClear3, 'display', 'none');
        html.setStyle(this.btnClear4, 'display', 'none');

Line 10 is added to make the link not display.

Hi Robert,

Thanks for making the esearch widget . Its a very useful widget. Appreciate your work.

I have few questions i want to enhance the esearch widget for our requirment.

I have points drawing on the map with esearch widget query. Now i want to do something like for example

Slno  Name  Number Direction   Lat          Long

1       John     12345   Incoming   51.45      25.88

1       Ahmed  78945   Outgoing   51.88      25.44

2       Bob       45678  Outgoing    51.88      25.77

3       Ahmed  78945  Incoming    51.61      25.74

4       Rich      74185  Outgoing     51.65      25.55

I want to show on map like below.

John <-------------------------------------------------------------------------- Ahmed

Can we achieve like the above.

Or in the popup if we click on John it show the location of Ahmed 

Please let me know if this can be achieved and where i need to do changes.

Thanks in Advance

Anonymous User

Robert, understood.  I had hoped it was just {*} fields but alas.  I agree with you about showing the symbology on Print and Legend and while yes many users will want it to remain, though for my case in this app it would be better to hide it actually. So just food for thought, down the road it may be a nice option for the programmers to decide the default behavior i.e. a checkbox "Hide operational Layer temporarily on widget close?" Yes/no   

So I popped in the 2.12, and after updating to your latest eSearch it has broken the Select featureActions it seems... 

I see this Console error below when I click on the '...' featureAction button.  SAGIS Property Map Viewer Thoughts?

TypeError: tWidget is undefined4 eZoomTo.js:31:10

Kevin,

  The error sounds like you got a bad version of 2.12 eSearch. You should re-download. There is suppose to be code in the eZoomTo.js that checks for the twidget object.

    isFeatureSupported: function(featureSet){
      var supported = false;
      supported = featureSet.features.length > 0 && featureSet.features[0].geometry;
      var tWidget = WidgetManager.getInstance().getWidgetById(this.widgetId);
      if(tWidget && tWidget.state === 'active'){
        return supported;
      }else{
        return false;
      };
    },
Version history
Last update:
‎11-22-2022 07:31 AM
Updated by: