I've been stepping so far away from Flex maps lately due to the Web App Builder and Javascript maps. Now I've got a map that management wants me to keep in Flex right now and add a spatial query element.
I have Council Districts (on one layer) and Incidents (each year has it's own layer). I need to create a way for Fire to query incidents by Council District. What the best widget for this?
Solved! Go to Solution.
Brian,
Here is what I got working with your data:
<value prompt="1/1/2014" isvaluerequired="true" autosubmit="true">ALARMDATE >= date'[value] 00:00:00'</value>
Brian,
This is what the eSearch is designed for
Brain,
If I am reading your question correctly you want to perform a spatial query i.e. select the points from one layer that intersect with a polygon from another layer, have a look at the Roberts e-search widget that allows you to perform spatial searches from the results of another search:
http://www.arcgis.com/home/item.html?id=5d4995ccdb99429185dfd8d8fb2a513e
Regards
Anthony
Then I guess my experience with the eSearch widget is incomplete because I've never tried to do a spatial query like this with it. Is there a good example somewhere?
Brain,
Here are some steps to follow in the Live Preview Site
Ok...
I see how this could work. But how do I configure this IN the widget? Is there an example? I can't wrap my head around the XML necessary to get this rolling. One working example would be perfect. I am able to deconstruct from other REST services and such... cut-n-paste would do it.
Anyone?
Brian,
I think that you are over thinking this. You just add both layers that you are interested in searching (Council Districts and Incidents) like you would any other search layer and the only difference is on Incidents layer you make sure that the spatialsearchlayer is set to true (this is what will add "Incidents" to the Spatial Search drop down list):
<spatialsearchlayer>true</spatialsearchlayer>
*facepalm*
Yup. Overthinking. My co-worker claims I do that ALOT. (I think he's right)
Of course now I'm having issues with a date search inside of one of the REST services.
I'm using...
<value prompt="Example: 1/1/2014-12:56" isvaluerequired="true">(ALARMDATE) = trime('[value]')</value>
And getting squat. I've used "ALARMDATE = '[value]'" and (ALARMDATE} LIKE ('%[value]%') and nothing is working... I'm not certain on the DATE requirements for fields in the eSearch widget so it's probably something simple... any ideas?
Brain,
There is an example of a date search in the eSearchWidget.xml
<value prompt="Example: 2012/04/16">datetime >= '[value] 00:00:00'</value>
I had already tried that and it wouldn't work with my date field. I've tried a few variants on the field and finally just gave up. I don't know why it wouldn't work.