|
POST
|
At 4.10, I believe direct access to graphics was replaced by the use of applyEdits(). At 4.10, if you would like for your graphic to not display then you can use the 'deleteFeatures' parameter of applyEdits(...). When direct manipulation (add/delete) of a Graphic is absolutely necessary in an app, I've then switched back to using a GraphicsLayer.
... View more
02-11-2019
08:38 AM
|
1
|
1
|
1178
|
|
POST
|
I use the StreamLayerView.queryLatestObservations() method.
... View more
01-17-2019
08:29 AM
|
2
|
2
|
1115
|
|
POST
|
As mentioned in the help, the geometryEngine.geodesicLength() method works with 4326 and Web Mercator spatial references, and it suggests you should use geometryEngine.planarLength() instead.
... View more
01-15-2019
08:15 AM
|
1
|
1
|
2911
|
|
POST
|
Does it update when you call FeatureLayer.applyEdits(..) instead? Maybe using the 'cacheBust' parameter in a RequestInterceptor might help?
... View more
12-19-2018
11:19 AM
|
1
|
1
|
4606
|
|
POST
|
As described in the help, BufferParameters this is used when calling buffer() method on the GeometryService.
... View more
12-12-2018
03:06 PM
|
1
|
1
|
1762
|
|
POST
|
I believe the goTo(...) method can take a Viewpoint for the 'target' parameter, and the Viewpoint has a 'camera' parameter, so I wonder if you could manipulate the fov in this manner as part of calling goTo(...)? Another way to directly manipulate the Camera properties it to clone the camera, change the properties, then re-assign it to the view.
... View more
12-11-2018
08:18 AM
|
1
|
0
|
4239
|
|
POST
|
Have you tried densifying the feature polyline geometries? Not sure, but it could be that only vertices are "relative-to-ground" and the sections between vertices are not?
... View more
11-27-2018
08:10 AM
|
1
|
0
|
4145
|
|
POST
|
Please note that not all polygons with multiple rings have multiple parts; for example a single water body with a single island is represented by as a single part polygon compose of multiple rings. Each ring can represent a different part OR a different ring within a part. When creating a list of single part polygons as Dan suggest above, please make sure you deal with these nuances correctly. Below is what I'v used in the past to disassemble a polygon into a list of single part polygons. You can then iterate over the list of polygons and simply call 'contains(...)' on each polygon. multipart_to_singlepart: function (sourcePolygon) {
if(sourcePolygon.rings.length > 1) {
let originalPolygon = geometryEngine.simplify(sourcePolygon).clone();
let holes = [];
let polygons = [];
for (let ringIndex = 0; ringIndex < originalPolygon.rings.length; ringIndex++) {
let ring = originalPolygon.rings[ringIndex];
if(ring.length >= 3) { // IGNORE RINGS WITH LESS THAN THREE VERTICES //
if(originalPolygon.isClockwise(ring)) {
polygons.push(new Polygon({ spatialReference: originalPolygon.spatialReference, rings: [ring] }));
} else {
holes.push(ring);
}
}
}
polygons.sort(function (geomA, geomB) {
return geometryEngine.planarArea(geomA, "square-meters") - geometryEngine.planarArea(geomB, "square-meters");
});
for (let holeIndex = 0; holeIndex < holes.length; holeIndex++) {
for (let geomIndex = 0; geomIndex < polygons.length; geomIndex++) {
if(polygons[geomIndex].contains(new Point({ spatialReference: originalPolygon.spatialReference, x: holes[holeIndex][0][0], y: holes[holeIndex][0][1] }))) {
polygons[geomIndex].addRing(holes[holeIndex]);
break;
}
}
}
return polygons;
} else {
return [sourcePolygon];
}
}
... View more
10-29-2018
04:59 PM
|
2
|
0
|
4658
|
|
POST
|
I would just use esriRequest instead of XMLHttpRequest, and also please note that the signature for esriRequest is different at 4.x so it won't work as you have it above: Esri Request | API Reference
... View more
10-22-2018
05:07 PM
|
1
|
0
|
3191
|
|
POST
|
I'm not 100% sure, but it looks like the definitionExpression is not quite correct. You can verify the query string by looking at the request being sent to the service in the browser dev tools, and then you can test it out in the service REST page. attractions.definitionExpression = "Type = '" + newValue + "'";
... View more
10-11-2018
01:19 PM
|
0
|
0
|
4726
|
|
POST
|
Q: Is featureSet a FeatureSet or an array of Graphic objects? If its a FeatureSet, then try looping over the 'features' property which is an array of Graphic objects: array.forEach(featureSet.features, function (feature) {
// ... //
});
... View more
10-11-2018
01:04 PM
|
1
|
1
|
4013
|
|
POST
|
Marc, what you describe is the correct behavior; the credentials for apps hosted on arcgis.com can't be used for apps hosted on your own domain. If using OAuth to authenticate, we always make sure to call IdentitiyManager.registerOAuthInfos(...) with the appropriate appid, and then depending on what we need to do we sometimes use a combination of IdentityManager.checkSignInStatus(...) and/or the 'authMode' Portal constructor parameter to help with the sign-in process. Something similar to this: IdentityManager.checkSignInStatus(portalUrl).then(()=>{
/*...do other things here...*/
const myPortal = new Portal({url:portalUrl,authMode:"immediate"});
myPortal.load().then(()=>{
console.info(myPortal.user, myPortal);
/*...do other things here...*/
});
}); I hope this helps.
... View more
09-17-2018
10:48 AM
|
2
|
0
|
2075
|
|
POST
|
Check out the 'Promote secured services' section of the 4.8 release notes:Release notes for 4.8
... View more
09-17-2018
10:23 AM
|
0
|
0
|
3139
|
|
POST
|
I could be wrong, but it's my understanding that credentials are based on the originating domain. I think you're not "already connected to my ArcGIS Online account" when running your local app as it doesn't originate from the same domain as the app that generated those credentials (such as arcgis.com). What I normally do in this use case is to use just the base domain when registering app items, so once I've provided my credentials to one of my apps originating from that domain, then the credentials will be used for other apps originating from the same domain.
... View more
09-13-2018
11:09 AM
|
1
|
3
|
2075
|
|
POST
|
As Robert points out via the provided link, you should call the 'search' method: searchWidget = new Search({ view:view, searchTerm: "1024 E 8th" }); view.ui.add(searchWidget, "bottom-right"); view.when(()=>{ searchWidget.search(); });
... View more
09-12-2018
01:02 PM
|
2
|
1
|
1420
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-07-2024 04:14 PM | |
| 1 | 02-23-2024 12:40 PM | |
| 1 | 03-01-2024 10:48 AM | |
| 2 | 08-03-2023 02:34 PM | |
| 2 | 07-19-2023 12:05 PM |
| Online Status |
Offline
|
| Date Last Visited |
10-24-2024
06:01 PM
|