InfoWindowRenderer, LabelDataRenderer Question

1124
0
06-18-2014 02:57 PM
JohnRitsko
New Contributor III
So here is my question that I need help with.

When a user clicks on a FeatureLayer of Bus Stops I have an infoWindowRenderer with a LabelDataRenderer that shows some information about the stop such as Stop Number, Stop Name, and which Route services that particular Stop.  I can have multiple stops at the same point in space that have different Bus Routes that stop there.  Currently when I click on it in debug version you can see the toggle arrows on top that allow you to move through the stops at that point.

This is what it currently shows:

[ATTACH=CONFIG]34715[/ATTACH]

What I would like to do is figure out which stops are there and show the list of Routes as shown below:

Bus Stop: 999
Stop Name: Horizon @ Boulder
Routes Serviced:
101
102
103
etc.

Each Stop has a different Route associated with it and I was looking and looking on how to try and create an array that I could them

Here is what I currently have:
<esri:FeatureLayer id="busLayer" name="Stop on Transit Route"
    mode="selection"
    buttonMode="true"
    outFields="[stopNumber, stopName, Route]" 
    url="xxxxxxxx">
  <esri:infoWindowRenderer>
   <fx:Component>
    <esri:LabelDataRenderer label="Bus Stop">
     <fx:Script>
     <![CDATA[
      import flash.sampler.NewObjectSample;
      import mx.controls.Text;
      protected function clickHandler(event:MouseEvent):void {

      var busStopLink:String = "http://rtcws.rtcsnv.com/mobile/geoRoutes.cfm?bsid=";
      var stopNumber:String = data.stopNumber;
      var urlString:String = busStopLink + stopNumber;
      var urlReq:URLRequest = new URLRequest(urlString);
      navigateToURL(urlReq, "_blank"); }
      ]]>
     </fx:Script>
     <s:VGroup paddingBottom="5"  
        paddingLeft="5"
        paddingRight="5"
        paddingTop="5">
      
      <s:Label text="Stop Number : {data.stopNumber}" 
                                                        click="clickHandler(event)" 
                                                        textDecoration="underline" 
                                                         buttonMode="true" 
                                                         toolTip="Click Here to Check Bus Location."/>
        <s:Label text="Stop Name   : {data.stopName}"/>
        <s:Label text="Route Number: {data.Route}"/> // Not what I want....

                                                              //  Array of ROUTE NUMBERS Would Go Here in One Window
                                                              //  While (len of selected stops != 0) {
                                                              //  "Route: " + array      ?????

    </s:VGroup>
   </esri:LabelDataRenderer>
  </fx:Component>
 </esri:infoWindowRenderer>  
</esri:FeatureLayer> 
Tags (2)
0 Kudos
0 Replies