Closed shodge17 closed 4 years ago
Find this line at or near 1897: getGeometry(countyBoundariesURL + '2', 'name', event.target.value.replace(/[\s.-]/g, ''))
I think if you change the 2 to a 1 things will work, It looks like you are using an intersect function to find all ecls intersecting the county boundary. the number 2 boundary layer is an "exact" shoreline. The ecls were purposely drawn in the Gulf and Atlantic for clarity and thus mostly do not intersect with the true coastline.
This query could also be simplified by making it a text like query, Each ecl has a field called county that could be used. you would have to do something like uppercase the query field and the layer field and remove spaces and "."s to get them to accurately match. Here are all the county names. "BAY" "BAY" "BREVARD" "BREVARD" "BREVARD" "BREVARD" "BROWARD" "BROWARD" "BROWARD" "BROWARD" "CHARLOTTE" "COLLIER" "COLLIER" "COLLIER" "COLLIER" "COLLIER" "COLLIER" "COLLIER" "DADE" "DADE" "DADE" "DUVAL" "INDIAN RIVER" "LEE" "LEE" "LEE" "LEE" "LEE" "LEE" "LEE" "MANATEE" "MANATEE" "MANATEE" "MANATEE" "MARTIN" "MARTIN" "NASSAU" "NASSAU" "Okaloosa" "PALMBEACH" "PALMBEACH" "PALMBEACH" "PALMBEACH" "PALMBEACH" "PINELLAS" "PINELLAS" "PINELLAS" "PINELLAS" "PINELLAS" "PINELLAS" "PINELLAS" "PINELLAS" "PINELLAS" "PINELLAS" "PINELLAS" "PINELLAS" "SARASOTA" "SARASOTA" "SARASOTA" "ST JOHNS" "ST LUCIE" "Walton"
What I did was build the possible options based on the list above (already in place). Then, when I made a choice, I made another query to the ECL layer that returns the proper results back. You're right, some of those intersects would not give correct results anyway. The ECL layer has a county field anyways, so it makes sense to call it directly instead of trying to do an intersect.
There are some problems with this solution, beacause the unionGeometries function creates empty elements in the information panel. For example, Pinellas county has 12 ECL's if you query with the map service directly, but 15 points will be returns with the way it is currently. Thus, we need either fix within the unionGeometries function (which could interfere with other pieces that use unionGeometry()) or some up with another solution or by using one of the other querytask templates.
Perhaps a generic querytask could be created in order to give us the most flexibility and maybe even decrease the amount of querytask functions in the code today.
Don't think you are going to be able to see the pic above but it is an example of a section of ECLs in Pinellas county. When two ECLs abut each other we put a short line perpendicular to the two ECLs showing where one ends and the other begins. These little segments do not have a county associated with them.
I fixed one ECL in Pinellas county that was missing the county name. You should now get 13 hits. if your query is WHERE county = 'PINELLAS' then you should be good.
To be double sure your query could be WHERE county = 'Pinellas' AND mhw IS NOT NULL
Remember too that the county names are all over the place. Be sure to get rid of spaces and periods and uppercase (or lowercase) both fields
I think this would partially fix it, but I think the union that we were performing is creating orphan portions of the ECL lines. I haven't had a chance to test your fix yet, but I'll jump on this at about 6pm today.
I think I got things working correctly now. Expanded the getGeometry functionality a bit, and was able to drop the union and intersect. The county name is an attribute of the ECL layer, so we can just get all of the info we need from that single query inside of getGeometry()
Here is one thing to fix. If a user clicks on one of those perpendicular lines that is not part of an ECL we should not include any results in the info panel. An easy way to filter this out is to look at the mhw value. If it is null or blank or something other than a number do NOT show the results. (easy to find these if you look in Pinellas county)
Otherwise this is ready to go.
Are you saying something like this should not be shown after clicking on that perpendicular ECL line?
Correct.
Okay, I gotcha. However, I think that is a separate issue of how the infopanel gets populated on a click versus how the info panel gets populated on a ECL data query dropdown selection. I can open up an additional issue to address it.
Aside from the issue you pointed out above, it sounds like the bug has been fixed.
You are right. this one is done -- new ticket for the identify
merged into master
Try this 1) choose data query 2) layer = Erosion Control Line 3) Pick county = ST JOHNS 4) Submit Results shows 89 hits. This is true on Production and Master. Now before you do anything else, pick Bay county and submit. Nothing happens. I think this may have something to do with two word counites This is true on Production and Master Note that Okaloosa and Walton county names in the pick list are in lower case. Walton county selection works. Okaloosa query does not work.