I used the GeoRSS sample code (mxml and as files) to create a widget to use in the flex viewer. core modifications included converting from s:Application to viewer:BaseWidget. The widget compiles and executes. I have seen the georss.result ArrayCollection populate in the debugger but I do not see the symbols display on the map.
I have tried moving this line <esri:GraphicsLayer graphicProvider="{georss.result}"/> in mxml sections but only see it execute during widget startup. I have also been experimenting in the control and action script and have not been successful. Any ideas on what I need to do to get the defined Geo data points visible?
John, any specific reason why you're not using the out-of-the-box GeoRSS Widget?
Even if you don't want to use it, it might be a better starting point for your own custom georss widget than the API sample....
-Bjorn
Bjorn, Training mostly. I a developer new to flex/ArcGIS coming into an existing project. I am going to create a widget to interact with with a service performing a spatial intersection and will need to plot the results and show hover info boxes; I thought the GeoRSS widget would be a good example to prepare me for the task. I attached my mxml file (in its current state) for your review. I'm hoping its something simple I modified incorrectly and just don't understand the impact.
The viewer application already has a map. So you shouldn't add <esri:Map ...> in your widget.
In the Developer Guide, there is a page called Create your own widget On that page the following two sections might be useful: * If your widget needs to get hold of the map... * If your widget wants to add a graphics layer.
Thanks Bjorn. After re-reading the section and processing your comment I realized I needed to add the layer to the map explicitly. I have it working now as a viewer:BaseWidget. Required changes included: adding a complete callback on the GeoRSSProvider to add the results layer to the map. Moving the GraphicLayer GraphicProvider statement to the definition block and adding an id to the statement to be able to add the layer to the map.
<samples:GeoRSSProvider id="georss" error="onError(event as flash.events.ErrorEvent)" complete="onComplete(event as flash.events.Event)"/> <esri:GraphicsLayer id="georssResult" name="GeoRSS Feed" graphicProvider="{georss.result}"/>
I attached the cleaned-up mxml file for your review.