|
POST
|
Default values can only be set when publishing the services. Adding default values via the Editor widget is not supported.
... View more
09-09-2022
07:27 AM
|
0
|
0
|
1812
|
|
POST
|
Ah, sorry. That won't work in 4.13. That was introduced at 4.23 I think. Before that, we didn't have that option in the IdentifyParameters like in 3x. In recent 4x version, the sublayers need to come from a MapImageLayer as they need a layer source. https://codepen.io/odoe/pen/qBYbOyG?editors=1000
... View more
09-07-2022
04:00 PM
|
1
|
0
|
2751
|
|
POST
|
You can define the defintionExpression in a sublayer in the IdentifyParameters https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-IdentifyParameters.html#sublayers You can create a MapImageLayer with your sublayers, load it, then add those sublayers to the parameters. https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#source
... View more
09-07-2022
01:23 PM
|
0
|
0
|
2818
|
|
POST
|
I have tried a bunch of variations of of this and cannot replicate this behavior. If you provide a codepen or simplified github sample, could better help, but not sure otherwise.
... View more
09-06-2022
08:25 AM
|
0
|
0
|
1548
|
|
POST
|
The JSAPI isn't open-source, so we don't provide the unminified code anywhere. We only have custom layer extensibility for Tiled layers, not FeatureLayers. We also have request interceptors, where you can modify the response before the layers use it, but no guarantee we don't use the service defined fields for other parts of the drawing and query stuff, you might be able to do some stuff here, but you're just adding to query time here too by pulling in new data requests. https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#RequestInterceptor If you have Enterprise portal, you can do this via a SOE. Doing this on the client is probably going to require a custom worker one way or another
... View more
09-05-2022
09:39 AM
|
0
|
1
|
2085
|
|
POST
|
At a glance, it doesn't look like you are adding the layer to the FeatureTable. Would need a simpler codepen or similar if that doesn't fix it.
... View more
09-05-2022
09:30 AM
|
0
|
1
|
996
|
|
POST
|
It's not a module you can import, but is available in our namespace if you need to type something for it. let handle: __esri.WatchHandle; You get the namespace typings automatically when you install @arcgis/core.
... View more
09-03-2022
09:47 AM
|
1
|
0
|
970
|
|
POST
|
Can you provide a repro of this. If I use the custom action in this sample it doesn't seem to behave like that. https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=popup-actions Can't tell what might be happening in your situation.
... View more
09-02-2022
08:37 AM
|
0
|
1
|
2319
|
|
POST
|
There is a similar question here https://community.esri.com/t5/arcgis-api-for-javascript-questions/joining-api-response-json-data-to-featurelayer/m-p/1207571#M78494 You would need to create a client-side FeatureLayer and manually do the join. It might be worth using a web worker as linked in that post too if the operation blocks page interaction. I've had to do this in the past working an admin who was pretty adamant at keeping "business data" outside the GIS data, and it was always a headache, lol.
... View more
09-02-2022
07:38 AM
|
1
|
3
|
2127
|
|
POST
|
The snippet is incorrect and will be updated in next release. require([
"esri/rest/geometryService",
"esri/rest/support/ProjectParameters"
], function(geometryService, ProjectParameters) {
const params = new ProjectParameters({
geometries: [point],
outSpatialReference: outSpatialReference,
transformation: transformation
});
geometryService.project(url, params).then( ... );
}); This can also be written as: import { project } from "@arcgis/core/rest/geometryService";
import ProjectParameters from "@arcgis/core/rest/support/ProjectParameters";
const params = new ProjectParameters({
geometries: [point],
outSpatialReference: outSpatialReference,
transformation: transformation
});
project(url, params).then( ... ); The snippet assumes you are using ESM, which should only import the project method.
... View more
08-31-2022
03:56 PM
|
1
|
0
|
4550
|
|
POST
|
It's not a class, so you don't create a new instance. It has methods that you just pass the url and options. The old Task based classes were removed at 4.24 after being deprecated for a few releases. https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-geometryService.html References: https://www.esri.com/arcgis-blog/products/js-api-arcgis/developers/rest-is-up-to-the-task/ https://developers.arcgis.com/javascript/latest/release-notes/#breaking-changes
... View more
08-31-2022
02:52 PM
|
0
|
0
|
4593
|
|
POST
|
If you want to join external data to data from a FeatureLayer, it's going to require a few steps. Create a new client-side FeatureLayer with the fields from source FL and external data, and matching geometry to source FeatureLayer Query all the features from your source FeatureLayer. This could be troublesome if you have a large amount of data, so you might need to paginate your requests. Iterate over your features and add new attributes to your features based on a common field. Use FeatureLayer applyEdits to add these features to your client-side FeatureLayer. I wrote a blog post very similar to this workflow, but doing a spatial join based on geometry. In your case it would be based on a common field and matching value. https://odoe.net/blog/spatial-joins Also, if you find that the join is slow due to the amount of data you have and it blocks interaction with your page, you could consider using a custom worker. We have a sample, using the spatial join with a worker, on github. https://github.com/Esri/jsapi-resources/tree/master/esm-samples/jsapi-custom-workers
... View more
08-31-2022
07:25 AM
|
1
|
4
|
4766
|
|
POST
|
hitTest is right, you just need to access the results slightly differently as of 4.24. The documentation explains the 4.24 change and has some snippets. https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#hitTest view.on("click", async (e) => {
const response = await view.hitTest(e);
const result = response.results[0];
if (result.type === "graphic") {
const graphic = result.graphic;
}
else if (result.type === "media") {
const element = result.element;
}
else if (result.type === "route") {
const networkFeature = result.networkFeature;
}
});
... View more
08-30-2022
03:03 PM
|
1
|
1
|
6554
|
|
POST
|
This is probably due to the hiTest updates listed in the 4.24 release notes here. https://developers.arcgis.com/javascript/latest/release-notes/#mapview-and-sceneview-hittest-updates You might want to check for the result type. If you have a repro of your issue, could take a closer look. Is this a TypeScript error? If you check the result.type first, it might help TypeScript narrow the type correct to a GraphicHit. This sample still uses hitTest https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=view-hittest
... View more
08-30-2022
01:13 PM
|
1
|
3
|
6601
|
|
POST
|
That demo was old, check the doc, it uses a viewpoint property now
... View more
08-29-2022
09:20 AM
|
0
|
0
|
3179
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 7 hours ago | |
| 2 | 05-19-2026 02:12 PM | |
| 1 | 04-24-2026 11:01 AM | |
| 2 | 04-21-2026 07:06 AM | |
| 1 | 02-27-2026 06:31 AM |
| Online Status |
Offline
|
| Date Last Visited |
10 hours ago
|