Select to view content in your preferred language

Flex api 3 Implicit coercion of a value with static type

701
2
06-06-2012 07:52 AM
brianwilson1
New Contributor
I am attempting to use the Routing widget in flexviewer 3.0 prerelease and keep having the same errors pop up in the RouteWidget.mxml file. [ATTACH=CONFIG]14973[/ATTACH]
The above image shows what I see in flash builder.  The widget will display when the application is built, but when I select a location on the map for geocoding, I get this error
ReferenceError: Error #1065: Variable com.esri.ags.utils::JSON is not defined.
at com.esri.ags.tasks::Locator/locationToAddress()
at widgets.Route::RouteWidget/AddRouteClick()
at com.esri.viewer.managers::MapManager/drawEndHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at com.esri.ags.tools::DrawTool/map_clickFirstHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()
at com.esri.ags::Map/dispatchMapMouseEvent()
at com.esri.ags::Map/mouseUpHandler()

I have been able to take the compiled widget and plug it into flexviewer 2.5 so I believe this to be a change between flex 2.5 and 3.0.
Any insight on this will be much appreciated.  Thanks,
Tags (2)
0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus
Brian,

   This is the Flex API forum and you should post Flex Viewer and or widget questions to the Flex Viewer forum.

http://forums.arcgis.com/forums/111-ArcGIS-Viewer-for-Flex

As far as my Route Widget. It will be Flex Viewer 3.0 compatible when the Flex API and Viewer are finalized (Currently they are only in pre-release. I have been doing holistic testing with the API team and can say there are several changes from 2.5 to 3.0 final and you should not waste your time attempting to update this widget.

All my widgets will be 3.0 compatible when 3.0 is final.

Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow the steps as shown in the below graphic:
0 Kudos
brianwilson1
New Contributor
Great, I look forward to being able to use this widget in my viewer. Thank you
0 Kudos