Select to view content in your preferred language

Google Routing Widget for the Flexviewer

2417
27
03-28-2011 07:05 AM
andrewj_ca
Frequent Contributor
I've just posted a widget for leveraging Google's directions api.  Download and enjoy, both compiled and uncompiled versions have been supplied.  I've posted version 1 of the widget to get some comments and maybe see what additional functionality people may want.  I have my own ideas but I'd like to get some feedback.  Please remember to rate the widget if you like what you see.

http://www.arcgis.com/home/item.html?id=20fc9fd1c43c45c5a1dbf8b4f03bee79
Tags (2)
0 Kudos
27 Replies
anjelinaponker
Emerging Contributor
Hi
I tested it, but the widget just show text results. the rout don't plot over the base map.




I've just posted a widget for leveraging Google's directions api.  Download and enjoy, both compiled and uncompiled versions have been supplied.  I've posted version 1 of the widget to get some comments and maybe see what additional functionality people may want.  I have my own ideas but I'd like to get some feedback.  Please remember to rate the widget if you like what you see.

http://www.arcgis.com/home/item.html?id=20fc9fd1c43c45c5a1dbf8b4f03bee79
0 Kudos
CoryHines
Deactivated User
Hi Andrew,

Did this widget get removed from the arcgis site?  It asks for a login but then says I'm not authorized to view the resource.  Just curious, I actually already have everything working except the zoom to route feature.

Thanks for any insight you might have.

Cory


Thanks Mike Don't forget to rate it. I will have an update after I get a few more comments.  I do have zoom to route working.  I will be adding from and to points and tooltips along the route.
0 Kudos
ShahSani
Deactivated User
I'm trying run the widgets in 3.5 but i am running into an error on geometryService.project([p2 as Geometry], map.spatialReference);

Implicit coercion of a value of type com.esri.ags:SpatialReference to an unrelated type com.esri.ags.tasks.supportClasses:ProjectParameters. GoogleRoutingWidget.mxml

....can someone help me out please.
0 Kudos
BjornSvensson
Esri Regular Contributor
I'm trying run the widgets in 3.5 but i am running into an error on geometryService.project([p2 as Geometry], map.spatialReference);

Implicit coercion of a value of type com.esri.ags:SpatialReference to an unrelated type com.esri.ags.tasks.supportClasses:ProjectParameters. GoogleRoutingWidget.mxml


Sounds like maybe you are using a widget compiled for 2.x with 3.x.  Where did you download this widget (the item mentioned above does not seem accessible any more)?
0 Kudos
ShahSani
Deactivated User
Yups, i'm using a widget compiled for 2.x with 3.5. just try my luck because i compiled social media widget 2.2 for 3.5 and it's working.I'm download the widget in 2011 (not accessible any more).

Google Routing Widget
0 Kudos
BjornSvensson
Esri Regular Contributor
If you want to upgrade 2.x code to 3.x, the best starting point (in addition to trying and then interpret error messages), is probably
https://developers.arcgis.com/en/flex/guide/migrating-to-3-x.htm

From that page and related to your error:
On the GeometryService, the input parameter for the project() method is now projectParameters instead of geometries. This also allows for specifying datum transformations (requires ArcGIS 10.1 for Server).
0 Kudos
JanieGoddard
Frequent Contributor
Be aware that the old routetasksolver web service is being retired on 12/31/2013.

The North American and European route solvers will be gone after 12/31/2013 per:
http://downloads.esri.com/support/product%20life%20cycle/online_gis/ArcGISOnlineServ_PLC.pdf

Here is the new Route Solver:
http://www.arcgis.com/home/item.html?id=1feb41652c5c4bd2ba5c60df2b4ea2c4

Be aware:
This service is available for users with an ArcGIS Online organizational subscription.  To access this map service, you'll need to sign in with an account that is a member of an organizational subscription.

Heads up!
Janie
0 Kudos
JanieGoddard
Frequent Contributor
The new route widget in the above reply does not work in flex viewer 3.0 compiled version. I had to upgrade to flex viewer 3.1 compiled version. Now once the user enters the two addresses, it pops up a signon box. The user must sign in with a userid and password that is a member of an ArcGIS Online organizational subscription.
Good Luck.
Janie
0 Kudos