Innovate-Inc / EnviroAtlas

A Repository for the EnviroAtlas application
3 stars 1 forks source link

Attribute table should only display filtered features when community is selected #214

Closed torrin47 closed 8 years ago

torrin47 commented 8 years ago

The behavior of the attribute table widget is odd right now - sometimes it works, sometimes it doesn't, and it doesn't appear to consistently utilize the attribute filter applied by the community selection widget. Let's investigate and resolve.

Baohong commented 8 years ago

Does that mean that we should check on the "Filter by Map Extent" before the user open the attribute table?

torrin47 commented 8 years ago

That might be one solution. I'd be happiest if the attribute table respected the definition expression we're setting on the layer.

Baohong commented 8 years ago

The occasional empty attribute table is caused by our occasional inconsistency of our feature service. Take https://enviroatlas.epa.gov/arcgis/rest/services/Other/CommunityBG_all_layers/MapServer/2/query for example, I have made several queries in "Where" section to test: a. UPPER(Community) LIKE UPPER('%Woodbine, IA%') This sometimes will return one record which is good, sometimes return zero records. When it returns one record, the attribute table in EnviroAtlas link is not empty. Otherwise, attribute table is empty.

b. 1=1 This always return all the records.

Similarly, if we specify orderByFields part (like it did in our EnviroAtlas code), the returned result are not consistent.

Also, if we use geometry extent to limit the search result (since I want to try this to avoid the query.where clause), similar inconsistency will happen. This will make the "Filter by Map Extent" function inconsistent.

So the emptiness of the attribute table is caused by the feature service. If there are no change/improvement of the feature service, there might be a walk-around of setting query clause to be "1=1" and get all the result. Just as shown in link "https://leb.epa.gov/Projects/enviroatlas/CurrentDevelopment/EnviroAtlas/". There should never be empty attribute table but there is no special query. We can write our own code to filter out the undesired community. But there is a max record limit of 1000 on the current feature service. Could we remove that limit? Let us discuss the possibility and any other suggestion is appreciated.

torrin47 commented 8 years ago

Helpful investigations, thanks. Seems like the instability on the production servers is a large part of everyone's pain at the moment. Switching the dev site to point at the dev server may eliminate a variable - let's test again once that switch is complete.

Baohong commented 8 years ago

Is there a one to one mapping of feature services between 49.16 and production? Do I need to modify "eaLyrNum" for each feature service? Where is the link? If there are such feature services, could I update config.json in github code?

torrin47 commented 8 years ago

I just submitted a pull request with a new config.json file from Barb that points at the 49.16 services. You should be able to review and accept that pull request.

Baohong commented 8 years ago

Just merged. Thanks!

brosenbaum commented 8 years ago

Boahong - if there are any layers that are not lining up, please let me know. I made modifications and pointed to some new services in the file Torrin pushed. everything should be lining up

On Fri, Sep 16, 2016 at 8:08 AM, Baohong notifications@github.com wrote:

Just merged. Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Innovate-Inc/EnviroAtlas/issues/214#issuecomment-247625627, or mute the thread https://github.com/notifications/unsubscribe-auth/AGH_1l83c7LVJoEWz96JT2VwlUqxcB63ks5qqrEIgaJpZM4J3blH .

Barbara Rosenbaum Innovate!, Inc. Office: (541) 929-6622 Message: (703) 922.9090 x 739 brosenbaum@innovateteam.com

Innovate!, Inc. is a Virginia-based 8(a), Hispanic- and woman-owned business delivering Geospatial, Information Technology, Security, Business Consulting, Project Management and Executive Coaching solutions to our government and private sector clients. Check us out at www.innovateteam.com.

Baohong commented 8 years ago

There are problems in the new config.json-----The field eaBCSDD is missing. In the original config.json, there is a field called "eaBCSDD", but in the new config.json, in the place of such field, it becomes "Climate Stabilization - Driver". This is not correct. Please check. Thanks.

torrin47 commented 8 years ago

I'm confused - there is still a field in EnviroAtlas\scripts\config.json called "eaBCSDD" and it's still an array with values that include "Climate Stabilization - Driver", "Clean Air - Driver", "Natural Hazard Mitigation - Driver" etc. This has been the configuration since April 21 - this commit: https://github.com/Innovate-Inc/EnviroAtlas/commit/f431f880da2ed2238e38a72a34b9054e64bbf389

Baohong commented 8 years ago

What I got is from link https://github.com/Innovate-Inc/EnviroAtlas/blob/master/scripts/config.json. I cannot find field "eaBCSDD". Please send the link of desired config.json.

brosenbaum commented 8 years ago

looks as though the BC and SDD was used for the label. For example:

            "eaFFM": "Demand",
            "eaMetadata": "C014",
            "visible": "false",
            "eaMetric": "metric",
            "eaLyrNum": 4,
            "mode": "ondemand",
            " Food, Fuel, and Materials - Demand": [
                "Biodiversity Conservation - Demand",
                "Food, Fuel, and Materials - Demand"
            ],
            "eaScale": "COMMUNITY",
            "eaBC": "Demand",

