{"id":300452,"date":"2018-08-17T16:12:31","date_gmt":"2018-08-17T23:12:31","guid":{"rendered":"http:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=300452"},"modified":"2018-08-30T10:29:38","modified_gmt":"2018-08-30T17:29:38","slug":"migrating-web-apps-from-google-to-arcgis-directions-and-routing","status":"publish","type":"blog","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/announcements\/migrating-web-apps-from-google-to-arcgis-directions-and-routing","title":{"rendered":"Migrating Web Apps from Google to ArcGIS: Directions and Routing"},"author":3801,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"_searchwp_excluded":""},"categories":[37101],"tags":[27491],"industry":[],"product":[36831],"class_list":["post-300452","blog","type-blog","status-publish","format-standard","hentry","category-announcements","tag-jsapi4","product-js-api-arcgis"],"acf":{"short_description":"This post is about migrating your routing and directions app built with the Google Maps JavaScript API to the ArcGIS API for JavaScript","flexible_content":[{"acf_fc_layout":"content","content":"<p>This is the second post in a blog series covering the basic topics pertinent when migrating your app built with the Google Maps JavaScript API to the ArcGIS API for JavaScript (JavaScript API). The series covers the following topics:<\/p>\n<ul>\n<li><a href=\"http:\/\/esriurl.com\/fromgoogletoesrijs\">Getting Started: Displaying a marker with a popup<\/a><\/li>\n<li>Getting directions and displaying a route<\/li>\n<li><a href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/announcements\/migrating-web-apps-from-google-to-arcgis-searching-and-geocoding\/\">Search and Geocoding<\/a><\/li>\n<li><a href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/announcements\/migrating-web-apps-from-google-to-arcgis-adding-a-shape\/\">Adding a shape<\/a><\/li>\n<\/ul>\n<p>In this blog, we\u2019ll look at how directions and routing is implemented with Google, and how it is done with ArcGIS.<\/p>\n<h3>Getting started<\/h3>\n<p>To get started with ArcGIS, sign up for the <a href=\"https:\/\/developers.arcgis.com\/sign-up\">ArcGIS Developer Program<\/a> at no cost. This account will get you access to the JavaScript API, 1,000,000 basemaps and geosearch transactions per month, credits towards routing, unlimited apps deployed, and quite a bit more for free. More information can be found in the first <a href=\"http:\/\/esriurl.com\/fromgoogletoesrijs\">blog<\/a> of this series.<\/p>\n<p>Once you have signed up for your Developer account, create an <a href=\"https:\/\/developers.arcgis.com\/labs\/arcgisonline\/set-up-authenticated-services\/\">ArcGIS Online hosted proxy<\/a> for routing which you\u2019ll use when you build your app.<\/p>\n<h3>Create a basic mapping app<\/h3>\n<p>Check out the <a href=\"http:\/\/esriurl.com\/fromgoogletoesrijs\">Getting Started blog<\/a>\u00a0for an overview on how to load the JavaScript API and create a map.<\/p>\n<h3>Displaying directions<\/h3>\n<p>Now let\u2019s look at how you can create and display directions and a route between two predefined locations.<\/p>\n<p>With Google, it is done like this:<\/p>\n<pre><code style=\"display: block; overflow-x: auto; padding: 0.5em; color: #333; background: #f8f8f8; -webkit-text-size-adjust: none;\">\r\n<span style=\"color: #333; font-weight: bold;\">const<\/span> map = <span style=\"color: #333; font-weight: bold;\">new<\/span> google.maps.Map(<span style=\"color: #0086b3;\">document<\/span>.getElementById(\"<span style=\"color: #d14;\">map\"<\/span>), {\r\n  mapTypeId: \"roadmap\",\r\n  center: {lat: <span style=\"color: #008080;\">39.8367<\/span>, lng: <span style=\"color: #008080;\">105.0372<\/span>},\r\n  zoom: <span style=\"color: #008080;\">10<\/span>\r\n});\r\n\r\n<span style=\"color: #333; font-weight: bold;\">const<\/span> directionsService = <span style=\"color: #333; font-weight: bold;\">new<\/span> google.maps.DirectionsService;\r\n<span style=\"color: #333; font-weight: bold;\">const<\/span> directionsDisplay = <span style=\"color: #333; font-weight: bold;\">new<\/span> google.maps.DirectionsRenderer;\r\ndirectionsDisplay.setMap(map);\r\ndirectionsService.route({\r\n  origin: \"Denver, CO\",\r\n  destination: \"Boulder, CO\",\r\n  travelMode: \"<span style=\"color: #d14;\">DRIVING\"<\/span>\r\n}, <span style=\"color: #333; font-weight: bold;\">function<\/span>(response, status) {\r\n  <span style=\"color: #333; font-weight: bold;\">if<\/span> (status === \"<span style=\"color: #d14;\">OK\"<\/span>) {\r\n    directionsDisplay.setDirections(response);\r\n  }\r\n});\r\n<\/code><\/pre>\n<p>With ArcGIS you can <a href=\"#route-service-direct\">calculate directions between two predefined locations<\/a> or take advantage of the out of box <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-widgets-Directions.html\">Directions widget<\/a> which allows you to integrate a dynamic directions\/routing experience with just a few lines of code. The Directions widget allows you to:<\/p>\n<ul>\n<li>Route to one or more locations by searching for the origin and destination(s), or by clicking on the map<\/li>\n<li>Display the origin and destination marker(s)<\/li>\n<li>Calculate a route using <a href=\"http:\/\/www.arcgis.com\/home\/item.html?id=1feb41652c5c4bd2ba5c60df2b4ea2c4\">Esri World Route service<\/a> (or one that you have published with ArcGIS Server), and display it on the map<\/li>\n<li>Display turn by turn directions<\/li>\n<\/ul>\n<p>To use the widget, simply initialize it with the routeServiceUrl pointing to the ArcGIS Online hosted proxy that you created in the Getting Started step, and then add it to the View UI. The API has convenient <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/sample-code\/simple-ui\/index.html\">UI placement<\/a> tools and other goodies; the below code adds the widget in the top right corner.<\/p>\n<pre><code style=\"display: block; overflow-x: auto; padding: 0.5em; color: #333; background: #f8f8f8; -webkit-text-size-adjust: none;\">\r\n<span style=\"color: #0086b3;\">require<\/span>([\r\n  <span style=\"color: #d14;\">\"esri\/Map\"<\/span>,\r\n  <span style=\"color: #d14;\">\"esri\/views\/MapView\"<\/span>,\r\n  <span style=\"color: #d14;\">\"esri\/widgets\/Directions\"<\/span>\r\n], <span style=\"color: #333; font-weight: bold;\">function<\/span>(\r\n  Map,\r\n  MapView,\r\n  Directions) {\r\n\r\n  <span style=\"color: #333; font-weight: bold;\">const<\/span> map = <span style=\"color: #333; font-weight: bold;\">new<\/span> <span style=\"color: #0086b3;\">Map<\/span>({\r\n    basemap: <span style=\"color: #d14;\">\"streets-navigation-vector\"<\/span>\r\n  });\r\n\r\n  <span style=\"color: #333; font-weight: bold;\">const<\/span> view = <span style=\"color: #333; font-weight: bold;\">new<\/span> MapView({\r\n    container: <span style=\"color: #d14;\">\"viewDiv\"<\/span>,\r\n    map: map\r\n  });\r\n\r\n  <span style=\"color: #333; font-weight: bold;\">const<\/span> directionsWidget = <span style=\"color: #333; font-weight: bold;\">new<\/span> Directions({\r\n    view: view,\r\n    <span style=\"color: #998; font-style: italic;\">\/\/ Paste the hosted proxy URL here that you created previously<\/span>\r\n    routeServiceUrl: <span style=\"color: #d14;\">\"https:\/\/utility.arcgis.com\/usrsvcs\/appservices\/&lt;your-id&gt;\/rest\/services\/World\/Route\/NAServer\/Route_World\/\"<\/span>\r\n    });\r\n\r\n  <span style=\"color: #998; font-style: italic;\">\/\/ Add the Directions widget to the top right corner of the view<\/span>\r\n  view.ui.add(directionsWidget, {\r\n    position: <span style=\"color: #d14;\">\"top-right\"<\/span>\r\n  });\r\n});\r\n\r\n<\/code><\/pre>\n<p>This code is using the World Navigation basemap, but you can select from a wide variety of <a href=\"https:\/\/livingatlas.arcgis.com\/en\/browse\/#d=2&amp;categories=Basemaps:11111\">basemaps<\/a> such as the night streets map:<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":301992,"id":301992,"title":"directions_night2","filename":"directions_night2.png","filesize":155471,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/08\/directions_night2.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/announcements\/migrating-web-apps-from-google-to-arcgis-directions-and-routing\/directions_night2","alt":"","author":"4271","description":"","caption":"","name":"directions_night2","status":"inherit","uploaded_to":300452,"date":"2018-08-17 21:44:17","modified":"2018-08-17 21:44:17","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":1373,"height":660,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/08\/directions_night2.png","thumbnail-width":213,"thumbnail-height":102,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/08\/directions_night2.png","medium-width":464,"medium-height":223,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/08\/directions_night2.png","medium_large-width":768,"medium_large-height":369,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/08\/directions_night2.png","large-width":1373,"large-height":660,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/08\/directions_night2.png","1536x1536-width":1373,"1536x1536-height":660,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/08\/directions_night2.png","2048x2048-width":1373,"2048x2048-height":660,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/08\/directions_night2.png","card_image-width":826,"card_image-height":397,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/08\/directions_night2.png","wide_image-width":1373,"wide_image-height":660}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p><a name=\"route-service-direct\"><\/a><br \/>\nYou can play around with the directions widget using the SDK <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/sample-code\/widgets-directions\/index.html\">sample<\/a>.<\/p>\n<h3>Use the route service directly<\/h3>\n<p>You can also use the API\u2019s <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-tasks-RouteTask.html\">RouteTask<\/a> directly which finds routes between two or more locations and provides driving directions. RouteTask allows you to solve simple routing problems as well as complex ones that take into account multiple stops, barriers, and time windows. To build a simple experience that allows the user to find a route between two locations on the map, create graphics for the origin and destination and then use the RouteTask to calculate a route. The calculated route is then displayed on the map. Similar to the previous example, the ArcGIS Online hosted proxy URL is referenced in the RouteTask:<\/p>\n<pre><code style=\"display: block; overflow-x: auto; padding: 0.5em; color: #333; background: #f8f8f8; -webkit-text-size-adjust: none;\">\r\n<span style=\"color: #0086b3;\">require<\/span>([\r\n  <span style=\"color: #d14;\">\"esri\/Map\"<\/span>,\r\n  <span style=\"color: #d14;\">\"esri\/views\/MapView\"<\/span>,\r\n  <span style=\"color: #d14;\">\"esri\/Graphic\"<\/span>,\r\n  <span style=\"color: #d14;\">\"esri\/tasks\/RouteTask\"<\/span>,\r\n  <span style=\"color: #d14;\">\"esri\/tasks\/support\/RouteParameters\"<\/span>,\r\n  <span style=\"color: #d14;\">\"esri\/tasks\/support\/FeatureSet\"<\/span>\r\n], <span style=\"color: #333; font-weight: bold;\">function<\/span>(\r\n  Map, MapView, Graphic, RouteTask, RouteParameters, FeatureSet\r\n) {\r\n\r\n  <span style=\"color: #998; font-style: italic;\">\/\/ Point the URL to a valid route service<\/span>\r\n  <span style=\"color: #333; font-weight: bold;\">const<\/span> routeTask = <span style=\"color: #333; font-weight: bold;\">new<\/span> RouteTask({\r\n    url: <span style=\"color: #d14;\">\"https:\/\/utility.arcgis.com\/usrsvcs\/appservices\/&lt;your-id&gt;\/rest\/services\/World\/Route\/NAServer\/Route_World\/\"<\/span>\r\n  });\r\n\r\n  <span style=\"color: #333; font-weight: bold;\">const<\/span> map = <span style=\"color: #333; font-weight: bold;\">new<\/span> <span style=\"color: #0086b3;\">Map<\/span>({\r\n    basemap: <span style=\"color: #d14;\">\"streets-navigation-vector\"<\/span>\r\n  });\r\n\r\n  <span style=\"color: #333; font-weight: bold;\">const<\/span> view = <span style=\"color: #333; font-weight: bold;\">new<\/span> MapView({\r\n    container: <span style=\"color: #d14;\">\"viewDiv\"<\/span>,\r\n    map: map,\r\n    center: [-<span style=\"color: #008080;\">105.0372<\/span>, <span style=\"color: #008080;\">39.8367<\/span>],\r\n    zoom: <span style=\"color: #008080;\">10<\/span>\r\n  });\r\n\r\n  <span style=\"color: #333; font-weight: bold;\">const<\/span> origin = <span style=\"color: #333; font-weight: bold;\">new<\/span> Graphic({\r\n    symbol: {\r\n      type: <span style=\"color: #d14;\">\"simple-marker\"<\/span>,\r\n      color: <span style=\"color: #d14;\">\"cyan\"<\/span>\r\n    },\r\n    geometry: {\r\n      type: <span style=\"color: #d14;\">\"point\"<\/span>,\r\n      longitude: -<span style=\"color: #008080;\">104.9903<\/span>,\r\n      latitude: <span style=\"color: #008080;\">39.7392<\/span>\r\n    }\r\n  });\r\n\r\n  <span style=\"color: #333; font-weight: bold;\">const<\/span> destination = <span style=\"color: #333; font-weight: bold;\">new<\/span> Graphic({\r\n    symbol: {\r\n      type: <span style=\"color: #d14;\">\"simple-marker\"<\/span>,\r\n      color: <span style=\"color: #d14;\">\"yellow\"<\/span>\r\n    },\r\n    geometry: {\r\n      type: <span style=\"color: #d14;\">\"point\"<\/span>,\r\n      longitude: -<span style=\"color: #008080;\">105.2705<\/span>,\r\n      latitude: <span style=\"color: #008080;\">40.0150<\/span>\r\n    }\r\n  });\r\n\r\n  <span style=\"color: #333; font-weight: bold;\">const<\/span> route = [origin, destination];\r\n  view.graphics.addMany(route);\r\n\r\n  <span style=\"color: #333; font-weight: bold;\">const<\/span> routeParams = <span style=\"color: #333; font-weight: bold;\">new<\/span> RouteParameters({\r\n    stops: <span style=\"color: #333; font-weight: bold;\">new<\/span> FeatureSet({\r\n      features: route\r\n    })\r\n  });\r\n\r\n  routeTask.solve(routeParams).then(<span style=\"color: #333; font-weight: bold;\">function<\/span>(data) {\r\n    data.routeResults.forEach(<span style=\"color: #333; font-weight: bold;\">function<\/span>(result) {\r\n      result.route.symbol = {\r\n        type: <span style=\"color: #d14;\">\"simple-line\"<\/span>,\r\n        color: <span style=\"color: #d14;\">\"blue\"<\/span>,\r\n        width: <span style=\"color: #d14;\">\"4px\"<\/span>\r\n      };\r\n\r\n      view.graphics.add(result.route);\r\n\r\n    });\r\n  });\r\n});\r\n\r\n<\/code><\/pre>\n<p>See the SDK&#8217;s <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/sample-code\/tasks-route\/index.html\">routing sample<\/a> to learn more about RouteTask.<\/p>\n<h3>Summary and next steps<\/h3>\n<p>You\u2019ve now seen the basics of migrating your Google Maps directions app to the ArcGIS API for JavaScript. With ArcGIS you get flexibility of using an out of box UI component or building an entirely customized experience.<\/p>\n<p>Be sure to check out these additional resources to help you get started:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/announcements\/migrating-from-google-maps-javascript-api-to-arcgis-api-for-javascript\/\">Getting started with migrating your Google Maps app<\/a><\/li>\n<li><a href=\"https:\/\/developers.arcgis.com\/labs\/javascript\/get-a-route-and-directions\/\">DevLab \u2013 Get a route and directions<\/a><\/li>\n<li><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/sample-code\/widgets-directions\/index.html\">Sample \u2013 Directions widget<\/a><\/li>\n<li><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/sample-code\/intro-mapview\/index.html\">Introduction to creating a 2D map<\/a><\/li>\n<li><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/sample-code\/intro-widgets\/index.html\">Introduction to Widgets<\/a><\/li>\n<\/ul>\n"}],"authors":[{"ID":3801,"user_firstname":"Andy","user_lastname":"Gup","nickname":"andygup","user_nicename":"andygup","display_name":"Andy Gup","user_email":"agup@esri.com","user_url":"http:\/\/www.andygup.net","user_registered":"2018-03-02 00:15:25","user_description":"I spend a ton of time outdoors and when not on a mountain somewhere I'm a Sr. Product Engineer for the ArcGIS Maps SDK for JavaScript. I work on ES modules, 3rd party JavaScript frameworks, and other cool mapping-related goodies.","user_avatar":"<img data-del=\"avatar\" src='https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/07\/andy_gup_thumb4-1.png' class='avatar pp-user-avatar avatar-96 photo ' height='96' width='96'\/>"},{"ID":4271,"user_firstname":"Julie","user_lastname":"Powell","nickname":"Julie Powell","user_nicename":"julie-powell","display_name":"Julie Powell","user_email":"julie_powell@esri.com","user_url":"","user_registered":"2018-03-02 00:15:51","user_description":"Julie Powell is Principal Product Manager for Esri's web development technologies. She works to ensure developers can be successful in building state of the art, purposeful solutions using ArcGIS software. \r\nJulie brings 20 years of experience working with global leaders such as Hewlett-Packard and Esri, delivering a variety of software solutions for both the enterprise and consumer markets.","user_avatar":"<img data-del=\"avatar\" src='https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/03\/PhotoRoom-20220321_101413-3-213x200.png' class='avatar pp-user-avatar avatar-96 photo ' height='96' width='96'\/>"}],"related_articles":[{"ID":295342,"post_author":"4271","post_date":"2018-08-09 10:29:10","post_date_gmt":"2018-08-09 17:29:10","post_content":"","post_title":"Migrating from Google Maps JavaScript API to ArcGIS API for JavaScript","post_excerpt":"","post_status":"publish","comment_status":"closed","ping_status":"closed","post_password":"","post_name":"migrating-from-google-maps-javascript-api-to-arcgis-api-for-javascript","to_ping":"","pinged":"","post_modified":"2018-08-30 10:31:39","post_modified_gmt":"2018-08-30 17:31:39","post_content_filtered":"","post_parent":0,"guid":"http:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=295342","menu_order":0,"post_type":"blog","post_mime_type":"","comment_count":"0","filter":"raw"},{"ID":244632,"post_author":"4271","post_date":"2018-07-05 10:46:38","post_date_gmt":"2018-07-05 17:46:38","post_content":"","post_title":"What's New in the ArcGIS API for JavaScript (version 4.8 & 3.25)","post_excerpt":"","post_status":"publish","comment_status":"closed","ping_status":"closed","post_password":"","post_name":"jsapi-4-8","to_ping":"","pinged":"","post_modified":"2018-07-26 12:07:52","post_modified_gmt":"2018-07-26 19:07:52","post_content_filtered":"","post_parent":0,"guid":"http:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=244632","menu_order":0,"post_type":"blog","post_mime_type":"","comment_count":"0","filter":"raw"},{"ID":82861,"post_author":"7451","post_date":"2018-02-26 08:10:48","post_date_gmt":"2018-02-26 08:10:48","post_content":"","post_title":"Maps App JavaScript","post_excerpt":"","post_status":"publish","comment_status":"closed","ping_status":"closed","post_password":"","post_name":"maps-app-javascript","to_ping":"","pinged":"","post_modified":"2018-04-25 20:42:44","post_modified_gmt":"2018-04-25 20:42:44","post_content_filtered":"","post_parent":0,"guid":"http:\/\/www.esri.com\/arcgis-blog\/products\/product\/uncategorized\/maps-app-javascript\/","menu_order":0,"post_type":"blog","post_mime_type":"","comment_count":"0","filter":"raw"}],"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/08\/adrivingdir2.png","wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/08\/adrivingdir-1.png"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Migrating Web Apps from Google to ArcGIS: Directions and Routing<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/announcements\/migrating-web-apps-from-google-to-arcgis-directions-and-routing\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Migrating Web Apps from Google to ArcGIS: Directions and Routing\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/announcements\/migrating-web-apps-from-google-to-arcgis-directions-and-routing\" \/>\n<meta property=\"og:site_name\" content=\"ArcGIS Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/esrigis\/\" \/>\n<meta property=\"article:modified_time\" content=\"2018-08-30T17:29:38+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@ESRI\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/announcements\/migrating-web-apps-from-google-to-arcgis-directions-and-routing#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/announcements\/migrating-web-apps-from-google-to-arcgis-directions-and-routing\"},\"author\":{\"name\":\"Andy Gup\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/15927797a6b3b3750014fb54da60503a\"},\"headline\":\"Migrating Web Apps from Google to ArcGIS: Directions and Routing\",\"datePublished\":\"2018-08-17T23:12:31+00:00\",\"dateModified\":\"2018-08-30T17:29:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/announcements\/migrating-web-apps-from-google-to-arcgis-directions-and-routing\"},\"wordCount\":10,\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"keywords\":[\"jsapi4\"],\"articleSection\":[\"Announcements\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/announcements\/migrating-web-apps-from-google-to-arcgis-directions-and-routing\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/announcements\/migrating-web-apps-from-google-to-arcgis-directions-and-routing\",\"name\":\"Migrating Web Apps from Google to ArcGIS: Directions and Routing\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\"},\"datePublished\":\"2018-08-17T23:12:31+00:00\",\"dateModified\":\"2018-08-30T17:29:38+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/announcements\/migrating-web-apps-from-google-to-arcgis-directions-and-routing#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/announcements\/migrating-web-apps-from-google-to-arcgis-directions-and-routing\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/announcements\/migrating-web-apps-from-google-to-arcgis-directions-and-routing#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.esri.com\/arcgis-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Migrating Web Apps from Google to ArcGIS: Directions and Routing\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"name\":\"ArcGIS Blog\",\"description\":\"Get insider info from Esri product teams\",\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\",\"name\":\"Esri\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"width\":400,\"height\":400,\"caption\":\"Esri\"},\"image\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/esrigis\/\",\"https:\/\/x.com\/ESRI\",\"https:\/\/www.linkedin.com\/company\/5311\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/15927797a6b3b3750014fb54da60503a\",\"name\":\"Andy Gup\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/07\/andy_gup_thumb4-1.png\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/07\/andy_gup_thumb4-1.png\",\"caption\":\"Andy Gup\"},\"description\":\"I spend a ton of time outdoors and when not on a mountain somewhere I'm a Sr. Product Engineer for the ArcGIS Maps SDK for JavaScript. I work on ES modules, 3rd party JavaScript frameworks, and other cool mapping-related goodies.\",\"sameAs\":[\"http:\/\/www.andygup.net\",\"https:\/\/x.com\/agup\"],\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/author\/andygup\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Migrating Web Apps from Google to ArcGIS: Directions and Routing","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/announcements\/migrating-web-apps-from-google-to-arcgis-directions-and-routing","og_locale":"en_US","og_type":"article","og_title":"Migrating Web Apps from Google to ArcGIS: Directions and Routing","og_url":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/announcements\/migrating-web-apps-from-google-to-arcgis-directions-and-routing","og_site_name":"ArcGIS Blog","article_publisher":"https:\/\/www.facebook.com\/esrigis\/","article_modified_time":"2018-08-30T17:29:38+00:00","twitter_card":"summary_large_image","twitter_site":"@ESRI","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/announcements\/migrating-web-apps-from-google-to-arcgis-directions-and-routing#article","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/announcements\/migrating-web-apps-from-google-to-arcgis-directions-and-routing"},"author":{"name":"Andy Gup","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/15927797a6b3b3750014fb54da60503a"},"headline":"Migrating Web Apps from Google to ArcGIS: Directions and Routing","datePublished":"2018-08-17T23:12:31+00:00","dateModified":"2018-08-30T17:29:38+00:00","mainEntityOfPage":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/announcements\/migrating-web-apps-from-google-to-arcgis-directions-and-routing"},"wordCount":10,"publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"keywords":["jsapi4"],"articleSection":["Announcements"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/announcements\/migrating-web-apps-from-google-to-arcgis-directions-and-routing","url":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/announcements\/migrating-web-apps-from-google-to-arcgis-directions-and-routing","name":"Migrating Web Apps from Google to ArcGIS: Directions and Routing","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#website"},"datePublished":"2018-08-17T23:12:31+00:00","dateModified":"2018-08-30T17:29:38+00:00","breadcrumb":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/announcements\/migrating-web-apps-from-google-to-arcgis-directions-and-routing#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/announcements\/migrating-web-apps-from-google-to-arcgis-directions-and-routing"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/announcements\/migrating-web-apps-from-google-to-arcgis-directions-and-routing#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.esri.com\/arcgis-blog\/"},{"@type":"ListItem","position":2,"name":"Migrating Web Apps from Google to ArcGIS: Directions and Routing"}]},{"@type":"WebSite","@id":"https:\/\/www.esri.com\/arcgis-blog\/#website","url":"https:\/\/www.esri.com\/arcgis-blog\/","name":"ArcGIS Blog","description":"Get insider info from Esri product teams","publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization","name":"Esri","url":"https:\/\/www.esri.com\/arcgis-blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","width":400,"height":400,"caption":"Esri"},"image":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/esrigis\/","https:\/\/x.com\/ESRI","https:\/\/www.linkedin.com\/company\/5311\/"]},{"@type":"Person","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/15927797a6b3b3750014fb54da60503a","name":"Andy Gup","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/07\/andy_gup_thumb4-1.png","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/07\/andy_gup_thumb4-1.png","caption":"Andy Gup"},"description":"I spend a ton of time outdoors and when not on a mountain somewhere I'm a Sr. Product Engineer for the ArcGIS Maps SDK for JavaScript. I work on ES modules, 3rd party JavaScript frameworks, and other cool mapping-related goodies.","sameAs":["http:\/\/www.andygup.net","https:\/\/x.com\/agup"],"url":"https:\/\/www.esri.com\/arcgis-blog\/author\/andygup"}]}},"text_date":"August 17, 2018","author_name":"Multiple Authors","author_page":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/announcements\/migrating-web-apps-from-google-to-arcgis-directions-and-routing","custom_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/08\/adrivingdir-1.png","primary_product":"ArcGIS Maps SDK for JavaScript","tag_data":[{"term_id":27491,"name":"jsapi4","slug":"jsapi4","term_group":0,"term_taxonomy_id":27491,"taxonomy":"post_tag","description":"","parent":0,"count":111,"filter":"raw"}],"category_data":[{"term_id":37101,"name":"Announcements","slug":"announcements","term_group":0,"term_taxonomy_id":37101,"taxonomy":"category","description":"","parent":0,"count":1974,"filter":"raw"}],"product_data":[{"term_id":36831,"name":"ArcGIS Maps SDK for JavaScript","slug":"js-api-arcgis","term_group":0,"term_taxonomy_id":36831,"taxonomy":"product","description":"","parent":36601,"count":363,"filter":"raw"}],"primary_product_link":"https:\/\/www.esri.com\/arcgis-blog\/?s=#&products=js-api-arcgis","_links":{"self":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/300452","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/users\/3801"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/comments?post=300452"}],"version-history":[{"count":0,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/300452\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/media?parent=300452"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/categories?post=300452"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/tags?post=300452"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/industry?post=300452"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/product?post=300452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}