|
POST
|
Brett Greenfield (DNR) after doing some research, I think this behavior is by design. The showAttribution (3.x) and attributionVisible (4.x) properties of the PrintTemplate are only honored when the template is set to MAP_ONLY. This is because there may be use cases for just showing the exported image, like as a thumbnail, or as part of a presentation (which should still have the attributions listed elsewhere on the slide or as a reference). We will be updating our documentation to remove any confusion about how these properties work. In terms of a workaround, the only suggestion I could make would be to create your own custom print template using the instructions in this ArcMap tutorial: Publishing additional services for printing. Perhaps you could use this for your app. However, I would add a word of caution above removing attribution. Please check out our Data Attributions and Terms of Use documentation for more information.
... View more
10-13-2017
10:23 AM
|
1
|
0
|
1390
|
|
POST
|
Thanks for the post, Brett. I see what you mean about the showAttribution property only being honored when the template is set to MAP_ONLY. I do not know of a workaround at this time, but will look into it.
... View more
10-12-2017
11:53 AM
|
1
|
1
|
1390
|
|
POST
|
Well, I am not 100% sure how Technical Support works in Italy, but I can give you my thoughts about GeoNet and Technical Support at Esri Inc.: GeoNet is an online community where people can share ideas about GIS, projects, Esri Software, and technical issues. It’s a place for collaboration, co-creation, idea sharing, and problem solving. People ask questions about the best way to accomplish tasks, or ask about known issues, or write posts asking for help if they are having trouble getting something done. Esri staff moderate the posts as best as we can, but it is more of a collaborative online community. A popular use case is for users to first search GeoNet for an issue to see if other users are having it or if they can solve it with feedback on another thread, instead of calling Technical Support first. Technical Support is a place that people can call or email if they have questions or are having problems with Esri software. Analysts in Technical Support can provide assistance using our software as explained in our documentation, or test reproducible cases when there are problems and log bugs as appropriate. I hope this provides some clarity. In short, GeoNet is a free online community to discuss and ask for help (e.g. an online forum), and Technical Support is (usually) a paid service as part of a maintenance program or bought separately to get expert advice with Esri software and get bugs logged as appropriate.
... View more
10-09-2017
09:24 AM
|
1
|
1
|
3264
|
|
POST
|
Kristian is correct. Esri Technical Support is the best place to start if you think you have uncovered an issue with the software. If that issue turns out to be a bug, Support can log it as such. Here is another handy link for your convenience: Contact Tech Support Esri Support Contact Tech Support
... View more
10-06-2017
08:53 AM
|
0
|
3
|
3264
|
|
POST
|
Hmm, I think I was able to get it to work here: JS Bin - Collaborative JavaScript Debugging I referenced two css file: <link rel="stylesheet" href="https://js.arcgis.com/3.20/esri/themes/calcite/dijit/calcite.css"> <link rel="stylesheet" href="https://js.arcgis.com/3.20/esri/themes/calcite/esri/esri.css">
... View more
06-19-2017
03:13 PM
|
3
|
2
|
1514
|
|
BLOG
|
Part 1: Console.table Console.log is our primary debugging function, but this function's output can be a bit difficult to read (especially when viewing a lot of data). One way to enhance our console log messaging and view data more easily is to display a list of objects as a table, which is accomplished using the console.table function. This function takes one mandatory argument, which must be an array or an object, and one additional optional parameter. Each element in the array is a row in the table. Let’s take a look at the Console Table sample. 1. Open the Chrome Developer Tools by using shortcut keys (Windows: Control + Shift + I, and Mac: Command + Option + I), or by navigating to the top right-hand pane of the browser, clicking the three grey vertical dots, and choosing “More tools” > “Developer tools”. 2. Select the console tab. 3. Click “Perform Query” in the sample application. This performs a query task to view all counties in Connecticut. The code uses the console.table to print the results in a table as shown below. Every row in the table shows all attributes for a specific county. Next, we use the console.log to compare the console.log and console.table. This function will print a line with an array of objects. Once we expand the array, we can view the objects in a list. To view the attributes, we must expand the objects in the list.While we can access the attributes of one feature when using console.log, we can view all attributes for all features at once using console.table! The image below shows both functions in the console window.Part 2: Conditional Breakpoints In JavaScript Debugging Tips Part II, we talked about setting a breakpoint in the Sources tab, refreshing the application, and pausing the application at that line of code. This is a great way to examine your code and how functions are called, and where potential areas of trouble could arise. However, sometimes we don’t want the breakpoint to be reached every time. Sometimes we only want the breakpoint to be reached if certain conditions are met. While we could write some logic code in the form of a loop to check for values, there is an easier way to do this at runtime. For example, let’s look at a sample. 1. Open the Edit Features sample and the Chrome Developer Tools. 2. Navigate to the Sources tab, and left-click line 301 to set a breakpoint there. 3. After the breakpoint is set, right-click the breakpoint and select “Edit breakpoint…”.Note: We could also get here by first right-clicking line 301 and selecting “Add conditional breakpoint…”. 4. Set a condition whereby the breakpoint will be reached only if the user inputs “test” into the “Contact:” field when updating a feature. Here is the code: editFeature.attributes["Incident_Address"] == “test”Note: We do not want to use "=" because this assigns a value and thus always returns true, so we must use "==". 5. If we input “test” for the “Contact:” and click “Update incident info”, the breakpoint will be reached and the application pauses. These conditional breakpoints can be useful for testing when you want to ensure data is sent back to the server correctly, or for error handling when you want the application to pause so you can inspect the object(s) of interest rather than letting your error handling code take over.Part 3: Blackboxing While setting breakpoints is a great way to make friends and go through your code, this process can occasionally kick you out of the file of interest and into another source file or into a third-party JavaScript library. For example, let’s look at a sample. 1. Open the Query SceneLayerView sample to follow along (this is similar to the sample found on developers.arcgis.com). 2. Open the Chrome Developer Tools, select the Sources tab, and left-click line 49 to set a breakpoint. 3. Refresh the page so the debugger pauses on line 49. From here, a "Paused in debugger" message appears (next to a "Play" button and a "Step Over" button). See below for a screenshot. 4. If you click the "Step Over" button about five times, you exit out of the main .html file and into the init.js file of the ArcGIS API for JavaScript. You can explore the init.js file, but we want to focus on the code that we wrote. Click the "Play" button to get home safely. Enter blackboxing to save the day. Blackboxing is a method to exclude files and libraries from the debugger, so that your focus remains on your file(s) of interest. Let’s take a look at how we can blackbox the ArcGIS API for JavaScript library so we can just step through the main file of interest. 1. With the Developer Tools open, click the three vertical dots in the far right-hand pane of the window and select Settings. 2. On the left-hand side of the window, click “Blackboxing” to open the “Framework Blackbox Patterns”. 3. Click the “Add pattern…” button, and enter this framework pattern: js.arcgis.com.*\.js 4. Click “Add” and check the box above the pattern input to “Blackbox content scripts”. 5. Close the Settings window and return to the Sources tab. 6. Refresh the page so the debugger pauses on line 49. 7. If you click the "Step Over" button about five times, you exit out of the main .html file and into the debugger:///VM file (this is an empty function which you can safely ignore, or read more about here), as well as complete one more "Step Over" operation into the application. Now rather than debugging unnecessary, ancillary libraries, you can focus on debugging the code you wrote or are trying to understand. ![]() One last point worth mentioning is that blackboxing applies to the browser, not just to the webpage or web app of interest. After testing completes, feel free to remove the blackboxed pattern(s) to ensure a conventional web browsing experience. This concludes our blog about advanced tips for using the Google Chrome Developer Tools with examples from the ArcGIS API for JavaScript. We hope you found the above tips useful and entertaining. For more information about debugging tips with JavaScript applications, here are a couple additional resources from the past several years:Additional Resources
Join us next time as we continue to delve ever deeper into Developer Tools and learn some valuable lessons. Happy debugging!</span> Artemis F. and Noah S. - Esri SDK Support |