On Tue, Sep 20, 2016 at 6:41 AM, Baohong notifications@github.com wrote:

What I got is from link https://github.com/Innovate- Inc/EnviroAtlas/blob/master/scripts/config.json. I cannot find field "eaBCSDD". Please send the link of desired config.json.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Innovate-Inc/EnviroAtlas/issues/214#issuecomment-248304455, or mute the thread https://github.com/notifications/unsubscribe-auth/AGH_1hLH2lFAc9SOy9h4wyLoye5DmRpfks5qr-KNgaJpZM4J3blH .

Barbara Rosenbaum Innovate!, Inc. Office: (541) 929-6622 Message: (703) 922.9090 x 739 brosenbaum@innovateteam.com

Innovate!, Inc. is a Virginia-based 8(a), Hispanic- and woman-owned business delivering Geospatial, Information Technology, Security, Business Consulting, Project Management and Executive Coaching solutions to our government and private sector clients. Check us out at www.innovateteam.com.

torrin47 commented 8 years ago

Aha, yes indeed, and I ended up looking at a different branch to verify. Thanks for your patience, should be fixed now.

Baohong commented 8 years ago

Am I looking at the correct branch? But I still cannot find field "eaBCSDD" on https://github.com/Innovate-Inc/EnviroAtlas/blob/master/scripts/config.json.

torrin47 commented 8 years ago

Just submitted pull request for fix.

On Tue, Sep 20, 2016 at 9:03 AM, Baohong notifications@github.com wrote:

Am I looking at the correct branch? But I still cannot find field "eaBCSDD" on https://github.com/Innovate-Inc/EnviroAtlas/blob/master/ scripts/config.json.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Innovate-Inc/EnviroAtlas/issues/214#issuecomment-248348016, or mute the thread https://github.com/notifications/unsubscribe-auth/ACB0vE7zVvSPxH6nNyQ5ci-mE0CX3TL7ks5qsAPFgaJpZM4J3blH .

Torrin Hultgren Senior Manager, Geospatial Solutions Innovate!, Inc. O: (703) 922-9090 x737

http://www.innovateteam.com

Innovate!, Inc. is a Virginia-based 8(a), Hispanic- and woman-owned business delivering Geospatial, Information Technology, Security, Business Consulting, Project Management and Executive Coaching solutions to our government and private sector clients. Check us out at www.innovateteam.com.

Baohong commented 8 years ago

Merged, thanks!

Baohong commented 8 years ago

I cannot see the selectable layerlist on SimpleSearchFilter widget from https://leb.epa.gov/EnviroAtlas_WAB/. That part is empty. From the github repository, I saw that the supply/demand part has been removed. So we need to remove that part, right? Should we bring back the selectable layer list? Could Torrin or Barb test with https://leb.epa.gov/EnviroAtlas_WAB/

torrin47 commented 8 years ago

Got it. Commenting out the subcategories list caused the code looking for checked boxes to not find any and thus hide all the layers. Instead of commenting those out, set display:none. Fixed the problem for now, we'll decide what to do with that code when we get the new filtering strategy. See fresh pull request.

On Tue, Sep 20, 2016 at 11:53 AM, Baohong notifications@github.com wrote:

I cannot see the selectable layerlist on SimpleSearchFilter widget from https://leb.epa.gov/EnviroAtlas_WAB/. That part is empty. From the github repository, I saw that the supply/demand part has been removed. So we need to remove that part, right? Should we bring back the selectable layer list? Could Torrin or Barb test with https://leb.epa.gov/EnviroAtlas_WAB/

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Innovate-Inc/EnviroAtlas/issues/214#issuecomment-248397394, or mute the thread https://github.com/notifications/unsubscribe-auth/ACB0vHmaeUmn95go7mKPw-wwfFlffb4aks5qsCu4gaJpZM4J3blH .

Torrin Hultgren Senior Manager, Geospatial Solutions Innovate!, Inc. O: (703) 922-9090 x737

http://www.innovateteam.com

Innovate!, Inc. is a Virginia-based 8(a), Hispanic- and woman-owned business delivering Geospatial, Information Technology, Security, Business Consulting, Project Management and Executive Coaching solutions to our government and private sector clients. Check us out at www.innovateteam.com.

Baohong commented 8 years ago

Now working, thanks!

brosenbaum commented 8 years ago

looks good! thanks

On Tue, Sep 20, 2016 at 1:37 PM, Baohong notifications@github.com wrote:

Now working, thanks!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Innovate-Inc/EnviroAtlas/issues/214#issuecomment-248426362, or mute the thread https://github.com/notifications/unsubscribe-auth/AGH_1s7g0iTqunnv8V-rSfprCdtZOpr6ks5qsEPygaJpZM4J3blH .

Barbara Rosenbaum Innovate!, Inc. Office: (541) 929-6622 Message: (703) 922.9090 x 739 brosenbaum@innovateteam.com

Innovate!, Inc. is a Virginia-based 8(a), Hispanic- and woman-owned business delivering Geospatial, Information Technology, Security, Business Consulting, Project Management and Executive Coaching solutions to our government and private sector clients. Check us out at www.innovateteam.com.