Search Widget with Polygon FeatureLayer - WAB 2.1

1051
3
08-02-2016 04:34 PM
AdamCrateau1
Occasional Contributor

I'm creating a custom application using WAB 2.1.  I'm using the standard Search widget (version 2.1), and have added some search sources using a polygon Feature Layer in my webmap.    When I attempt to search on these items I am getting the following error:

TypeError:  Unable to draw graphic (null): features[0].geometry.getCenter is not a function(…)

Anyone else have this issue?  The search still works, but it zooms very close on the feature (rather than zooming to it's extent) and  the progress circle in the lower right of the app spins infinitely.

BTW, I added another search source using a Point feature layer; this works and does not have the same problem as with the polygon.

0 Kudos
3 Replies
AdamCrateau1
Occasional Contributor

I verified that when I set up a search on the same polygon feature layer in WAB 1.3 it works fine.

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Adam,

I just tested and I am not seeing this issue with polygon data set as a Feature Source in WAB 2.1 Search widget. Have you tried with multiple polygon layers?

0 Kudos
AdamCrateau1
Occasional Contributor

Robert, I have tried with other polygon layers.   I thought maybe it was due to the projection (State Plane), but I just tried with a polygon Feature Layer projected in Web Mercator and it has the same issue.

The layer I'm trying to use is our county's taxlots, which has about 100k features... not sure if there's a limitation with number of records..

0 Kudos