|
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
|
832
|
|
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
|
1885
|
|
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
|
1912
|
|
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
|
4179
|
|
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
|
4222
|
|
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
|
4406
|
|
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
|
5909
|
|
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
|
5956
|
|
POST
|
That demo was old, check the doc, it uses a viewpoint property now
... View more
08-29-2022
09:20 AM
|
0
|
0
|
2820
|
|
POST
|
It only works for a WebMap, not sure how you would use Bookmarks for layers. This is a better sample for adding to the Bookmarks manually https://developers.arcgis.com/javascript/latest/sample-code/webstylesymbol-2d/ https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks-BookmarksViewModel.html#bookmarks https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks-BookmarksViewModel.html#methods-summary
... View more
08-29-2022
08:59 AM
|
0
|
6
|
2829
|
|
POST
|
This is all built in to the Bookmarks widget. https://developers.arcgis.com/javascript/latest/sample-code/widgets-bookmarks/ You could even save them to localStorage if you don't want to save them back to the WebMap (outdated) https://codepen.io/odoe/pen/QxrEVX?editors=0010 This samples is better for local adding of bookmarks https://developers.arcgis.com/javascript/latest/sample-code/webstylesymbol-2d/
... View more
08-29-2022
07:15 AM
|
0
|
8
|
2849
|
|
POST
|
This isn't a project related to the ArcGIS JSAPI. You might want to try stackoverflow as the github repo for that project no longer exists, so I'm guessing it's no longer maintained.
... View more
08-26-2022
03:26 PM
|
0
|
0
|
1068
|
|
POST
|
Check this video out. It's all in ESM and can be integrated into Angular projects. https://community.esri.com/t5/arcgis-api-for-javascript-videos/identitymanager-in-the-arcgis-api-for-javascript/m-p/1191710#M21 Here's a blog post on the topic too. https://odoe.net/blog/my-secret-arcgis-identity
... View more
08-26-2022
07:28 AM
|
0
|
5
|
3901
|
|
POST
|
Not sure what your workflow looks like, but the select-result event is firing in this sample. https://codepen.io/odoe/pen/yLKWVVm?editors=1001 Do you have a repro? Could be something else going on.
... View more
08-25-2022
07:21 AM
|
1
|
0
|
1008
|
|
POST
|
There isn't anything descriptive about css, because we can change stuff around from release to release. There is some info related to styling, like breakpoints, themes. https://developers.arcgis.com/javascript/latest/styling/
... View more
08-25-2022
07:13 AM
|
0
|
0
|
1239
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 3 weeks ago | |
| 2 | 3 weeks ago | |
| 1 | 02-27-2026 06:31 AM | |
| 1 | 01-13-2026 02:15 PM | |
| 1 | 12-31-2025 09:05 AM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|