Selection Persists / Cannot read property 'hasOwnProperty' of undefined
I am creating two workflows, one to clip wetlands and one to clip drain ROW from parcels. The resulting areas are highlighted on the map. When you re-run the workflow, it will remove previous highlights. There is also a Remove Clipping Highlights tool to remove the last highlight. The tools are on the I want to... menu on my site (https://gisappsecure.ewashtenaw.org/Html5Viewer_2_7/Index.html?configBase=http://arcserver2.ewashtenaw.org/Geocortex/Essentials/REST/sites/WashCoGIStest/viewers/testing27/virtualdirectory/Resources/Config/Default).
The two clipping workflows are the same, just swapping out which layer I'm clipping and renaming the variables. The issue I am seeing is that for some reason, the Wetlands layer allows you to select the result in the left pane, which highlights it on the map in yellow. I cannot figure out how to remove this yellow selection. The Drains ROW resulting area cannot be selected from the left pane. However, this is probably not supposed to be the case, when clicking on the Drain ROW result I get console errors of "Uncaught TypeError: Cannot read property 'hasOwnProperty' of undefined" from Mapping.Infrastructure.js.
I would love to know what the difference is between the two layers. How can I make Wetlands unselectable in the results, or remove the yellow selection from the map? I feel like I've tried every combination of "ClearHighlights", "ClearDefaultHighlights", "ClearSelection", and related commands. Any other ideas? We are on HTML Viewer 2.7, Geocortex Essentials 4.6.3.24.
0
-
Hi Chelsea,
How are you adding the highlights in the workflow? Are you using the Run External Command activities to create a highlight layer and then highlighting the features? If that is the case, then you should try removing the highlight layer using this command: "RemoveHighlightLayer" and then specifying the highlight layer name in the command parameter.
If you did not include any "CreateHighlightLayer" commands in your workflow, then that highlighting comes from the viewer itself. The features are automatically highlighted and zoomed to when you select on a result from the Result Pane. The highlight should remove itself automatically if you click away. However, I did take a look at your viewer and it looks like there you made a few modifications to the Desktop.json file. Did you accidently removed the clear highlight command from there?
If you click a result and it does not zoom, that means the viewer cannot find its geometry. I'm not sure what that uncaught typeerror means but it might be worth filing a support case to have that looked at.
I hope this helps.
Carmen0 -
Thanks for taking a look at my site Carmen!
Right after SelectFeatures I have a Parallel with RunExternalCommands of "CreateHighlightLayer", "SetActiveHighlightLayer", "SetHighlightBorderColor" (blue), "SetHighlightFillColor" (blue), "HighlightEsriFeatureSet", then border and fill colors again to change it back to the default yellow. The workflow starts out with "RemoveHighlightLayer", so even if you click on the result in the pane to highlight it in yellow, the next time you run the tool, you can see that the blue layer is actually removed from underneath. That leads me to believe that the yellow, like you mentioned, that it is separate selection/highlight.
I normally do clip out modules we don't use from the .jsons, however this site is just a test. What kind of modifications were you seeing? I just added in our proxyuri and geometryserviceurl, but it didn't help.
I'm not sure why it would be finding the geometry of one but not the other, they're on the same map service.
I'll probably have to file a support case, or wait to see if it's fixed in HTML 2.8.0 -
Hi Chelsea,
Did you get anywhere with this log from January?
I'm encountering a silimar error where a selected parcel remains selected and queriable even after I've manually closed the selection box and the highlighting has switched off.
I'm trying to find the "ClearHighlights", "ClearDefaultHighlights", "ClearSelection" commands you mention too and cannot see them in the activities list are they originating from somewhere else?
Thanks
Greg0 -
Hi Greg,
Unfortunately, I didn't solve that issue, but I've since upgraded to 2.8 and with the new highlighting and selections, it hasn't been a problem any more. Those commands I mentioned are put into a Run External Command activity's top slot: Command Name. Just keep the strings in their quotes, like "ClearSelection". You can find more information about these commands here: http://gedemo.geocortex.com/SamplesViewer/index.html#commands.Highlighting.ClearHighlights One similar thing I noticed with the new 2.8 viewer, was that I think the selection still persisted even when I used the remove features from selection option now on the tool bar. When I switched (in Geocortex Manager) to only display highlighted features on the current results page, it worked as intended.
Let me know if you get your workflow to work,
Chelsea0
Please sign in to leave a comment.
Comments
4 comments