|
POST
|
Sure, here is the reference for 3x: IdentityManager | API Reference | ArcGIS API for JavaScript 3.32 3x has the same generate/register functions for tokens
... View more
04-20-2020
01:27 PM
|
0
|
2
|
1772
|
|
POST
|
Most of the security workflows happen in the IdentityManager module. You can generate and register tokens there.
... View more
04-20-2020
01:16 PM
|
1
|
4
|
1772
|
|
POST
|
The module require needs to match up with those in the function. So you have require(["esri/views/MapView",
"esri/WebMap",
"esri/config",
"esri/widgets/Sketch",
"esri/Graphic",
"esri/layers/GraphicsLayer"
], function(MapView, Graphic, WebMap, esriConfig, Sketch, GraphicsLayer) { try changing it to require(["esri/views/MapView",
"esri/WebMap",
"esri/Graphic",
"esri/config",
"esri/widgets/Sketch",
"esri/layers/GraphicsLayer"
], function(MapView, WebMap, Graphic, esriConfig, Sketch, GraphicsLayer) {
... View more
04-07-2020
01:01 PM
|
1
|
0
|
2984
|
|
POST
|
Try adding the graphics layer to the map last (after you add all the other layers). If that doesn't fix the issue, you could try creating a client side feature layer instead of a graphics layer. Here is a sample for creating a client side feature layer: https://codepen.io/benesri/pen/gOpJxpL
... View more
04-03-2020
08:05 AM
|
0
|
2
|
3187
|
|
POST
|
Which version of the API are you using? Have you tested in 4.14?
... View more
04-02-2020
12:34 PM
|
0
|
4
|
3187
|
|
POST
|
The map works for me as well in both IE and Edge. Are there any error messages in the console when it doesn't work for you?
... View more
03-24-2020
01:25 PM
|
0
|
2
|
2025
|
|
POST
|
Hi Tony, I'm good, thanks. Hope things aren't too crazy on your end as well. Hm.. yeah as I mentioned I am not too familiar with the way Azure AD works. Can you see if there is an Azure AD token in the cookies/storage of your JavaScript app after signing in? It may be worth switching the auth workflow to the one above just to see if both of the APIs end up working. If you would like help setting up the workflow or if you try and it doesn't work, I would suggest contacting Technical Support. It would be a lot easier to troubleshoot the issue with the ability to share screens and speak over the phone. If you do, put the product as the ArcGIS JavaScript API and attach this thread to the notes. I will tell my team that I have been working with you and that I will own the ticket. Ben
... View more
03-17-2020
08:43 AM
|
0
|
0
|
4392
|
|
POST
|
You should still have the Azure ID Token with this method. To test this, try logging in to your Portal with your Azure AD credentials. Does an Azure ID Token get saved in your cookies or local/session storage? Edit: You can check in Chrome: View, Edit, And Delete Cookies With Chrome DevTools
... View more
03-16-2020
10:24 AM
|
0
|
2
|
4392
|
|
POST
|
I haven't worked with Azure AD much, but when you set up your authentication with the method I mentioned above, it will also be authenticating with your IDP. The issue with going directly through your Azure AD is that an ArcGIS Token is never created. I would suggest trying the method above and seeing if your Azure AD auth info is saved as either a cookie or local/session storage once you are redirected back to your application. If so, you should still be able to use the other API hosted through Azure.
... View more
03-16-2020
08:55 AM
|
0
|
4
|
4392
|
|
POST
|
Have you configured your Enterprise with SAML? Here are instructions specific to Azure AD. If so, the best way to do this is instead of your JS app authenticating with your Azure AD, you redirect it to your Portal sign in page which is set up with SAML. Your Portal then authenticates with your Azure AD, creates an ArcGIS Token, and then redirects back to your application with the token which allows you to access secured services. To do this, you would need to set up an application in your portal to get an App ID. The code below would be used to authenticate <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no" />
<title></title>
<link rel="stylesheet" href="https://js.arcgis.com/4.14/esri/themes/light/main.css" />
<script src="https://js.arcgis.com/4.14/"></script>
<style>
html,
body,
#viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>
<script>
require([
"esri/identity/OAuthInfo",
"esri/identity/IdentityManager",
], function (OAuthInfo, esriId) {
var info = new OAuthInfo({
appId: "APPID",
portalUrl: "https://SERVERNAME/portal",
popup: false
});
esriId.registerOAuthInfos([info]);
esriId.getCredential(info.portalUrl + "/sharing");
esriId.checkSignInStatus(info.portalUrl + "/sharing")
.then(function (evt) {
initMap();
})
.catch(function (err) {
console.log(err);
});
function initMap() {
// do stuff here
}
});
</script>
</head>
<body>
<div id="viewDiv"></div>
</body>
</html>
... View more
03-16-2020
08:30 AM
|
0
|
7
|
4392
|
|
POST
|
Take a look at the measure widget: Measurement in 2D | ArcGIS API for JavaScript 4.14
... View more
03-16-2020
08:13 AM
|
1
|
0
|
3982
|
|
POST
|
This is actually now the preferred method for storing credentials: How To: Limit access to secured hosted services in ArcGIS Online for public-facing web applications We are trying to move away from the resource proxy. Storing credentials using the resource proxy for the purpose of bypassing authentication is against the Terms & Conditions. There was a little paragraph added to the github page: Ensure that you follow the Terms & Conditions of the Esri systems and software that you are working with. In general, it is not permitted to embed credentials in a resource proxy for the purpose of bypassing Named User authentication (i.e. the principle that each end-user must have their own unique login). This is true both when using a resource proxy with ArcGIS Online as well as for ArcGIS Server sites federated as part of an ArcGIS Enterprise deployment
... View more
03-02-2020
01:13 PM
|
1
|
2
|
3439
|
|
POST
|
One last option is to download the points as a csv which you could load back into future applications. Here is a sample I made a while back that may be helpful: https://codepen.io/benesri/pen/ZEzyQNm
... View more
03-02-2020
12:18 PM
|
1
|
0
|
1166
|
|
POST
|
Hi Chris, I was able to reproduce the issue on my end with the following error: Access to image at 'https://sig.nanterre.fr/ags/rest/services/Adresse_Voie/MapServer/export?bbox=631714.6775547416%2C6859217.652993829%2C651746.8509524217%2C6874474.61684109&bboxSR=102110&imageSR=102110&size=1183%2C901&dpi=96&format=png32&transparent=true&layers=show%3A-1&f=image' from origin 'https://www.nanterre.fr' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'https://sig.nanterre.fr' that is not equal to the supplied origin. The issue seems to be the browser switching from the origin www.nanterre.fr to sig.nanterre.fr and then back. The easiest fix without digging too deep would be to change the Access-Control-Allow-Origin header from the origin https://www.nanterre.fr to *
... View more
02-27-2020
10:22 AM
|
0
|
0
|
6935
|
|
POST
|
Are you seeing this error message on your server or client? If you are seeing it on the client, it usually means the request timed out. I would suggest catching the error and retrying. If you are seeing this from the server it usually means the client canceled the request, which wouldn't make sense in this situation since you are the client as well. Does it work with http?
... View more
02-21-2020
08:36 AM
|
0
|
0
|
939
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-22-2021 10:22 AM | |
| 1 | 01-19-2023 11:10 AM | |
| 1 | 08-30-2022 04:09 PM | |
| 2 | 08-22-2022 03:20 PM | |
| 1 | 08-22-2022 03:57 PM |
| Online Status |
Offline
|
| Date Last Visited |
02-03-2023
03:22 AM
|