Enhanced Search Widget Version 2.17 - 7/9/21

352909
2709
07-14-2014 03:57 PM
Labels (1)

Enhanced Search Widget Version 2.17 - 7/9/21

Live Preview Site

Web AppBuilder for ArcGIS | Help - Enhanced Search widget

 

List of the latest enhancements and changes:

  1. Fixed Issue with Print Legend using "override 1" for search and/or buffer Layers.
  2. Fixed autozoom issue under certain configurations.

 

Older enhancements or changes

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

 

Older Versions

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

Hi @RobertScheitlin__GISP , thanks for the response. It does sound like the issue with the url path. To demonstrate, this was my search symbology settings:

PropertiesCurtin_1-1626416132582.png

And this was the display after selecting these two points:

PropertiesCurtin_2-1626416166397.png

I don't think there are errors, this was the developers console: 

PropertiesCurtin_0-1626416086785.png

 

 

@PropertiesCurtin  version 2.4 is very old and many enhancements have been made since then (think about it that is 16 minor version behind). I pretty sure that you have the layer set to use symbology "from Server". If you change it to "from Defaults" then you will see the light cyan circle you have showing in your image.

@RobertScheitlin__GISP  yeah, we're pretty behind with ESRI versions, hopefully that'll be upgraded in the not too distant future. 

I changed it to 'from Defaults' and it's all fixed, thanks again Robert.

Hi Robert! We'd like to use the eSearch widget on a secured service with stored credentials and limit usage enabled via the Item page on ArcGIS Online. Do you know URL(s) we would need to whitelist on the usage limitation to allow your widget to call that service?

I realized after I posted this that there is another way to do it. I need to copy the URL from the item page and use that as the URL in the eSearch widget. Apologies for the noise on an already long forum! 🙂

Hi Robert

Our organization recently upgraded from ESRI Enterprise 10.8.1*** to 10.9. eSearch 2.13 worked fine. But we noticed it failed to open in an existing app (made in 10.7) that used webapp Builder. A panel slight opens up slightly. It stays on that only showing the loading bar. I copied and pasted the latest version (2.17) to replace the older version and still no luck.

We tested the widget in a new mapping application and it seemed to work (full disclosure: we tested one function).

But for when I inspected the page when I clicked on the icon, I got the following error:


fail to startup panel 44bc75c5dbb44498b89f1b072405d413_50_panel. TypeError: Cannot read property 'indexOf' of undefined

init.js:116 TypeError: Cannot read property 'on' of undefined
at t (init.js:124)
at Object.<anonymous> (Widget.js?wab_dv=2.19:54)
at init.js:65
at t (init.js:109)
at a.then.e.then (init.js:112)
at Object._showIconContent (Widget.js?wab_dv=2.19:53)
at Object._switchNodeToOpen (Widget.js?wab_dv=2.19:51)
at Object.<anonymous> (Widget.js?wab_dv=2.19:47)
at init.js:65


init.js:116 TypeError: Cannot read property 'style' of null
at Object.r.set [as setStyle] (init.js:170)
at Object._switchMaxBtn (Panel.js?wab_dv=2.19:9)
at Object.resize (Panel.js?wab_dv=2.19:8)
at Object.onNormalize (Panel.js?wab_dv=2.19:8)
at Object.onOpen (Panel.js?wab_dv=2.19:7)
at Object.<anonymous> (main.js?wab_dv=2.19:1788)
at init.js:65
at t (init.js:109)
at p (init.js:109)
at a.resolve (init.js:111) "TypeError: Cannot read property 'style' of null\n at Object.r.set

Uncaught TypeError: Cannot read property 'style' of null
at Object.r.set [as setStyle] (init.js:170)
at Object._switchMaxBtn (Panel.js?wab_dv=2.19:9)
at Object.resize (Panel.js?wab_dv=2.19:8)
at Object.onMapResize (main.js?wab_dv=2.19:1792)
at Object.<anonymous> (init.js:65)
at Object.<anonymous> (init.js:678)
at Object.e [as onResize] (init.js:121)
at Object._resize (init.js:638)
at Object._execResize (init.js:637)
at init.js:65
r.set @ init.js:170
_switchMaxBtn @ Panel.js?wab_dv=2.19:9
resize @ Panel.js?wab_dv=2.19:8
onMapResize @ main.js?wab_dv=2.19:1792
(anonymous) @ init.js:65
(anonymous) @ init.js:678
e @ init.js:121
_resize @ init.js:638
_execResize @ init.js:637
(anonymous) @ init.js:65
setTimeout (async)
resize @ init.js:636
(anonymous) @ init.js:65
onWindowResize @ main.js?wab_dv=2.19:1383
(anonymous) @ init.js:65

We also tried to introduce the widget on the same existing app. We were able to access the settings and everything but we were unable to click ok (no message on the dev console). It was greyed out

