|
IDEA
|
Sorry about that. I would have attached the video to a comment if I could have.
... View more
10-10-2019
03:06 PM
|
0
|
1
|
2039
|
|
IDEA
|
Sorry about that. I would have attached the video to a comment if I could have.
... View more
10-10-2019
03:06 PM
|
0
|
1
|
2805
|
|
IDEA
|
That's not the same. If you were an ArcMap user you'd know what I was talking about.
... View more
10-10-2019
07:15 AM
|
0
|
1
|
2039
|
|
IDEA
|
That's not the same. If you were an ArcMap user you'd know what I was talking about.
... View more
10-10-2019
07:15 AM
|
0
|
1
|
2805
|
|
IDEA
|
It would be nice to have click and hold down the mouse wheel until the cursor changes to roam functionality in ArcMap to be implemented also for ArcGIS Pro and Runtime .NET.
... View more
10-09-2019
03:20 PM
|
2
|
7
|
2229
|
|
IDEA
|
It would be nice to have click and hold down the mouse wheel until the cursor changes to roam functionality in ArcMap to be implemented also for ArcGIS Pro and Runtime .NET.
... View more
10-09-2019
03:20 PM
|
2
|
7
|
2995
|
|
IDEA
|
Good question. What I had in mind was a simple single-color override in the current map, but I can see where people might want to work with renderers for different annotation classes. For my purposes, I wouldn't want to make changes to the underlying data.
... View more
09-24-2019
07:45 AM
|
0
|
1
|
1373
|
|
BLOG
|
100.6 UPDATE: 100.6 properly populates group layers in a MMPK. However, a bug identified at 100.5 is still present: QueryRelatedFeaturesAsync will not return results for feature layer that is a sublayer of a group layer.
... View more
09-10-2019
02:21 PM
|
0
|
0
|
766
|
|
POST
|
The problem is still present in 100.6. That's just plain pathetic!
... View more
09-10-2019
01:21 PM
|
0
|
4
|
1045
|
|
BLOG
|
Although using CSP with 4.x doesn't create any CSP errors, it does create a handful of JavaScript warnings: Failed to create Worker. Fallback to execute module in main thread [dojo.js: 334, message="Uncaught null"]. While this doesn't seem to affect functionality (I tried it against the "Watch for changes" sample), it could possibly affect performance.
... View more
09-06-2019
10:12 AM
|
0
|
0
|
4751
|
|
POST
|
The short answer is no. The error you're showing is actually a Dojo error, which you can eliminate by configuring csp-restrictions. Unfortunately, ArcGIS API 3.x itself contains code that will be rejected by CSP without the 'unsafe-eval' tag. This isn't an issue with 4.x, so unless there's 3.x functionality you really need, you should consider going that route. See this link for more info: https://community.esri.com/groups/geodev/blog/2019/09/05/content-security-policy-and-the-arcgis-api-for-javascript
... View more
09-05-2019
01:58 PM
|
0
|
0
|
1522
|
|
BLOG
|
Does the ArcGIS API for JavaScript work with Content Security Policy? The short answer is yes, but which version you're using (4.x vs. 3.x) determines the approach to take. Dojo allows you to configure support CSP support: // mapconfig.js
window.dojoConfig = {
async: true,
has: {"csp-restrictions": true}
}
So the following example works [note that blob support must be enabled]: <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="content-security-policy"
content="script-src 'self' https://js.arcgis.com blob:; object-src 'self'" />
<title>Using ArcGIS API for JavaScript with CSP</title>
<script src="./mapconfig.js"></script>
<link rel="stylesheet" href="https://js.arcgis.com/4.12/esri/css/main.css">
<script src="https://js.arcgis.com/4.12/"></script>
<style>
html, body, #map {
padding: 0;
margin: 0;
height: 100%;
width: 100%
}
</style>
</head>
<body>
<div id="map"></div>
<script src="./mapinit412.js"></script>
</body>
</html> //mapinit412.js
require([
"esri/Map",
"esri/views/MapView"
], function (Map, MapView) {
var map = new Map({
basemap: "topo-vector"
});
var view = new MapView({
container: "map",
map: map,
center: [-118.71511, 34.09042],
zoom: 11
});
}); Note that CSP doesn't allow any inline JavaScript, so even the simplest blocks of code need to be in a separate file. What about 3.x? Aye, there's the rub. Although Dojo supports CSP, the ArcGIS API 3.x does not: it contains code that CSP will reject. Here's an example from VectorTileLayerImpl.js: l = Function("return this")(); The only way to get 3.x to work with CSP is to include the dreaded 'unsafe-eval' in the policy string. With that, the following example will work: <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="content-security-policy"
content="script-src 'self' 'unsafe-eval' https://js.arcgis.com; object-src 'self'" />
<title>Using ArcGIS API for JavaScript with CSP</title>
<script src="./mapconfig.js"></script>
<link rel="stylesheet" href="https://js.arcgis.com/3.29/esri/css/esri.css">
<script src="https://js.arcgis.com/3.29/"></script>
<style>
html, body, #map {
padding: 0;
margin: 0;
height: 100%;
width: 100%
}
</style>
</head>
<body>
<div id="map"></div>
<script src="./mapinit329.js"></script>
</body>
</html> // mapinit329.js
require(["esri/map"], function (Map) {
var map = new Map("map", {
center: [-118, 34.5],
zoom: 8,
basemap: "topo"
});
});
... View more
09-05-2019
01:41 PM
|
1
|
5
|
7477
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-04-2012 06:42 AM | |
| 1 | 09-23-2021 10:42 AM | |
| 2 | 09-28-2021 07:07 AM | |
| 1 | 04-07-2021 10:31 PM | |
| 3 | 03-21-2021 01:14 PM |
| Online Status |
Offline
|
| Date Last Visited |
01-07-2022
08:31 AM
|