Working with Feature Layers
I am working on a crime search workflow. I have a feature layer loaded with crime data points 275,000+. The feature layer is added into my application and I have set its Query Mode to "Selection Only" because I only want to add features into the map that are selected through user input i.e. date range, crime type, distance from address).
Here is the issue: I can query the layer and return results but the icons/points only appear in the map when they are clicked in the attribute panel of the map. The second image demonstrates this behavior. I have query results in the map but nothing in my map. (Note, those black squares are gates surrounding a large chemical company not crime locations). I find this behavior strange because the last step in my workflow I run a SelectFeatures and pass in my feature Set result from my query. So wouldn't all of these features be selected in the map??
If anyone has any thoughts or ideas it would really help me out. I am kind of stuck!!
_img_ alt="Show how user inputs search criteria" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=906600000004IQk&feoid=Body&refid=0EM600000004Xqs" _/_img__img_ alt="Displays the search results in the map table" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=906600000004IQk&feoid=Body&refid=0EM600000004Xqx" _/_img__img_ alt="Shows odd behavior of feature layer" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=906600000004IQk&feoid=Body&refid=0EM600000004Xr2" _/_img_
0
-
Hi Daniel,
If you are selecting features through a workflow using the 'Select Features' activity. By default, the pushpins are turned off so that is why none of them show the pushpins nor are highlighted. If you want to show the pushpins, you need set the 'show pushpins' parameter to true in the properties panel on the right-hand side of the 'Select Features' activities. Otherwise, it just lists them in the result pane/table.
If you want the selected features to be highlighted, then you will need to:
1. Create a highlight layer
2. Set the highlight layer to active
3. highlight the feature set
All this is done through the 'run external command' activity. There is an example workflow here demonstrating how it is done: https://support.geocortex.com/essentialsGSCCodeGallery?sub-nav=codegall&main-nav=essentials&#
I hope this helps.
Carmen0 -
Here is a developers sample from ESRI. This is how I expected this workflow to operate.
https://developers.arcgis.com/javascript/jssamples/query_buffer.html0 -
Carmen
Thank you for the reply. I really appreciate it. I tried the highlighEsriFeatureSet but it didn't do what I needed it to do. I was able to get dots and pushpins to appear which is great. But I need the symbology from the feature layer to appear. I attached an example image from my existing ESRI JavaScript crime application that I am attempting to convert into a GeoCortex site. I query the crime feature layer which selects certain records, and only those records appear in the map. I am essentially recreating the same workflow with GeoCortex but the results are different??
_img_ alt="User-added image" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=907600000004FWT&feoid=Body&refid=0EM600000004Xu6" _/_img_
For what its worth. Here is a link to my existing js site to help better understand what I am trying to accomplish. Just go to it and press the blue search button on the right.
http://gis2.midland-mi.org/police/default.htm
thanks again for any help / advice / anything....!!!0 -
Daniel,
if you are using GE 3.6 version and above, how about using 'Set Layer Definition' which will change 'Definition Expression' on http://gis6.midland-mi.org/ArcGIS/rest/services/PublicSafety/MapServer/0 to filter out which feature will be shown on the map?
1) set your Definition Expression not to show any features
2) on your workflow, add 'Set Layer Definition' with the input as your WhereClause you constructed for Query with Search input
wish this help you out.
Munhwan0 -
COOL!! That just about did everything I needed :) . All I have left to figure out (if its even possible) is how to pass my buffer geometry into my definition query. Thanks for the help!!
_img_ alt="User-added image" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=907600000004FYF&feoid=Body&refid=0EM600000004XvT" _/_img_0 -
In case anyone runs into the same problem. I found a post on the forum that explains a perfect solution All credit goes to Nico.
Nico Burgerhart
I did this the following way
Query task activity with a administrative and spatial selection (Where and Geometry properties)
Get Object IDs activity to get the OIDs
Create a where clause from the OIDs with an Assign activity: string.Format("OBJECTID IN ({0})",String.Join(",", CType(oids, IList(Of int32)).Select(Function(value) value.ToString )))
Set layer definition with with the where clause as definition0 -
Thank you. 0 -
Hi Daniel,
I took a look at your website and that is very similiar to something I am trying to create. I would like my users to select a date range and only those features within that range appear on the map. Would it be possible to share your workflow? I feel like I"m close but have been unable to get the features selected in the map. Thank you!0 -
Hello Daniel,
I am in the same position as Lisa and I would also greatly benefit from your workflow if it is possible for you to share. Thanks!0 -
Lisa & Ashley
Let me see what I can send you. It looks like I completly forgot to respond to Lisa on this back in July. Sorry Lisa if you see this reponse!
Dan0 -
I can't post my XAML file because I keep receiving an error. Something about you can't have more than 32000 characters. Just shoot me an email and I will reply back with the code.
Dan
dbrumm@midland-mi.org0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
11 Kommentare