***My colleague did notify that when we upgraded from 10.7 to 10.8.1, the widget worked fine on existing apps. However, we still faced the greyed out ok button.

Can you identify the issue? We did notice this issue and corrected this  on all our apps that used a custom widget. They all have worked including the popup panel widget.

 

 

@RezaTehranifar2 

  1. "We also tried to introduce the widget on the same existing app. We were able to access the settings and everything but we were unable to click ok (no message on the dev console). It was greyed out" -  Are there any error messages in the web console when you do this?
  2.  What theme are you using in that existing app that was made in 10.7? "A panel slight opens up slightly"???

Hi Robert, 

 

We have been using the enhanced search widget (older version) on several web app for many years. Recently, one user ask how to minimize the enhanced search widget window. 

Does the newer version include the icon to maximize and minimize the window? 

Many thanks. 

@LiangJiang1  That really depends on the theme you are using and where you have the widget place (i.e. foldable theme in the header controller vs. the on screen place holders).

Thanks @RobertScheitlin__GISP 

Here is our response. Like I said, I just copied and pasted the new version in the same wwwroot folder as before. Maybe I should have done otherwise? It does work on a new app with the same template. I can provide the app json if that helps.


  1. "We also tried to introduce the widget on the same existing app. We were able to access the settings and everything but we were unable to click ok (no message on the dev console). It was greyed out" -  Are there any error messages in the web console when you do this? There are no error messages in the console. There is no response to the clicking of the OK button.  
  2. What theme are you using in that existing app that was made in 10.7? "A panel slight opens up slightly"??? We are using the Jewelry box theme and the widget is in the Header controller section. it slightly opens up as so:

RezaTehranifar2_0-1628518988383.jpeg

 

@RobertScheitlin__GISP Thank you for such quick reply. I haven't check the app's and widgets' configuration for a while. We use Jewelry Box Theme. It is likely in HeaderController. 

"version": "2.16",
"id": "themes_JewelryBoxTheme_widgets_HeaderController_Widget_21",
"name": "HeaderController"

......

{
"position": {
"left": 57,
"bottom": 70,
"relativeTo": "map"
},
"placeholderIndex": 1,
"id": "_47",
"uri": "widgets/eSearch/Widget",
"openAtStart": false,
"name": "eSearch",
"closeable": true,
"config": "configs/eSearch/config__47.json",
"version": "2.5"
},

@RezaTehranifar2  Is that app public where I can do some testing on it? There is just not enough info for me to diagnose what the issue is.

@LiangJiang1  Even in WAB 2.5 the jewelry box theme allows for widgets in the header controller to be collapsed using the double up arrow and un-collapsed using the double down arrow in the widget panel header.

@RobertScheitlin__GISP 

unfortunately our enterprise is internal. Looks like we solved the problem. As we updated, we also cleaned some of our services. Since the widget linked to one of the deleted feature services, somehow it wasn't letting us save and we weren't getting an error message about that. Hope that makes sense. But thank you for your attention and speedy replies. Looking forward to future versions and new tools...

@RobertScheitlin__GISP Thanks for the clue. I remember it wrong, we placed the Enhanced Widget in the lower left corner in the Jewelry Box theme. It is not in the Header controller. 

I test to place the widget into the Header Controller, the collapse/un-collapse button shows. 

@RobertScheitlin__GISP 

Robert,

Thank you to design the enhanced search widget! I try to add the search result as a new layer and can select from the  lay list. Does the enhanced search widget have this function? Thanks!

Jim

@JinchengGao  Sure just check the "Add result as operational layer" from the widget settings.

@RobertScheitlin__GISP 

Robert,

That is great! Do you know if the standard search widget with the same function? I did not find from the widget setting. Thanks!

Jim 

@JinchengGao1 The otb search widget does not.

@RobertScheitlin__GISP 

Thank you very much for your reply! I try to install your ESearch widget.  Thanks and have a good day!

 

Jim

@RobertScheitlin__GISP 

Robert,

Good morning!

I inserted the Enhanced Search widget. I try to search based on Address or XY coordinators and add as a new layer in the web map. I used the world street basemap as the search layer, but I got an error 'Included fields empty'. What is your suggestion? What is the URL I should link to? Thanks!

Jim

@JinchengGao You can not search the world street basemap. That is a tiled Map service, you need to use a Mapserver or a Featureserver service. When you install the eSearch widget it has several example service already added.

@RobertScheitlin__GISP 

Robert,

Thank you for your reply! Do you know which layer the standard search widget uses for the search function? When you type an address, a point will be added in the map for the search result. I want to use the same function with your Enhanced search widget to add a new layer to the map with the search result. Thank you for your help!

Jim

@JinchengGao The OTB search widget uses a Geocoding service with you can not use to add a layer to the map.

@RobertScheitlin__GISP 

