|
POST
|
You can disable the snapshot behavior by adding this prior to loading the SDK: <script type="text/javascript">
window.esriConfig = {
has: {
"featurelayer-snapshot-enabled": !1 // disable snapshot
}
};
</script> For example, in your codepen, you'd add it before this line: <script src="https://js.arcgis.com/4.32/"></script> I don't think I've seen any official documentation for this functionality, but it gets mentioned somewhat casually from time to time, like here and here. My two cents on this particular issue: Esri would do well to allow developers to make this decision on a layer-by-layer basis similar to how it was done in 3.x.
... View more
07-10-2025
05:09 PM
|
0
|
2
|
1069
|
|
POST
|
The Sketch widget overrides the value of availableCreateTools supplied in the constructor. Whether that's a bug or not is debatable (I would suggest that it is), but whatever the case, you should be able to set it after the constructor instead: sketch = new Sketch({
layer: graphicsLayer,
view: view,
creationMode: "update"
});
sketch.availableCreateTools = ["point", "polyline", "rectangle", "freehandPolygon", "multipoint", "freehandPolyline", "polygon"];
... View more
06-04-2025
04:46 PM
|
0
|
0
|
412
|
|
POST
|
You can probably achieve the desired behavior by using the goTo method of the MapView. For example: mapView.goTo({
target: point,
zoom: 16
});
... View more
06-04-2025
04:27 PM
|
0
|
0
|
353
|
|
POST
|
Setting resultGraphicEnabled in the sample with 4.31 works as well...
... View more
05-15-2025
05:27 PM
|
1
|
0
|
1146
|
|
POST
|
My bad, just saw you were using 4.31. I'll check the samples with that version.
... View more
05-15-2025
05:24 PM
|
0
|
1
|
1146
|
|
POST
|
It does sound like a bug, but since it works in the samples, I'm not sure what to say about it. Are you also using 4.32? The code I gave is the "autocast" syntax, so should work without the constructor: const invisible = {
type: "simple-marker",
style: "square",
color: [0, 0, 0, 0],
size: "8px",
outline: {
color: [0, 0, 0, 0],
width: 1
}
};
sources.forEach(searchSource => {
searchSource.resultSymbol = invisible;
}); I'm not certain it'll make a difference, but may be worth a try. Other things would be to delete your temporary internet files (i.e. clear your cache), and user your browser's developer tools to ensure you see the latest code, and it's actually being executed by placing breakpoints, etc.
... View more
05-15-2025
05:22 PM
|
0
|
2
|
1146
|
|
POST
|
It seems to me that setting resultGraphicEnabled to false should have done it, but since it didn't, there are alternatives. For example, sources is a collection of SearchSource objects. Each of those has its own resultGraphicEnabled property, so you might try setting those to false. If that doesn't work, SearchSource objects also have a resultSymbol property that allows you to define the appearance of the selection symbol. You might try setting that property with a completely transparent symbol. For example: //SimpleMarkerSymbol for points
{
type: "simple-marker",
style: "square",
color: [0,0,0,0],
size: "8px",
outline: {
color: [0,0,0,0],
width: 1
}
} or //SimpleFillSymbol for polygons
{
type: "simple-fill",
color: [0,0,0,0],
style: "solid",
outline: {
color: [0,0,0,0],
width: 1
}
}
... View more
05-15-2025
02:58 PM
|
0
|
4
|
1165
|
|
POST
|
Technically yes, but it's not pretty. Despite the workflow being different, the basic problem and its solution are described in this thread. In your workflow, you just want the layer to draw the changes. What makes these similar is that the layer is doing the same kind of query operation seen in that thread in order to retrieve the data and draw it on the map. The only way I know of to alter this workflow and insert a where clause is to use a RequestInterceptor. A recent thread involving the use of those is here.
... View more
04-28-2025
10:43 AM
|
1
|
0
|
635
|
|
POST
|
After testing, I've concluded this was fixed in 4.32 since the situation described above now works without having to apply any fixes.
... View more
04-24-2025
12:12 PM
|
0
|
0
|
461
|
|
POST
|
The short answer is yes, you can do what you're talking about. The key to it is implementing a RequestInterceptor that captures the print service request before it's sent, and modifies the request to include the definitionExpression that you want for your request, but not necessarily for the layer presently in your map. That way you don't have to assign it directly to the layer. Note, interceptors are added to the "interceptors" property of esriConfig.request.
... View more
04-21-2025
03:29 PM
|
2
|
1
|
936
|
|
POST
|
The object referred to as "esriId" is the esri/identity/IdentityManager module. A shortcut to the documentation of the registerToken method is here.
... View more
04-14-2025
12:31 PM
|
0
|
6
|
1366
|
|
POST
|
Did this end up working out, or did you find something else more suitable?
... View more
04-09-2025
11:09 AM
|
0
|
1
|
788
|
|
POST
|
As far as I can tell, your code looks fine. Here's something to look into though: Your query's where clause "1=1" will return every record in the layer (this is and of itself is fine). Your console window only shows one record, which itself appears to be fine. However, it's possible that one record somewhere in the midst of all the records returned by the query has a null geometry. Such a case could cause the problem you're seeing. In that case, you might want to add a check to see if a record has a geometry before processing it.
... View more
04-09-2025
10:54 AM
|
0
|
0
|
828
|
|
POST
|
It looks like this may be the same issue resolved in this thread: https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-row-to-a-table-using-js-4-x/m-p/1601382/highlight/true#M86790 Is that true, or is this a different one?
... View more
04-08-2025
10:17 AM
|
1
|
1
|
536
|
|
POST
|
Aloha Noah, thanks for following up. Your example uses the Shape_Length field, so doesn't exhibit the problem, since that's a numerical attribute. The problem I'm running into appears to happen when using the Geometry function. In your example, I changed the expression to: expression: "Round(Length(Geometry($feature),\"feet\"),2)" In doing so, I was surprised to find it working. I then changed line 22 to use version 4.31, and the labels stopped appearing, although there weren't any errors in the console. It appears that perhaps this may have been fixed in 4.32. I haven't started testing with 4.32 yet, but plan to later this week or next. When I do, I'll try this issue out and see what happens.
... View more
04-08-2025
09:45 AM
|
1
|
0
|
591
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-09-2025 09:35 AM | |
| 2 | 12-09-2025 09:06 AM | |
| 1 | 11-26-2025 12:29 PM | |
| 3 | 11-26-2025 09:11 AM | |
| 1 | 10-02-2025 01:14 PM |