Tag Archives: ArcGIS API for Javascript

JavaScript Debugging Tips Part III – Advanced Google Chrome Developer Tools

This blog post is the third in a series of JavaScript debugging tips and tricks to help you on your way. See JavaScript Debugging Tips Part I  and also JavaScript Debugging Tips Part II for our previous segments.

In the past two JavaScript Debugging Tips posts on the Esri Support blog, we looked at the Network Tab and the Console Tab as part of the Google Chrome Developer Tools. While most modern browsers have some form of developer tools, here we use Chrome for our examples.

Our goal for this third blog post in the series is to introduce more advanced tips and tricks to enable you to more effectively debug and troubleshoot your JavaScript code. Specifically, we will focus on three areas: enhanced messaging to the console, better ways to set breakpoints using conditions specified at runtime, and a more efficient way of stepping through breakpoints in the Sources tab with a method called blackboxing. Continue reading

Posted in ArcGIS Online, export, SDK | Tagged , , , , , , , , , | 1 Comment

JavaScript Debugging Tips Part II – Google Chrome and the Console Tab

This blog post is the 2nd in a series of JavaScript debugging tips and tricks to help you on your way. See JavaScript Debugging Tips Part I – Google Chrome and the Network Tab for our first segment.


The most enjoyable part of any programming assignment is right near the beginning when you sit down with a pile of tools and resources and start hammering away at raw clumps of code. The more difficult part comes when you attempt to launch the application, only to watch that tightly-written code unravel into multiple late nights staring at a computer screen. However, all is not lost, as we have an excellent recommendation for you, which is the subject of this blog: the Console tab inside your favorite browser’s Developer Tools. Continue reading

Posted in export, SDK, Support.Esri.com | Tagged , , , , , | Leave a comment

Web Maps Must Be Updated if Using Styles that Adjust Symbol Size Automatically Based on Map Scale

This blog pertains to web maps and layer items that have both of these characteristics:

  • Web maps and layers authored with ArcGIS Online prior to the June 2016 update.
  • Contains polygon layers that are styled using Smart Mapping tools to adjust symbol size and/or outline width automatically based on scale

Smart Mapping tools allow you to select between various methods for using attribute values to drive the size of marker symbols when mapping data associated with polygons. You can specify a concrete size range for the symbols, or use automatic sizing so that they are optimized for the initial map zoom level and will automatically adjust so they look better across more zoom levels. We discovered an issue when using the automatic sizing option where the size of each symbol was being incorrectly represented in the web map with pixel values rather than point values (points are the correct unit of measure according to the web map specification). The ArcGIS API for JavaScript was also using pixel values. The result was inconsistent sizing between ArcGIS clients.

You also have the ability to automatically adjust the width of the outline of the polygon based on the current scale. Automatic sizing of polygon outline widths were also being represented using pixels rather than points.

Starting with the June update of ArcGIS Online, sizing values will be correctly represented using points which will enable marker sizing in web maps to be displayed consistently in all ArcGIS clients. The ArcGIS API 3.17 for JavaScript was also updated to use point values rather than pixels. While this update resolves the inconsistencies with auto sizing values going forward, it also means that web maps that were created before the June 2016 update of Online will have marker symbols and polygon outline widths that appear 1.3 times larger than the initial sizes you saw when originally authoring your map.

Example map with automatic sizing before the update            

Example map with automatic sizing after the update

What can you do if your web map was affected by this update?

If you created a web map or layer item in Online prior to the June update with layer styles that take advantage of automatic sizing based on scale, we recommend that you reauthor your web map. This process will resave your web map with the correct sizing values for consistent display in all ArcGIS clients. Here are the steps to reauthor your web map:

  1. Open your web map or layer item
  2. Click on “Change Style” in the layer menu for the polygon layer(s) that use automatic sizing of symbols. Note: You might want to write down the options you have selected so that you can easily reselect them in step 4.
  3. Select a different style for your symbols than you originally had selected and click “Done.”
  4. Click “Change Style” again on the same layer and reselect the original styling options you had, and click “Done.” Any options that were configured within the original style must be reconfigured.
  5. Save your web map or layer item. Your web map will now have size represented using point values.

For information on changing the style of your web map or layer item, see this help topic.

Note: this issue also occurs in web maps and layers that were created in Portal for ArcGIS and will be addressed in Portal for ArcGIS version 10.5. This article will be updated once a solution is available.

Julie Powell
Technical Product Manager, ArcGIS API for JavaScript

Posted in ArcGIS Online, export | Tagged , , , | Leave a comment

Getting Comfortable with JavaScript API 4.0

Now that the ArcGIS API for JavaScript 4.0 has been released for a couple of weeks, this is an excellent opportunity to take a walk through some of the new syntax and functionality. This blog will go through a sample 3D application focusing on the Search widget. You can follow along with the sample code from the Esri Developer Support GitHub repository, and run the hosted sample here: View it Live.

