New Directions component isues

2076
4
05-09-2013 09:34 AM
by Anonymous User
Not applicable
Original User: raffialexanian

Hi all;

I love the Directions component and it's new feature in the new 3.3 API release. We came across a few issue I thought I would share here and see if anyone has some feedback.

Here is the web app link:
http://www.digitaleg.com/Digital_Egypt/CFC/Application/Web_App.html

1. Units:
We couldn't set the output units to Kilometers. The below code generates an error (-Access of possibly undefined property esriKilometers) The functions are called by the creationComplete event, but we also tried the directionsComplete event.

A - protected function directionsID_creationCompleteHandler(event:FlexEvent):void
{
     directionsID.routeOptions.directionsLengthUnits = esriKilometers;
}

<ns:Directions creationComplete="directionsID_creationCompleteHandler(event)"  id="directionsID" map="{FlexGlobals.topLevelApplication.myMap}" url="http://tela.roktech.net/arcgis/rest/services/DigitalEgypt/Networking/NAServer/Route"/>

We also tried
B - directionsID.routeOptions.directionsLengthUnits = "esriKilometers";
which throws an error at runtime when the directions popup is called.

C -directionsID.routeOptions.directionsLengthUnits(esriKilometers);
which doesnt compile and throws -Access of possibly undefined property esriKilometers.

2. Map on print:
The include map on print generates an undefines error at runtime, we called the function from both the creation complete and directionsComplete

directionsID.includeMapOnPrint = true;

- undefined    at com.esri.ags.components::Directions/set includeMapOnPrint()
    at com.esri.ags.components::Directions/set _80971302includeMapOnPrint()



3. Direction segments:
Somehow this new component generates many more roue segments than the old fashion Route coding, or so it seems to us.
[ATTACH=CONFIG]24166[/ATTACH]

In the above snapshots, more than 50 route segments are generated for 20 miles of driving. In the below image, you see how an ultra small change of angle corresponds to a separate route segment. Also note that there is no fork where the the segment is highlighted or any other type of intersections, and not even a street name change.

[ATTACH=CONFIG]24167[/ATTACH]


4. iPhone Reverse Directions button:
We are using FB 4.7 to compile an iPhone and iPad app. The iPad version works just fine in regards to this issue, only the iPhone suffers from it. The reverse directions button's hit area covers over the two arrows used to graphically select a start and endpoints. You possibly cannot click any of the two, unless you click add destination, which then removes the reverse directions button. How can we make this button invisible if that is the only solution?

[ATTACH=CONFIG]24168[/ATTACH]




5. Styling the component:
We really would find it very handy if someone can share how to style any of the components. You see in the iPhone snapshot above, the "get directions" button text is huge.

6. Resolution:
This could be something in our ArcGIS server, but just in case. The resolution of the generated route is very rough as seen i the below image:
[ATTACH=CONFIG]24169[/ATTACH]
Thanks;

R
0 Kudos
4 Replies
by Anonymous User
Not applicable
Original User: bjorn

Thanks for the feedback (and tweet) 🙂

I love the Directions component and it's new feature in the new 3.3 API release.
...
1. Units:
We couldn't set the output units to Kilometers.

Your http://tela.roktech.net/arcgis/rest/services/DigitalEgypt/Networking/NAServer/Route service only supports miles.
0 Kudos
SarthakDatt
Occasional Contributor III

2. Map on print:
The include map on print generates an undefines error at runtime, we called the function from both the creation complete and directionsComplete

directionsID.includeMapOnPrint = true;

- undefined at com.esri.ags.components:irections/set includeMapOnPrint()
at com.esri.ags.components:irections/set _80971302includeMapOnPrint()


There is an issue in the 3.3 version which makes this property unusable. As a workaround you can create your own copy of Directions component (override the getters and setters for includeMapOnPrint) and then use that class. Something like:

package
{
    import com.esri.ags.components.Directions;
    
    public class MyDirectionsComponent extends Directions
    {
        public function MyDirectionsComponent()
        {
            super();
        }
        
        private var _includeMapOnPrint:Boolean;
        
        /**
         * @override
         */ 
        override public function get includeMapOnPrint():Boolean
        {
            return _includeMapOnPrint;
        }        
        
        /**
         * @override
         */ 
        override public function set includeMapOnPrint(value:Boolean):void
        {
            _includeMapOnPrint = value;
        } 
    }
}



4. iPhone Reverse Directions button:
We are using FB 4.7 to compile an iPhone and iPad app. The iPad version works just fine in regards to this issue, only the iPhone suffers from it. The reverse directions button's hit area covers over the two arrows used to graphically select a start and endpoints. You possibly cannot click any of the two, unless you click add destination, which then removes the reverse directions button. How can we make this button invisible if that is the only solution?

5. Styling the component:
We really would find it very handy if someone can share how to style any of the components. You see in the iPhone snapshot above, the "get directions" button text is huge.


You should be able to achieve both by creating a custom skin.
0 Kudos
by Anonymous User
Not applicable
Original User: raffialexanian

Thanks for the feedback (and tweet) 🙂


Your http://tela.roktech.net/arcgis/rest/services/DigitalEgypt/Networking/NAServer/Route service only supports miles.


Got that, thanks a lot 🙂
0 Kudos
raffia
by
New Contributor II


You should be able to achieve both by creating a custom skin.


Thank you for the reply. This line "This component uses skins made up of skin parts. Do not set the skin parts directly. The component's skin sets the skin parts." is just confusing me a little, so I thought there is like a template for the CSS somewhere.
0 Kudos