BLOG
|
I am using typescript to develop applications using the ArcGIS Javascript API. When you import chart.js as above (importing using a script tag or dojoConfig), the type definitions are not available when coding. Alternatively, when you import the types using ... import Chart from 'chart.js'; after running ... npm i --save-dev @types/chart.js
npm i --save chart.js a 404 error occurs at runtime, stating that "<websiteUrl>/chart.js is not found". The site is smart enough to not look for "esri/..." modules in the root of the url. How can I make it just as smart with respect to the "chart.js" module? Simply adding ... {
name: "chart.js",
location:
} to window.dojoConfig.packages does not change anything - I still get a 404 error at runtime. 😞 If you have insight, please help! * Update * So it looks like dojoConfig does not like package names containing ".". Modifying the name of the type definition file (found in node_modules/@types) from "chart.js" to "chartjs" did the trick, along with this addition window.dojoConfig.packages: {
name: "chartjs",
location: "https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/",
main: "Chart"
}
... View more
01-30-2021
06:47 AM
|
0
|
0
|
2757
|
POST
|
Hello Abiel I had the same problem. To deal with an Uncaught error, you need to call the catch() function. For example: view.goTo(camera).catch(e => { console.error(e); // Deal with error here }) However, this will still display the error. I used this solution to silence the error - although I am not sure this is a good practice. view.goTo(camera).catch(e => { return; })
... View more
10-21-2020
12:50 PM
|
0
|
0
|
1770
|
POST
|
Did you ever resolve this issue? I am encountering the same error.
... View more
10-16-2019
07:54 AM
|
0
|
0
|
1505
|
POST
|
I am using a different method and SceneView, but am facing a similar problem. Because the feature set I am using straddles the date line, the scene zooms to Africa. From this perspective, I cannot actually see any of the features. view.goTo(layer.queryExtent())
... View more
09-20-2019
07:52 AM
|
0
|
0
|
455
|
POST
|
I found the solution. The correct url is http://[your host name: port]/webappbuilder/stemapp/?config=sample-configs/config-demo.json It can be found here: https://developers.arcgis.com/web-appbuilder/guide/get-started.htm
... View more
07-15-2019
02:28 PM
|
0
|
0
|
906
|
POST
|
I am also having this issue. No errors are raised on the server or client side. Any tips on how to debug?
... View more
07-15-2019
10:23 AM
|
0
|
0
|
906
|
POST
|
By default, feature labels do not appear when overlapping with other labels. There is ample documentation on how to change this default behaviour so that all labels appear (and overlap, if necessary): Why specify methods to resolve label conflicts?—Help | ArcGIS for Desktop Unfortunately, this documentation only applies to ArcGIS for Desktop. I cannot find anything that suggests you can change the default behaviour when using the Javascript API. It seems strange that this would be the case, however, considering that the functionality is present in the Desktop software. Does anyone know how to make it so that all labels are displayed, and overlap when they conflict?
... View more
09-20-2018
09:32 AM
|
0
|
4
|
2346
|
Online Status |
Offline
|
Date Last Visited |
06-28-2021
12:59 PM
|