Query and Zoom to Selection (from table) not working fully

5542
10
01-28-2015 09:02 AM
PaulJordan
New Contributor III

1> Cannot zoom to feature selected in attribute table

2> Queries pull up the relevant list of features but the created layer shows nothing.

app is here:  ArcGIS Web Application

Thanks

PJ

Update:  I've been able to make this work by loading a shapefile directly to My Content and incorporating it into the map.  It will not work with data hosted on my ArcGIS server.  I'm wondering perhaps the data need to be in an enterprise geodatabase instead of file geodatabase to make this work.  I say that because Feature Access is only possible via the enterprise version.

0 Kudos
10 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Paul,

   When working with results in the attribute table you have to double click the row in the AT or click the "Zoom To" button on the AT header to zoom to the feature. I just tested your link and zooming works fine. The query widget is working fine for me as well (it is adding the result symbology to the map).

0 Kudos
PaulJordan
New Contributor III

Got it!  I could not zoom to queried map features because I had left the shape field visibility off when publishing the service.  I wondered why that comes up as a warning when creating a service, and thinking that if it's important enough to generate a warning there must be consequences down the line. 

BINGO - make the shape field visible and now the webapp can zoom to selected features. 

Lesson learned, visible doesn't necessarily mean visible to the end user.  In this case, the web app has too "see" the shape field so it knows where it is on the map.

RobertScheitlin__GISP
MVP Esteemed Contributor

Paul,

   Glad you got it figured out. Hide the shape field gets people a lot. I can't remember how many times I addressed this in the Flex forums.

0 Kudos
AdrienHafner
Occasional Contributor

Hi All,

I'm a little late to the thread here, but I'm running into the same issue of the "zoom to" button not working in the Attribute Table widget in WAB.  Trying to solve it using the suggestion provided by Robert has only produced another issue - I can't seem to "turn on" the Shape field anywhere??  I'm using Portal (10.5.1) to create my map for WAB.  Within the Portal map, I've checked the pop-up configuration parameters (where several of the field properties are configured), as well as in the table itself, and I do not see the Shape field listed.  I did NOT turn it off prior to publishing the service from ArcMap and when I go to the REST endpoint of the service, it is listed as a field there.  Any suggestions for how to turn this on so the "zoom to" tool will work in the Attribute Table widget??

Thanks!

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Adrien,

  Try removing the layer from your web map in Portal and then re-adding it to see if the fields are reset and the shape field re-appears.

0 Kudos
AdrienHafner
Occasional Contributor

Hi Robert,

Unfortunately that didn't work.   As it turns out, none of the layers in web app/Portal map have the Shape field exposed (close to 30 layers total), yet when I spot-checked the REST endpoints, they're all showing it there.  These are all services hosted in an enterprise geodatabase published to ArcGIS Server (federated with Portal).  Not sure if it matters that I'm using the individual feature layer item of the map server item for most of the layers in the Portal map?

Thanks!

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Adrien,

   Hmm... I don't see the issue then. Sorry it sounds like a call to esri tech support.

0 Kudos
AdrienHafner
Occasional Contributor

 That's what I was afraid of!  Thank you for your suggestions though!  

0 Kudos
StevenWeaver1
New Contributor II

Adrien Hafner‌ Did Esri support resolve your problem?   We just finally got 10.5 Portal and, I'm running into the same issue. Thanks!

0 Kudos