Closed corviday closed 9 months ago
one issue I've run into testing just now is that it is possible to select an area with so many vertices that sending it to the PCEX backend results in a request too long to be processed.
For example, if you click on -122.46875+52.53125, the resulting requests)) to the backend return the error message
Bad Request
Request Line is too large (8192 > 4094)
Possible fixes:
The PCEX backend has been modified to accept extra-long polygons as request paylods. Just need to update this front end.
And maybe the SCIP backend as well?
Searching for a request-making library that will let me send a GET
request with a body.
GET
GET
with a bodyNo library seems to be able to make a GET
request with a body; possibly browsers do not allow it. Accordingly, have shifted tactics to accept POST
requests instead.
Before I review further, a question: Your PR and the in-app instructions say "place a marker and select everything upstream of it", but it looks to me like the map displays the downstream path. Examples:
Can you clarify?
The area of interest, whether selected from a dropdown or by clicking on the map, is outlined in white. It's pretty small on your selection because most points on the map have only a couple grid squares upstream, if there's even anything upstream of them, so in most cases unless you click on a visible river, it's just a grid cell or two.
The blue outline shows the downstream path to the sea. Salmon scientists have indicated this is a useful thing to show on the map, though as of yet we are not offering any indicator data long this route. Hope to someday.
Ah, I see. Thanks. I wonder if a different colour would lower this confusion. Also, perhaps instead, in the instructions, add a note that the map shows (a) the downstream path in blue, and (b) the upstream polygon in white|whatever.
I am wondering if it might help to make the circle marker where you click white (to match the boundary of the watershed you've chosen) instead of the default blue (which matches the downstream line). That way there would be a visual connection between the clicked location and the watershed.
That would help, too. I do also recommend making the "instructions" below the map more explicit with something like what I suggested.
The demo looks great Lee! I like that the marker size changes with the zoom level.
During testing, I discovered a bug while using the Edit layers
option. This option allows a marker that has been placed on the map to be moved without the changes being reflected in the upstream selection.
An additional suggestion for clarity is that for the Delete layers
option, it looks like both “save” and “clear all” have the same behavior. If saving isn’t important here the options could be reduced to either clear all or cancel.
UI Improvements: Removed the "edit layers" button. After research, I am not sure how to get rid of the "save" menu option, so I might kick that to a separate issue. Added text explaining that the selected area is outlined in white.
In the latest demo, the basins(?) don't show up, whereas before IIRC they were filled in purple. Was that intentional?
Yes. We were requested to remove the upstream flow network visualization, which was a collection of lines that, when zoomed out, made the whole selected area look blue. I think it was neat and I am sorry to see it go, but we weren't providing any information about it at this point (though we will someday); it was purely decorative.
Users may select an area of interest using the circlemarker tool on the map and then clicking on the map; this will select the region upstream of the selected point.
This PR also removes drawing the upstream stream network on the map. We aren't get doing meaningful visualization with it yet, and people found it distractingly busy, unfortunately.
Demo here.
I will lint changed files after review.
resolve #49 resolve #2 resolve #43