Select to view content in your preferred language

Could not resolve <esri:RouteParameters>to a component implementation

584
1
05-06-2011 07:44 AM
JosephBusemeyer
Deactivated User
I have loaded an ESRI Directions Widget and I am getting the following errors:

Could not resolve <esri:RouteParameters>to a component implementation
Could not resolve <esri:RouteTask>to a component implementation


Here is the code i am using:

<BaseWidget       xmlns    ="com.esri.solutions.flexviewer.*"
   xmlns:esri   ="http://www.esri.com/2008/ags"
   xmlns:mx   ="http://www.adobe.com/2006/mxml"
   xmlns:mxeffects  ="com.adobe.ac.mxeffects.*"
   xmlns:widgets  ="com.esri.solutions.esa.widgets.*"
   x     ="600"
   y     ="300" 
   widgetConfigLoaded ="init()">


        <esri:RouteTask id="routeTask"
        concurrency="last"
        fault="faultHandler(event)"
        requestTimeout="30"
        showBusyCursor="true"
        solveComplete="solveCompleteHandler(event)"
        url="http://tasks.arcgisonline.com/ArcGIS/rest/services/NetworkAnalysis/ESRI_Route_NA/NAServer/Route"
    />

        <esri:RouteParameters id="routeParams" 
        stops="{stops}"
        returnDirections="true"
        directionsLengthUnits="{directionlengthunits}"
        impedanceAttribute = "Time"
        preserveFirstStop = "true"
        preserveLastStop = "false"
        returnStops="true"
        findBestSequence = "{Best_Sequence.selected}"
        outSpatialReference="{map.spatialReference}"
  barriers="{barriers}"/>


Any help would be greatly appreciated.  Thanks.
Tags (2)
0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Emeritus
Joe,

   Both of them need to be in a fx declarations block and the name spaces are wrong.

xmlns:supportClasses="com.esri.ags.tasks.supportClasses.*"
xmlns:tasks="com.esri.ags.tasks.*"

<fx:Declarations>
<tasks:RouteTask id="routeTask"
concurrency="last"
fault="faultHandler(event)"
requestTimeout="30"
showBusyCursor="true"
solveComplete="solveCompleteHandler(event)"
url="http://tasks.arcgisonline.com/ArcGIS/rest/services/NetworkAnalysis/ESRI_Route_NA/NAServer/Route"
/>
<supportClasses:RouteParameters id="routeParams"
stops="{stops}"
returnDirections="true"
directionsLengthUnits="{directionlengthunits}"
impedanceAttribute = "Time"
preserveFirstStop = "true"
preserveLastStop = "false"
returnStops="true"
findBestSequence = "{Best_Sequence.selected}"
outSpatialReference="{map.spatialReference}"
barriers="{barriers}"/>
</fx:Declarations>
0 Kudos