{"id":74671,"date":"2016-12-21T11:22:59","date_gmt":"2016-12-21T11:22:59","guid":{"rendered":"http:\/\/www.esri.com\/arcgis-blog\/products\/product\/uncategorized\/arcgis-api-for-javascript-4-2-released\/"},"modified":"2018-05-31T19:56:36","modified_gmt":"2018-05-31T19:56:36","slug":"arcgis-api-for-javascript-4-2-released","status":"publish","type":"blog","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/announcements\/announcements\/arcgis-api-for-javascript-4-2-released","title":{"rendered":"ArcGIS API for JavaScript 4.2 released"},"author":4811,"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":[24921,27491,23571,32461],"industry":[],"product":[36831,36601],"class_list":["post-74671","blog","type-blog","status-publish","format-standard","hentry","category-announcements","tag-javascript","tag-jsapi4","tag-whats-new","tag-whats-new-december-2016","product-js-api-arcgis","product-developers"],"acf":{"short_description":"The ArcGIS API for JavaScript 4.2 is available, introducing new widgets, smart mapping in 2D and 3D, vector tiles in 3D, support for Arca...","flexible_content":[{"acf_fc_layout":"content","content":"<p>The ArcGIS API for JavaScript 4.2 is available, introducing new widgets, smart mapping in 2D and 3D, vector tiles in 3D, support for Arcade, and new events in the MapView and SceneView.<\/p>\n<h1>Custom widget development<\/h1>\n<p>In addition to the Esri-provided widgets, it is now possible to create your own custom widgets using the new widget framework. This framework allows you to create subclasses off of the <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-widgets-Widget.html\">Widget class<\/a>. For additional information on this, please refer to the <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/guide\/custom-widget\/index.html\">Widget development guide topic<\/a>, in addition to two new samples showcasing this functionality:<\/p>\n<ul>\n<li><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/sample-code\/widgets-custom-helloworld\/index.html\">Create a custom Hello World widget<\/a><\/li>\n<li><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/sample-code\/widgets-custom-recenter\/index.html\">Create a custom Recenter widget<\/a><\/li>\n<\/ul>\n<p><!--more--><\/p>\n<p>Currently, <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-widgets-LayerList.html\">LayerList<\/a> and <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-widgets-Print.html\">Print<\/a> are the two widgets that use this new framework. The remaining ready-to-use widgets, (e.g. Home, Search, etc.) are planned to be updated in subsequent API releases.<\/p>\n<h1>Print and LayerList widgets<\/h1>\n<p>The <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-widgets-LayerList.html\">LayerList<\/a> and <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-widgets-Print.html\">Print<\/a> widgets have been designed from the ground up with a clean user experience and responsive design. Both follow the API&#8217;s view model architecture for extensibility and customization.<\/p>\n<p><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/sample-code\/widgets-layerlist\/index.html\"><img decoding=\"async\" src=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2016\/12\/widgets-layerlist.png\" alt=\"image\" \/><\/a><\/p>\n<p><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/sample-code\/widgets-print\/index.html\"><img decoding=\"async\" src=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2016\/12\/widgets-print.png\" alt=\"image\" \/><\/a><\/p>\n<h1>Arcade expressions in visualization<\/h1>\n<p><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/guide\/arcade\/index.html\">Arcade<\/a> is a lightweight expression language designed for creating custom content, visualizations, and labels across the ArcGIS platform. In the 4.2 release of the API, Arcade is exclusively used for custom data-driven visualizations. Rather than base visualizations on the value of a layer&#8217;s field, users now can pass an expression to renderers and visual variables. The expression will execute for each feature, generating a symbol based on the returned value. This is convenient when a service doesn&#8217;t have the exact values you need. Arcade comes equipped with its <a href=\"https:\/\/developers.arcgis.com\/arcade\/function-reference\/\">own library of functions<\/a> and allows users to write custom functions within an expression.<\/p>\n<p><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/sample-code\/visualization-arcade\/index.html\"><img decoding=\"async\" src=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2016\/12\/visualization-arcade.png\" alt=\"image\" \/><\/a><\/p>\n<p>The following snippet demonstrates how you can write an Arcade expression showing the share of the vote earned in an election by the winner for each geography in the layer.<\/p>\n<pre><code><span style=\"color: #998; font-style: italic;\">\/\/ CANDIDATE1 and CANDIDATE2 are field values<\/span>\r\n<span style=\"color: #333; font-weight: bold;\">var<\/span> arcade = <span style=\"color: #d14;\">\"var votes = [$feature.CANDIDATE1, $feature.CANDIDATE2];\"<\/span>\r\n  <span style=\"color: #998; font-style: italic;\">\/\/ Sum() and Max() are built-in Arcade functions<\/span>\r\n  + <span style=\"color: #d14;\">\"return ( Max(votes) \/ Sum(votes) ) * 100;\"<\/span>;\r\n\r\nrenderer.visualVariables = [{\r\n  type: <span style=\"color: #d14;\">\"color\"<\/span>,\r\n  <span style=\"color: #998; font-style: italic;\">\/\/ valueExpression references the Arcade expression<\/span>\r\n  valueExpression: arcade,\r\n  valueExpressionTitle: <span style=\"color: #d14;\">\"Share of winner's votes\"<\/span>,\r\n  stops: [ ... ]\r\n}];\r\n<\/code><\/pre>\n<p>Arcade is convenient for a number of reasons, including providing the ability to save expressions to layer items and web maps in <a href=\"https:\/\/arcgis.com\/\">ArcGIS Online<\/a> or Portal for ArcGIS. That means expressions can be authored in apps and persisted in webmaps throughout the ArcGIS platform. In future releases, users will have the ability to use it in other contexts, such as labeling.<\/p>\n<p>Be sure to read the <a href=\"https:\/\/developers.arcgis.com\/arcade\/\">full Arcade documentation<\/a> for details about its syntax and the <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/guide\/arcade\/index.html\">Arcade guide page<\/a> for more examples of its usage within the API. The <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/sample-code\/visualization-arcade\/index.html\">Create a custom visualization using Arcade sample<\/a> demonstrates how Arcade can be used in this context.<\/p>\n<p>For an introduction and some ideas for mapping using Arcade, read the content shared in the previously released blog articles.<\/p>\n<ul>\n<li><a href=\"https:\/\/blogs.esri.com\/esri\/arcgis\/2016\/12\/19\/introducing-arcade\/\">Introducing Arcade<\/a><\/li>\n<li><a href=\"https:\/\/blogs.esri.com\/esri\/arcgis\/2016\/12\/15\/use-arcade-expressions-to-map-your-ideas\/\"> Use Arcade Expressions to Map Your Ideas<\/a><\/li>\n<\/ul>\n<h1>Revamped VectorTileLayer support<\/h1>\n<p>The implementation of the VectorTileLayer has been re-written to be more tightly integrated with the API. It still fully supports the current Mapbox Style Specification (version 8) and MapBox Vector Tile specification (version 2.1). The enhancements with this first release of the new vector tile implementation include: support in 3D SceneView, right-to-left (RTL) support for map labels, support for any ArcGIS-supported spatial reference, and improved label and symbol display on tile boundaries.<\/p>\n<p><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/sample-code\/layers-vectortilelayer\/index.html\"><img decoding=\"async\" src=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2016\/12\/layers-vectortile-3d.png\" alt=\"image\" \/><\/a><\/p>\n<p><i>North Korea Missile Azimuthal Equidistant<\/i><br \/>\n<a href=\"https:\/\/jsapi.maps.arcgis.com\/home\/item.html?id=37987b0f86fc465d9b1b3350d2f1e3a0\"><img decoding=\"async\" src=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2016\/12\/layers-vectortilelayer-missile.png\" alt=\"image\" \/><\/a><\/p>\n<h1>New events on MapView and SceneView<\/h1>\n<p>The following <code>keyboard<\/code> and <code>pointer<\/code> events are now available on <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-views-MapView.html#events-summary\">MapView<\/a> and <a href=\"javascript\/latest\/api-reference\/esri-views-SceneView.html#events-summary\">SceneView<\/a>:<\/p>\n<ul>\n<li><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-views-View.html#event:double-click\">double-click<\/a> &#8211; fires after double-clicking on the view.<\/li>\n<li><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-views-View.html#event:drag\">drag<\/a> &#8211; fires during a pointer drag on the view.<\/li>\n<li><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-views-View.html#event:key-down\">key-down<\/a> &#8211; fires after a keyboard key is pressed.<\/li>\n<li><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-views-View.html#event:key-up\">key-up<\/a> &#8211; fires after a keyboard key is released.<\/li>\n<li><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-views-View.html#event:mouse-wheel\">mouse-wheel<\/a> &#8211; fires when a wheel button of a pointing device (typically a mouse) is scrolled on the view.<\/li>\n<li><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-views-View.html#event:pointer-down\">pointer-down<\/a> &#8211; fires after a mouse button is pressed, or a finger touches the display.<\/li>\n<li><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-views-View.html#event:pointer-move\">pointer-move<\/a> &#8211; fires after the mouse or a finger on the display moves.<\/li>\n<li><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-views-View.html#event:pointer-up\">pointer-up<\/a> &#8211; fires after a mouse button is released, or a display touch ends.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/sample-code\/view-events\/index.html\"><img decoding=\"async\" src=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2016\/12\/view-events.png\" alt=\"image\" \/><\/a><\/p>\n<h2>Point clouds<\/h2>\n<p>Point cloud data can be visualized using the new <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-layers-PointCloudLayer.html\">PointCloudLayer<\/a> and <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-renderers-PointCloudRenderer.html\">PointCloud renderer classes<\/a>. Visualizing point clouds in different ways can help extract important information. With the JavaScript API, point cloud data can be visualized with <a href=\"javascript\/latest\/api-reference\/esri-renderers-PointCloudRGBRenderer.html\">RGB values<\/a>, <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-renderers-PointCloudUniqueValueRenderer.html\">unique values<\/a>, <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-renderers-PointCloudStretchRenderer.html\">continuous color or stretched values<\/a>, or <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-renderers-PointCloudClassBreaksRenderer.html\">class breaks<\/a>.<\/p>\n<p>See the <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/sample-code\/layers-pointcloud\/index.html\">Point Cloud Layer sample<\/a> for more details on this topic.<\/p>\n<p><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/sample-code\/view-events\/index.html\"><img decoding=\"async\" src=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2016\/12\/layers-pointcloud-portal.png\" alt=\"image\" \/><\/a><\/p>\n<h1>Elevation Query API<\/h1>\n<p>Elevation values, or z-values, in 3D <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-views-SceneView.html\">SceneViews<\/a> can be obtained for a given point in a couple of ways. One is via the <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-views-SceneView.html#hitTest\">hitTest()<\/a> method, which provides an approximate elevation for a given <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-geometry-ScreenPoint.html\">ScreenPoint<\/a>. Starting at version 4.2, you can now query more precise elevation values for <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/sample-code\/elevation-query-points\/index.html\">points<\/a> and <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/sample-code\/elevation-query\/index.html\">polylines<\/a> directly from an <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-layers-ElevationLayer.html\">ElevationLayer<\/a> with the <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-layers-ElevationLayer.html#queryElevation\">queryElevation()<\/a> method.<\/p>\n<p>The image below links to to a sample that demonstrates how you can query elevation at the same location from two elevation layers: one representing the surface before a landslide and the other after the landslide. You can then calculate the elevation difference based on the results.<\/p>\n<p><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/sample-code\/elevation-query-points\/index.html\"><img decoding=\"async\" src=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2016\/12\/elevation-query-points.png\" alt=\"image\" \/><\/a><\/p>\n<p>Also be sure to check out another new sample demonstrating how to <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/sample-code\/elevation-query\/index.html\">query Elevation along a line<\/a>.<\/p>\n<h1>Improved smart mapping<\/h1>\n<p>Data-driven and simple location-based visualizations can be generated using smart mapping using methods in one of four objects new to the API for generating renderers with smart default symbols:<\/p>\n<ul>\n<li><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-renderers-smartMapping-creators-location.html\">location<\/a> &#8211; generates a single symbol for all features in a layer.<\/li>\n<li><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-renderers-smartMapping-creators-color.html\">color<\/a> &#8211; generates data-driven visualizations with continuous color based on a numeric field value.<\/li>\n<li><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-renderers-smartMapping-creators-size.html\">size<\/a> &#8211; generates data-driven visualizations with continuous size based on a numeric field value.<\/li>\n<li><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-renderers-smartMapping-creators-univariateColorSize.html\">univariateColorSize<\/a> &#8211; generates visualizations with continuous color and size ramps based on a single numeric field value. This type was designed specifically for visualizations using 3D symbols.<\/li>\n<\/ul>\n<p>Three widgets were also added: <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-widgets-ColorSlider.html\">ColorSlider<\/a>, <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-widgets-SizeSlider.html\">SizeSlider<\/a>, and <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-widgets-UnivariateColorSizeSlider.html\">UnivariateColorSizeSlider<\/a> providing users with the ability to easily explore spatial patterns in their data and update data-driven visualizations to highlight alternate nuances of the data such as emphasizing outliers, similar features, or features with values above or below a certain point.<\/p>\n<p><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/sample-code\/visualization-sm-uni-colorsize\/index.html\"><img decoding=\"async\" src=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2016\/12\/visualization-sm-uni-colorsize.png\" alt=\"image\" \/><\/a><\/p>\n<p>The visualization generator workflows are designed for allowing users to explore unfamiliar data and\/or save custom visualizations to portal items (layers, webmaps, webscenes) with a simple UI.<\/p>\n<p>The following are new samples demonstrating how the renderer generators and slider widgets work together.<\/p>\n<ul>\n<li><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/sample-code\/visualization-sm-color\/index.html\">Generate data-driven continuous color visualization<\/a><\/li>\n<li><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/sample-code\/visualization-sm-size\/index.html\">Generate data-driven continuous size visualization<\/a><\/li>\n<li><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/sample-code\/visualization-sm-uni-colorsize\/index.html\">Generate univariate continuous size and color visualization in 3D<\/a><\/li>\n<\/ul>\n<h1>Custom goTo() animations<\/h1>\n<p>When user orientation and correlation between the two locations is important, changing view center to a new location should be done smoothly. With this release the duration of the animation as well as an easing function can be given for better control of the animation mode.<\/p>\n<p>In the example below the camera speed grows gradually (to the power of 3), but limits the duration to 4 seconds.<\/p>\n<pre><code>view.goTo(newLocation, {\r\n  duration: <span style=\"color: #008080;\">4000<\/span>,\r\n  easing: <span style=\"color: #d14;\">\"in-cubic\"<\/span>\r\n});\r\n<\/code><\/pre>\n<h1>Workers framework<\/h1>\n<p><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-core-workers.html\">The workers framework<\/a> helps improve performance by offloading computationally expensive tasks to background threads, without blocking the user interface running on the main thread.<\/p>\n<p>Check out the <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/guide\/release-notes\/index.html\">4.2 release notes<\/a> for additional information about upgrades to other resources and a more detailed listing of API enhancements. For an overview on what was released with 3.19 earlier this week, check out this <a href=\"https:\/\/blogs.esri.com\/esri\/arcgis\/2016\/12\/21\/arcgis-api-for-javascript-3-19-released\/\">blog announcement<\/a>.<\/p>\n"}],"authors":[{"ID":4811,"user_firstname":"Bjorn","user_lastname":"Svensson","nickname":"bjorn","user_nicename":"bjorn","display_name":"Bj\u00f6rn Svensson","user_email":"bsvensson@esri.com","user_url":"https:\/\/developers.arcgis.com\/javascript\/","user_registered":"2018-03-02 00:16:26","user_description":"20+ years of experience with web mapping. Currently lead project engineer for the ArcGIS Maps SDK for JavaScript development team at Esri.","user_avatar":"<img data-del=\"avatar\" src='https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Bjorn_Svensson_beard_squarish_2000.png' class='avatar pp-user-avatar avatar-96 photo ' height='96' width='96'\/>"},{"ID":5111,"user_firstname":"Lloyd","user_lastname":"Heberlie","nickname":"heberlie","user_nicename":"heberlie","display_name":"Lloyd Heberlie","user_email":"lheberlie@esri.com","user_url":"","user_registered":"2018-03-02 00:16:44","user_description":"Working daily to elevate user happiness about reading the ArcGIS Maps SDK for JavaScript documentation. Occasionally blogging about the ArcGIS Maps SDK for JavaScript, and technical presenter at the Esri Developer Summit and User's Conferences. A Product Engineer on the Esri ArcGIS Maps SDK for JavaScript team.","user_avatar":"<img alt='' src='https:\/\/secure.gravatar.com\/avatar\/df342931f2b50f8d00850f6dee67142f65c9e1d4c1911952db30cc94ce36fde7?s=96&#038;d=blank&#038;r=g' srcset='https:\/\/secure.gravatar.com\/avatar\/df342931f2b50f8d00850f6dee67142f65c9e1d4c1911952db30cc94ce36fde7?s=192&#038;d=blank&#038;r=g 2x' class='avatar avatar-96 photo' height='96' width='96' loading='lazy' decoding='async'\/>"},{"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":"","card_image":false,"wide_image":false},"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>ArcGIS API for JavaScript 4.2 released<\/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\/announcements\/announcements\/arcgis-api-for-javascript-4-2-released\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ArcGIS API for JavaScript 4.2 released\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esri.com\/arcgis-blog\/products\/announcements\/announcements\/arcgis-api-for-javascript-4-2-released\" \/>\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-05-31T19:56:36+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\/announcements\/announcements\/arcgis-api-for-javascript-4-2-released#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/announcements\/announcements\/arcgis-api-for-javascript-4-2-released\"},\"author\":{\"name\":\"Bj\u00f6rn Svensson\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/040d356e9dba00b43944aa2d41f17d99\"},\"headline\":\"ArcGIS API for JavaScript 4.2 released\",\"datePublished\":\"2016-12-21T11:22:59+00:00\",\"dateModified\":\"2018-05-31T19:56:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/announcements\/announcements\/arcgis-api-for-javascript-4-2-released\"},\"wordCount\":5,\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"keywords\":[\"JavaScript\",\"jsapi4\",\"what's new\",\"what's new december 2016\"],\"articleSection\":[\"Announcements\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/announcements\/announcements\/arcgis-api-for-javascript-4-2-released\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/announcements\/announcements\/arcgis-api-for-javascript-4-2-released\",\"name\":\"ArcGIS API for JavaScript 4.2 released\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\"},\"datePublished\":\"2016-12-21T11:22:59+00:00\",\"dateModified\":\"2018-05-31T19:56:36+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/announcements\/announcements\/arcgis-api-for-javascript-4-2-released#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/announcements\/announcements\/arcgis-api-for-javascript-4-2-released\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/announcements\/announcements\/arcgis-api-for-javascript-4-2-released#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.esri.com\/arcgis-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ArcGIS API for JavaScript 4.2 released\"}]},{\"@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\/040d356e9dba00b43944aa2d41f17d99\",\"name\":\"Bj\u00f6rn Svensson\",\"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\/04\/Bjorn_Svensson_beard_squarish_2000.png\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Bjorn_Svensson_beard_squarish_2000.png\",\"caption\":\"Bj\u00f6rn Svensson\"},\"description\":\"20+ years of experience with web mapping. Currently lead project engineer for the ArcGIS Maps SDK for JavaScript development team at Esri.\",\"sameAs\":[\"https:\/\/developers.arcgis.com\/javascript\/\",\"https:\/\/x.com\/bjorn_svensson\"],\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/author\/bjorn\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"ArcGIS API for JavaScript 4.2 released","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\/announcements\/announcements\/arcgis-api-for-javascript-4-2-released","og_locale":"en_US","og_type":"article","og_title":"ArcGIS API for JavaScript 4.2 released","og_url":"https:\/\/www.esri.com\/arcgis-blog\/products\/announcements\/announcements\/arcgis-api-for-javascript-4-2-released","og_site_name":"ArcGIS Blog","article_publisher":"https:\/\/www.facebook.com\/esrigis\/","article_modified_time":"2018-05-31T19:56:36+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\/announcements\/announcements\/arcgis-api-for-javascript-4-2-released#article","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/announcements\/announcements\/arcgis-api-for-javascript-4-2-released"},"author":{"name":"Bj\u00f6rn Svensson","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/040d356e9dba00b43944aa2d41f17d99"},"headline":"ArcGIS API for JavaScript 4.2 released","datePublished":"2016-12-21T11:22:59+00:00","dateModified":"2018-05-31T19:56:36+00:00","mainEntityOfPage":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/announcements\/announcements\/arcgis-api-for-javascript-4-2-released"},"wordCount":5,"publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"keywords":["JavaScript","jsapi4","what's new","what's new december 2016"],"articleSection":["Announcements"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/announcements\/announcements\/arcgis-api-for-javascript-4-2-released","url":"https:\/\/www.esri.com\/arcgis-blog\/products\/announcements\/announcements\/arcgis-api-for-javascript-4-2-released","name":"ArcGIS API for JavaScript 4.2 released","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#website"},"datePublished":"2016-12-21T11:22:59+00:00","dateModified":"2018-05-31T19:56:36+00:00","breadcrumb":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/announcements\/announcements\/arcgis-api-for-javascript-4-2-released#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/announcements\/announcements\/arcgis-api-for-javascript-4-2-released"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/announcements\/announcements\/arcgis-api-for-javascript-4-2-released#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.esri.com\/arcgis-blog\/"},{"@type":"ListItem","position":2,"name":"ArcGIS API for JavaScript 4.2 released"}]},{"@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\/040d356e9dba00b43944aa2d41f17d99","name":"Bj\u00f6rn Svensson","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\/04\/Bjorn_Svensson_beard_squarish_2000.png","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Bjorn_Svensson_beard_squarish_2000.png","caption":"Bj\u00f6rn Svensson"},"description":"20+ years of experience with web mapping. Currently lead project engineer for the ArcGIS Maps SDK for JavaScript development team at Esri.","sameAs":["https:\/\/developers.arcgis.com\/javascript\/","https:\/\/x.com\/bjorn_svensson"],"url":"https:\/\/www.esri.com\/arcgis-blog\/author\/bjorn"}]}},"text_date":"December 21, 2016","author_name":"Multiple Authors","author_page":"https:\/\/www.esri.com\/arcgis-blog\/products\/announcements\/announcements\/arcgis-api-for-javascript-4-2-released","custom_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/08\/Newsroom-Keyart-Wide-1920-x-1080.jpg","primary_product":"ArcGIS Maps SDK for JavaScript","tag_data":[{"term_id":24921,"name":"JavaScript","slug":"javascript","term_group":0,"term_taxonomy_id":24921,"taxonomy":"post_tag","description":"","parent":0,"count":151,"filter":"raw"},{"term_id":27491,"name":"jsapi4","slug":"jsapi4","term_group":0,"term_taxonomy_id":27491,"taxonomy":"post_tag","description":"","parent":0,"count":111,"filter":"raw"},{"term_id":23571,"name":"what's new","slug":"whats-new","term_group":0,"term_taxonomy_id":23571,"taxonomy":"post_tag","description":"","parent":0,"count":582,"filter":"raw"},{"term_id":32461,"name":"what's new december 2016","slug":"whats-new-december-2016","term_group":0,"term_taxonomy_id":32461,"taxonomy":"post_tag","description":"","parent":0,"count":24,"filter":"raw"}],"category_data":[{"term_id":37101,"name":"Announcements","slug":"announcements","term_group":0,"term_taxonomy_id":37101,"taxonomy":"category","description":"","parent":0,"count":1957,"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":361,"filter":"raw"},{"term_id":36601,"name":"Developers","slug":"developers","term_group":0,"term_taxonomy_id":36601,"taxonomy":"product","description":"","parent":0,"count":761,"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\/74671","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\/4811"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/comments?post=74671"}],"version-history":[{"count":0,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/74671\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/media?parent=74671"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/categories?post=74671"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/tags?post=74671"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/industry?post=74671"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/product?post=74671"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}