Search widget not creating zoom-to or popup on search results?

4627
2
03-24-2016 08:21 AM
RexRobichaux1
New Contributor

Good Morning GeoNet-

I'm finishing up a web app that has been created in Web Appbuilder to be used internally by a few of our admin staff in the County Assessor Office. Obviously one of the important necessities of the App is to be able to search for parcels on parcel ID, owner name, and assessor account numbers. I enabled searching on layers in the web map from which the application was based, added in the 3-4 different search criteria in Web Appbuilder, saved, and tested and for some reason once you find the search result and click on it- it doesn't zoom to the feature / pop-up like it should. Weird thing is I have made 4-5 other apps very similar to this and they work fine? I can't think of a step that I missed but I suppose it's possible. Has anyone else ran into this issue? The search feature is working as it returns good results for PID, Owner Names, and Account #s, however once you click on the desired result- it does nothing. Any ideas would be greatly appreciated. Thanks in advance folks!

Here is a working App I made previously: ArcGIS Web Application

And here is the App in question: ArcGIS Web Application

Best,

-Rex R

0 Kudos
2 Replies
DouglasRoth1
New Contributor II

With the help of the Esri support team we figured out what the problem was. I had accidentally grabbed the mapserver URL from our rest services directory instead of the feature server URL that was published for the same source document. In order for the search / query widgets to grab and return records, you have to reference a published feature service. Once I updated the ArcGIS Online web map with the feature service URL, and recreated the search function within the Web Appbuilder it works fine. Hope this helps anyone else who runs into a similar issue.

From Esri support team:

http://gis-server.co.montezuma.co.us/arcgis/rest/services/Viewer_Assessor_Map/MapServer/5

The above URL is the Rest URL for parcel layer, I am unable to interface with the Features or add them as a single layer to ArcGIS online, They are simple behaving like an image. 

Also The layer currently does not have Geometry field and can not be added to ArcGIS online as a layer that we can use with the Search Widget in Web App builder. I think this layer needs to be published as a FeatureServer ( Different Support team help). Then the work flow would look like this:

1) Add http://sampleserver6.arcgisonline.com/arcgis/rest/services/NapervilleShelters/FeatureServer/0 ArcGIS alone,
2) Save Map
3) Share > WebApp Builder
4) Add Widget > Search widget,
5) Set Source Layer to the FeatureServer,  Fill in the Search fields, etc.

BrendanBladdick3
Esri Contributor

Map Services will work just as well as Feature Services to be able to query that data:

"The following layers are searchable with Query capability enabled:

However if the "SHAPE" field is turned off in the layer before publishing then there will be issues with this search functionality. If the "SHAPE" field has been turned off then the layer may still be able to be queried however it will not zoom to the layer or open the popup related to the item. This is expected behavior.

We have a built in function with our analyzation before publishing that will warn the user regarding this:

24048: Shape field is not visibleIn order to properly draw queried map features it is required tha...

We also have a bug related to moving around the shape fields and how it can corrupt the ability to perform popups.

At the end of the day, when it comes to the "SHAPE" field do not turn this off before publishing, make sure this field stays on.

Regarding the format, stray away from rearranging or turning off the "SHAPE", "Shape.STArea()", and "Shape.STLength()" fields from their original format or it could result in the same behavior or corruption.

The "OBJECTID", "SHAPE", "Shape.STArea()", and "Shape.STLength()" fields are hidden by default when adding the item to an ArcGIS Online or Portal Map Viewer.

No matter what fields can be turned off using one of our client applications with the configure popups in the Map Viewer or using one of the Widgets in Web AppBuilder such as the Attribute Table or Smart Editor.

Please let me know if you have any questions!