Functionality-wise, the app displays a 3D map with four widgets: Search, Zoom, Compass, and Attribution. By default, the View includes the latter three widgets, as described in the documentation. If you’re not familiar with the 4.x changes, all mapping apps contain a map and a view. The map holds the data, and the view contains the visualization information for that data. In other words, the map is the subject, and the view is the camera; complete with filters, modes, and settings. All 2D apps will have MapViews, and 3D apps will have SceneViews (note: the term ‘scene’ indicates three dimensions across ArcGIS). The same applies for maps from ArcGIS Online and Portal for ArcGIS: a WebMap is 2D, and a WebScene is 3D.

2D map + 3D scene

2D map + 3D scene

Continue reading

Posted in export, SDK, Support.Esri.com | Tagged , , , , | 2 Comments

Google Chrome 51 Issues when Logging in to Portal for ArcGIS, ArcGIS Online, or Custom Apps

Update, 2 June 2016: Google Chrome 51.0.2704.79 was just released; it fixes the change that caused a blank screen for ArcGIS Online, Portal for ArcGIS, and applications built with the ArcGIS API for JavaScript. If you are affected by this, please click the Customize and control Google Chrome button and navigate to “Help > About Google Chrome” to force an update check and upgrade to this latest patch level.

The previous version was 51.0.2704.63, and the fixed version is 51.0.2704.79.

Update, 27 May 2016: KB 13156 has been published on the Support website to provide additional information about this issue.

———————

Google released an update to Google Chrome (version 51), which was pushed out to the public on Wednesday, May 25th. Unfortunately, this update included a change that impacts anyone using Google Chrome to access ArcGIS Online or Portal for ArcGIS versions 10.3, 10.3.1, 10.4, or 10.4.1.

This change impacts many apps built on the ArcGIS API for Javascript (versions 3.8 – 3.16), several subsets of custom apps built by users, partners, and Esri Professional Services (for example, any app that uses the feature table or an analysis widget), and, most notably, the “home app” in ArcGIS Online and Portal for ArcGIS.

You may be seeing a screen similar to this after logging in: a blank screen with few or no elements.

What you can do:

If you are using Google Chrome to access ArcGIS Online, the above listed Portal for ArcGIS versions, or apps built with the above-listed versions of the ArcGIS API for JavaScript, please turn off auto-update in your Chrome browser now. If Chrome was updated, you will need to temporarily use another browser (such as Internet Explorer or Mozilla Firefox) until patches have been released.

What Esri is doing:

  • The ArcGIS Online team is preparing fixes that will go live this evening.
  • We are still working on a solution for Portal for ArcGIS.
  • Developers using the hosted version of the JavaScript API are unaffected, as it has already been patched.
  • We are working on a solution for JavaScript API developers that use either a custom build of the API or use it locally.

We will provide updates at the top of this blog post regarding Portal for ArcGIS and ArcGIS API for JavaScript as soon as we have more information. A technical article has been released for this issue, KB 13156, which provides some additional detail about this problem.

If you have run into any problems as a result of this bug that impact your workflows, please contact Esri Support Services at 1-888-377-4575.


Gregory L. – Online Support Resources

Posted in Announcements, ArcGIS Desktop, ArcGIS Enterprise, ArcGIS Online, export, SDK | Tagged , , , , , , | 7 Comments

Considerations for Using Vector Tile Layers in ArcGIS Online

esri_logo

Beta versions of Esri vector basemaps are now available through ArcGIS Online as vector tile layers. These vector basemaps are accessible as both ready-to-use web maps and as vector tile layers you can add to a map. Additionally, vector basemaps include a variety of styles, some new … Continue reading

Posted in ArcGIS Online, export, SDK, Support.Esri.com | Tagged , , , , , , , | 5 Comments

Setting up a proxy with Web AppBuilder for ArcGIS (Developer Edition)

Welcome to part two! In our last blog post, we looked at how to set up a proxy to work with a JavaScript application. Today, we’ll be taking a look at the workflow to set up a proxy with Web AppBuilder for ArcGIS. Continue reading

Posted in export, SDK | Tagged , , , | 32 Comments

Setting up a Proxy

A proxy page stands between a server and an application. By using a proxy, you allow an application to authenticate on your behalf, bypassing a challenge and accessing secured services inside of an application. While the token is hidden, an application can access secured services with token-based authentication; a proxy handles massive post requests over 2,048 characters. Additionally, you can use a proxy when a resource and an application are on separate domains, as well as when cross-origin resource sharing (CORS) support is unavailable. Continue reading

Posted in export, SDK | Tagged , , , , , | 9 Comments

Final Release and Support Plan for the ArcGIS APIs / Viewers for Flex and Silverlight

Esri logo

The next release of each ArcGIS API and Viewer (for Flex and Silverlight) will be significant in that they are the last planned releases of two once-popular technologies. While technical support will be available for both APIs and viewers through June … Continue reading

Posted in export, SDK, Support.Esri.com | Tagged , , , , , , , , , , , , , | 4 Comments