Original User: alnesbit
Robert and everyone else,
Ok, I have started to look more at the code side of the flex viewer. I also listened to all of the training videos I could find, including 2 from the 2010 Developer Summit meeting in March. I need to make my own widget so I figured I would need to start with the LocateWidget and change it.
I have learned a lot but I'm afraid I'm still a long way from figuring out how to code this.
I have learned that the FindTask is a non spatial search, the QueryTask is done on one feature in a service and is a spatial query using geometry, I will need to use binding {}, returnGeometry="false" is used to not show the results of a query, chaining is what I will need to do to use the results of one for the next query. I was looking at the "RouteDirections.mxml" sample because it takes 2 addresses, sends them to the geocoder, gets the points back and then sends the route. I need to do part of that so I thought I could learn something and use that code but this is still a bit over my head.
The LocateWidget confuses me. I was comparing it to the LocatorTask.mxml sample and in that sample you can give the textboxes default values, like text="redlands" but I can't find where I could do that in the LocateWidget because it seems to be set up differently.
I'm pretty clear on the steps, I'm just not clear on how to code it! ha. I need to get the xy location from the address that the user selects in the LocateWidget. I need to turn that xy location into a mappoint. Using that mappoint I need to do a QueryTask with the precincts poly layer using esriSpatialRelIntersects. I will then get the name of the polling location from a field within the precinct poly feature class. Then I need to do a FindTask to query and select the same polling place name in the polling place point feature class and then I can zoom to the selected point.
I know there is another sample out there for the last query, but I'm stuck at the beginning. Does anyone have any hints or other places I could go to figure this out?
Will be cool when it works. Thanks in advance,