Robert,

 

Thank you for your reply! Can the enhanced search widget use geocoding service to do the same search as standard search widget? Jim

Nope, Geocoding is very different then a query task.

@RobertScheitlin__GISP 

Robert,

Good morning!

I found to a solution you provided to add a marker to the search result from Search widget. Do you think we can use the marker created by the Search widget as reference to set query expression in the Query widget? But I am not sure if we can add an ID to the marker, then the query widget can call the widget ID and execute a query referenced on the marker such as 20 miles buffer around the marker. Any suggestions could you provide? Thanks!

Jim 

@RobertScheitlin__GISP 

Good morning!

I can use the Search widget to find a location, then add a pin at the search point to execute a query task  with a buffer distance in the Query widget. But, I try to set the search point as the default pin point in the query widget to execute a query task with a buffer. I think I can use publishData (searchResult) in the Search widget, then use fetchData() and onReceiveData(data) in query widget to get the result. But I don't know how to parse the data and set as default. Could you provide any helps? Thanks!

Jim

@JinchengGao You are very much in the custom development area now and will need to hire a developer from a consulting company.

@RobertScheitlin__GISP 

Robert,

Thank you for your reply! I hope we can hire a developer, but we don't have the budget. Any suggestions? Jim

@JinchengGao 

Jim,

Sorry I can not provide that level of development help.

Robert

Hello Robert.

Thank you for this great widget!

It works fine in Google Chrome, but in Microsoft Edge it doesn´t work, in some cases.  Do you know why this happens in MS Edge?

Regards,

Ermelinda

@ErmelindaEspinoza  I have not had any report of issues with Edge or seen any myself.

@ErmelindaEspinoza What's not working?

@CourtneyMenikheim   Using Microsoft Edge: I do a search by value from which I get a list of results (selected features) . If I click on one of the selected features on the list, it doesn't zoom to that feature on the map.  If I do the same,  using Google Chrome, the zoom to the selected feature  works just fine (same WebApp, same map service, search on same layer).

@ErmelindaEspinoza  This can not be reproduced by me using Edge and my widgets live preview site:

Enhanced Search Widget 2.17 (calhouncounty.org)

 

Hello Robert, I am new on WAB , i would like to use your Widget but it doesn't work !I can't choose any layer.

I try your other widget ,Identify, to try and see if the problem is my PC but it works lika a charm. 

So , i don't understand why this widget doesn't want.

If you can help me, it will be very grateful!

Thanks

KARIMLABIDI_0-1632133285022.png

 

@KARIMLABIDI 

So what happen when you click the "Ajouter une couche de recherche" link?

it adds empty lines and that's all

KARIMLABIDI_0-1632142386066.png

KARIMLABIDI_1-1632142456898.png

 

 

 

@KARIMLABIDI 

But when you click that link it does not bring up a new dialog titled "Update Search Layer" (of course that title in in English for me)?

No, nothing happens, nothing appears. I don't know why.

KARIMLABIDI_0-1632143001860.png

 

There must be an issue in the French localization of the dialog. So the quick fix is to make the widget show in English for you. To do this go to the strings.js file for the app you are working in (i.e. server/apps/[App#]/widgets/eSearch/nls/strings.js) and open it in a text editor and set the 

"fr": 1,
to
"fr": 0,
Save that file and restart WAB.
 
Ultimately it will help to find the localization string that is causing the issue by opening you browsers web console and seeing the error(s) displayed there.

i have this

KARIMLABIDI_1-1632145462815.png

 

 

@KARIMLABIDI 

OK. In that case then you need to disable the French locale in the settings dialogs too.

server\apps\2\widgets\eSearch\setting\nls\strings.js

Change "fr": 1, to 0

that's the same link no?

ah sorry, i didn't see the "setting"

KARIMLABIDI_0-1632146968583.png

I got this

@KARIMLABIDI 

What version of the widget code did you download? I have fixed those French locale issue in the strings.js a couple of releases ago. The error you are showing is that the single quote in the settings.js strings has to be escaped. For example in your version it has:

allowfcexport: "Exportateur de collection d'objets",
and in more recent version it is:
allowfcexport: "Exportateur de collection d\'objets",
 
Notice the \ (backslash) before the '(single quote).
All single quotes in the 
server\apps\[App#]\widgets\eSearch\setting\nls\fr\strings.js
have to be escaped with a backslash.

 

i think I have download the last version, the 2.17, i have download with the link eSearch.zip . Maybe , i made a mistake. How I know the version?

KARIMLABIDI_0-1632147815338.png

The manifest

In WAB you can Hold the Alt key on your keyboard and then click on the Widget (not the settings dialog, but the actual widget) and a new popup will appear that tells the widgets version number.

Version history
Revision #:
5 of 5
Last update:
‎07-09-2021 05:57 AM
Updated by: