Search Widget Bug: Not working for BNG locators

766
5
Jump to solution
05-06-2022 08:16 AM
SerjStol
New Contributor III

Hello,

We've encountered a bug when creating an ExB app for our customer using Developer Edition 1.8.

The standalone Search Widget does not zoom to location, but it does find the match. The Map Widget Search Tool does work however, although it does give errors in the dev console.

We are using 3 Esri UK hosted locators, so I am thinking it something to do with BNG projection or the URL format?

SerjStol_5-1651849773352.png

SerjStol_4-1651849738280.png

SerjStol_3-1651849610155.png

The Map Widget Search Tool is working:

SerjStol_6-1651849882729.png

 

However sometimes it also gives errors in console:

 

SerjStol_7-1651849978608.png

Locators we are using: https://datahub.esriuk.com/arcgis/rest/services/gb_locators

We could get away with using Map Widget Search Tool, but it does not fit with our theme.

Thanks,

Serj

 

0 Kudos
1 Solution

Accepted Solutions
ShengdiZhang
Esri Regular Contributor

Hi @SerjStol 

I would like to make sure that you have configured message actions between the search widget and the map widget. In the Experience Builder, the zooming is not automatically added, but needs to be configured in the Action panel.

I tried your locator and added the following actions and it worked well. 

ShengdiZhang_0-1652148341128.png

Details can be found at: https://doc.arcgis.com/en/experience-builder/configure-widgets/search-widget.htm#ESRI_SECTION1_3CD1C...

However, if you want to make a search similar to the map viewer, that is, the map automatically zooms to the first result. I suggest you use the action Record selection changes, and check the option Auto select the first record. Since the action Records created will zoom in to include all search results, it may differ from the search in the map viewer, and currently, there are some issues with the Record created zoom to if you configure multiple locator sources.

ShengdiZhang_1-1652148689045.png

Thanks,

Shengdi

View solution in original post

5 Replies
ShengdiZhang
Esri Regular Contributor

Hi @SerjStol 

From the first two images, I think it's the BNG Locator that's not working. But when you use the map search tool, you are using the Postcode Locator, not the BNG Locator.

I tried the BNG Locator in the new map viewer and it didn't return results either.

ShengdiZhang_0-1651891151423.png

Can you provide a sample search input that has results in BNG Locator? Please use the new Map viewer to test.

Besides, the error messages you provided are because the locators don't support the Suggest operation. These messages should not be printed in the console, and we will remove them later.

ShengdiZhang_1-1651891535159.png

Thanks,

Shengdi

SerjStol
New Contributor III

Thank you for the prompt response Shengdi!

Sorry about the wording, I think the better description would be "GB Locators not working in ExB Search Widget" as BNG Locator is one of them, but all of them don't zoom to the location. However, upon further testing, it seems that Search Widget not working at all for us, with just the stock ArcGIS Geocoding Service, the widget does not zoom to the location:

SerjStol_4-1652087311320.png

SerjStol_6-1652087822627.png

 

SerjStol_7-1652087857179.png

 

The widget finds the result, but nothing happens when I press Enter or click on the result. The only thing that changes is the URL gets populated with the above. Nothing in the Developer Console either.

 

Also, as requested here are the examples of entries in the GB Locators. Although it seems its not just the GB Locators, but the widget not working.

BNG Locator in New Map Viewer:

SerjStol_1-1652086720139.png

Postcode Locator New Map Viewer:

SerjStol_2-1652086878787.png

Street Name Locator New Map Viewer:

SerjStol_3-1652086937464.png

 

Basemap used, maybe its to do with Basemap and data being in British National Grid Projection?: 

https://tiles.arcgis.com/tiles/qHLhLQrcvEnxjtPr/arcgis/rest/services/GB_Basemap_v1/VectorTileServer

(https://www.arcgis.com/home/item.html?id=85a1e870f04c40e7b8e24fdb66430d4e)

 

Many thanks if you could help!

Cheers,

Serj

EsriUK

 

0 Kudos
SerjStol
New Contributor III

Also, we have just tested ExB Search Widget on customers AGOL in isolation, leaving just the Esri ArcGIS Geocoding Service, and the same issue, its not zooming in to location. Seems like a wider bug affecting Search Widget in 1.8 version of ExB and not just a Developer Edition?

0 Kudos
ShengdiZhang
Esri Regular Contributor

Hi @SerjStol 

I would like to make sure that you have configured message actions between the search widget and the map widget. In the Experience Builder, the zooming is not automatically added, but needs to be configured in the Action panel.

I tried your locator and added the following actions and it worked well. 

ShengdiZhang_0-1652148341128.png

Details can be found at: https://doc.arcgis.com/en/experience-builder/configure-widgets/search-widget.htm#ESRI_SECTION1_3CD1C...

However, if you want to make a search similar to the map viewer, that is, the map automatically zooms to the first result. I suggest you use the action Record selection changes, and check the option Auto select the first record. Since the action Records created will zoom in to include all search results, it may differ from the search in the map viewer, and currently, there are some issues with the Record created zoom to if you configure multiple locator sources.

ShengdiZhang_1-1652148689045.png

Thanks,

Shengdi

SerjStol
New Contributor III

Thanks Shengdi, I can confirm that once the Action Triggers are configured I am able to get the Search Widget working. Although, I must add that the documentation is not quite obvious and my assumption was that the widget would just work without the data triggers. It might be worth making that a bit more clear. But I am glad that it is working, thank you for your assistance!

0 Kudos