|
POST
|
Hi @AbdulSamim these types of errors are typically related to project configuration, and not a bug in the ArcGIS JS API. Please provide a link to a simple github repository that reproduces the issue.
... View more
10-31-2022
09:36 AM
|
0
|
0
|
2211
|
|
POST
|
Hi @AbdulSamim check to see if you have .wasm configured in your local webserver: https://developers.arcgis.com/javascript/latest/install-and-set-up/#web-server-hosting-configuration
... View more
10-28-2022
10:07 AM
|
0
|
2
|
2310
|
|
POST
|
Hi @daltvr for localizing the various elements that belong to the ArcGIS JS API, see this guide topic: https://developers.arcgis.com/javascript/latest/localization/. The API widgets use their own localization strings.
... View more
10-26-2022
09:11 AM
|
0
|
0
|
890
|
|
POST
|
> is not an ESRI Api Key, but an API Key for an Azure API Management component Gotcha. You'll need to contact Azure technical support since that's their product. We don't have any control or knowledge of their security practices.
... View more
10-06-2022
12:14 PM
|
0
|
0
|
2121
|
|
POST
|
@NicolasSwijngedouwIf you inject unauthorized headers it will cause a CORS pre-flight error. Here are a few resources to check out on the coding patterns for using API keys: https://developers.arcgis.com/javascript/latest/secure-resources/#api-keys, https://developers.arcgis.com/documentation/mapping-apis-and-services/security/api-keys/ and https://developers.arcgis.com/javascript/latest/display-a-map/#get-an-api-key
... View more
10-06-2022
07:27 AM
|
0
|
2
|
2141
|
|
POST
|
Hi @bsides can you provide a simple github repository that we can use to reproduce the issue? That's going to be the best way for us to help figure this out. The error message is just a generic message.
... View more
10-05-2022
04:24 PM
|
0
|
0
|
1381
|
|
POST
|
> It seems like the setAssets() function, somehow, is not honored. Try copying all of your assets to a common directory . There is a known issue when there are multiple calcite components being used with the JS API. It has do with calcite-components using Stencil.js and Stencil also uses setAssetsPath => https://stenciljs.com/docs/assets#setassetpath.
... View more
09-30-2022
11:12 AM
|
1
|
0
|
3282
|
|
POST
|
Hi @MichailMarinakis1 correct there is no overlap between the JS API CSS and calcite-components CSS. Here is an SDK sample app showing them being used in the same application: https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=watch-for-changes-reactiveutils. Only as long as Calcite is in beta, you will need to ensure you are using the right version for the corresponding JS API release, and that information can be found in the JS API release notes under the Additional Packages section, for example: https://developers.arcgis.com/javascript/latest/release-notes/#additional-packages Were you able to get a prototype working that combined the two css packages?
... View more
09-30-2022
08:33 AM
|
0
|
2
|
3291
|
|
POST
|
Hi @MichailMarinakis1 can you share a simple github repository that reproduces the issue? Also, since Calcite is still in beta, we don't recommend mixing different versions of Calcite. The prerelease tags cause issues with the dependency trees. And, yes, thanks for the feedback on needing some doc or an example. We are working on getting that addressed.
... View more
09-23-2022
11:32 AM
|
0
|
4
|
3328
|
|
POST
|
Hi @EmilioPetrangeli can you try again using the sample here: https://github.com/Esri/jsapi-resources/tree/master/esm-samples/jsapi-create-react-app? I'm not sure which tutorial you are using, for example you don't need to configure the assetsPath for most installs, the default pattern is to the use CDN-hosted assets as described here: https://developers.arcgis.com/javascript/latest/es-modules/#working-with-assets.
... View more
09-16-2022
07:26 AM
|
0
|
0
|
7259
|
|
POST
|
Thanks for posting that info @Stacy-Rendall. With respect to the original posting on this thread, there are issues with Webpack 4 and "@arcgis/core" versions 4.24+ due to the API being upgraded to ES2020 and including both optional chaining and nullish coalescing operators. Here's the full explanation and Webpack configuration recommendations: https://github.com/Esri/jsapi-resources/tree/master/esm-samples/webpack#known-issues
... View more
09-13-2022
07:37 AM
|
1
|
0
|
1635
|
|
POST
|
Hi @john_cartwright_noaa like @JasonDoingMaps mentioned, TypeScript limitations cause autocasting to throw errors during the build process. Are you using ESM or AMD modules? The best practice when you run into TypeScript autocasting errors is to break out individual Classes and properties along with their actual types, this way you can maintain type safety. All API modules are typed, for non-module typings you might need to use the __esri namespace. Here is an "@arcgis/core" ESM example. For those reading this that aren't aware, the ES modules include the typings with the npm install. In this example the typings are inferred, and I've shortened the sample for brevity: import Graphic from "@arcgis/core/Graphic";
import Polygon from "@arcgis/core/geometry/Polygon";
const hexGraphic = new Graphic({
// Use an instance of Polygon here
geometry: new Polygon({
rings: [[
[-116.83830158928454, 32.26038282119406],
[-115.25400548040932, 33.43153649157358],
[-115.64454936135779, 35.138559675017866],
[-117.66644115562842, 35.657119683574905],
[-119.2405536967384, 34.468622114983724],
[-118.8045281400983, 32.77943799663874],
[-116.83830158928454, 32.26038282119406]
]]
}),
attributes: {
h3: '8229a7fffffffff',
count: 17324
}
})
... View more
09-06-2022
05:21 PM
|
0
|
0
|
3029
|
|
POST
|
Hi @Mannus_Etten I got it working okay using the inline login pattern. The sample you sent me wasn't working correctly because of how Angular routing works. I think you already suspected that because I saw you started to implement a router. Here's the example app.component.ts (Angular 13, "@arcgis/core" version 4.24). You'll need to figure out all the CSS and routing, etc that happens after the log in process. import { Component } from '@angular/core';
import OAuthInfo from "@arcgis/core/identity/OAuthInfo";
import esriId from "@arcgis/core/identity/IdentityManager";
import Portal from "@arcgis/core/portal/Portal";
import PortalQueryParams from "@arcgis/core/portal/PortalQueryParams";
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'Test Login Page';
private info: OAuthInfo = new OAuthInfo({
// Swap this ID out with registered application ID
appId: "YOUR_APPID_GOES_HERE",
popup: false
});
ngOnInit(): void {
esriId.registerOAuthInfos([this.info]);
esriId.checkSignInStatus(this.info.portalUrl + "/sharing")
.then(() => {
console.log("checkSignInStatus: User is signed in.");
this.displayItems();
})
.catch(() => {
console.error("checkSignInStatus: User not signed in.")
});
}
displayItems(): void {
const portal = new Portal();
// Setting authMode to immediate signs the user in once loaded
portal.authMode = "immediate";
// Once loaded, user is signed in
portal.load().then(() => {
// Create query parameters for the portal search
const queryParams = new PortalQueryParams({
query: "owner:" + portal.user.username,
sortField: "num-views",
sortOrder: "desc",
num: 20
});
console.log("User name: ", portal.user.username);
// Query the items based on the queryParams created from portal above
portal.queryItems(queryParams).then((q) => {
console.log("Portal Query results:", q.results);
});
});
}
// Call from app.component.html page
onLogin() {
esriId.getCredential(this.info.portalUrl + "/sharing");
}
// Call from app.component.html page
onLogout() {
esriId.destroyCredentials();
window.location.reload();
}
} And here is the example app.component.html: <!-- app.component.html -->
<div><button type="submit" (click)="onLogin()"><b>Login</b></button></div>
<div><button type="submit" (click)="onLogout()"><b>Logout</b></button></div>
... View more
08-31-2022
01:47 PM
|
0
|
0
|
3002
|
|
POST
|
Can you clarify what you mean by making sure the login popup can be closed? It should close automatically upon successful login. If a user manually closes the login popup, then it is expected to cancel the login process. That behavior is an industry-standard best practice for all login popups. Can you provide a simple github repo that reproduces the issue? It's hard to say what's happening without seeing an example since there are a lot of pieces involved in authentication. Have you built a non-Angular, plain JavaScript app that is able to log in, just to verify the login functionality? One easy thing to check, when getting credentials be sure to set oAuthPopupConfirmation to false: document.getElementById("sign-in").addEventListener("click", () => {
// user will be redirected to OAuth sign-in page
esriId.getCredential((info.portalUrl + "/sharing"), {
oAuthPopupConfirmation: false
}).then(function() {
displayItems();
});
});
... View more
08-30-2022
08:56 AM
|
0
|
0
|
3013
|
|
POST
|
Hi @Werkwijze_R_beheerder are you working with @Mannus_Etten on the same application? It's a little unclear, and I wanted to make sure the original question got answered, if possible. Your question seems more related to a potential configuration issue.
... View more
08-29-2022
04:26 PM
|
0
|
2
|
3032
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 08-01-2025 06:20 AM | |
| 1 | 05-27-2025 12:39 PM | |
| 1 | 04-23-2025 06:56 AM | |
| 1 | 04-23-2025 07:09 AM | |
| 1 | 04-08-2025 09:05 AM |
| Online Status |
Offline
|
| Date Last Visited |
12-05-2025
07:24 AM
|