|
POST
|
Not specific to local assets, but you need to update the browserlist for your production build in the package.json https://github.com/Esri/jsapi-resources/tree/master/esm-samples/jsapi-create-react-app#misc I'm surprised it worked in 4.22, but some of the down-compiling and babel helpers with the default browserlist will break some stuff. There's no errors, which is odd, but updating for evergreen browsers fixes this issue with CRA.
... View more
03-27-2022
11:36 AM
|
1
|
0
|
809
|
|
POST
|
Did you add your own API Key to your code? Is there a particular error that shows in the console?
... View more
03-27-2022
11:17 AM
|
0
|
0
|
832
|
|
POST
|
Do you have a sample or codepen showing this issue to track down? The samples with popup seem to be working.
... View more
03-24-2022
08:22 AM
|
0
|
0
|
2013
|
|
POST
|
The view.goTo() method can also take an array of graphics or geometries so you can pass multiple values at once. https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo https://codepen.io/odoe/pen/OJzRrGM?editors=0010
... View more
03-22-2022
08:19 AM
|
0
|
0
|
1528
|
|
POST
|
Try the solution mentioned here, because you are dealing with tiles, you need to define the lods as well. https://community.esri.com/t5/arcgis-api-for-javascript-questions/allow-over-zoom-in-map-view/m-p/1062798#M73318
... View more
03-20-2022
09:36 AM
|
1
|
1
|
2136
|
|
POST
|
You don't need to listen to any events, you can watch for the popup.selectedFeature property to change https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#selectedFeature view.popup.watch("selectedFeature", (feature) => {
// do something
})
... View more
03-18-2022
08:37 AM
|
0
|
0
|
2058
|
|
POST
|
Here is a sample of how to do this on a hold event. https://codepen.io/odoe/pen/bLEroK?editors=0010 view.on("hold", ({ mapPoint }) => {
view.hitTest(view.toScreen(mapPoint)).then((hitResult) => {
if (!hitResult.results[0].graphic) return;
console.log("hold event, now drag mouse to move graphic");
pointGraphic.symbol = selectSymbol;
const pausePan = view.on("drag", stop);
const move = view.on("pointer-move", updateGraphic);
const up = view.on("pointer-up", cleanUp);
handlers.push(pausePan);
handlers.push(move);
handlers.push(up);
});
});
... View more
03-18-2022
07:37 AM
|
1
|
1
|
3043
|
|
POST
|
You can use the LayerList widget https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html
... View more
03-17-2022
07:59 AM
|
1
|
0
|
2492
|
|
POST
|
This is expected behavior. The API takes advantage of dynamic import loading, especially when working with Portal items such as WebMap contents. The number of bundled files can vary from 200-300 depending on your tooling. You can see a chart here of build metrics for various ESM samples we have. https://github.com/Esri/jsapi-resources/blob/master/esm-samples/.metrics/4.22.2.csv
... View more
03-15-2022
08:43 AM
|
1
|
1
|
2871
|
|
POST
|
Glad you got it working! In that example, the symbol object is added to the renderer of the layer. Under the hood, the renderer sees the object of the symbol passed to the setter, it will reactively create an instance of the symbol class based on the type property to the correct symbol instance. But the object has to be passed to something for that to happen.
... View more
03-02-2022
08:07 AM
|
0
|
1
|
2326
|
|
POST
|
That is not autocasting. Autocasting happens when you pass objects to constructors or methods that will autocast objects to instances of classes. If you create a new instance of the WebStyleSymbol, you can use the clone method and more. https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-WebStyleSymbol.html#methods-summary
... View more
03-02-2022
07:31 AM
|
0
|
3
|
2331
|
|
POST
|
We don't have an out-of-the-box widget for this. You could probably create something like this as a Web Component, would be pretty handy.
... View more
03-01-2022
09:31 AM
|
1
|
1
|
1943
|
|
POST
|
You can switch the themes dynamically at runtime with something like this. btn.addEventListener("click", () => {
if (theme === "light") {
sheet.href = "https://js.arcgis.com/4.22/esri/themes/dark/main.css";
theme = "dark";
} else if (theme === "dark") {
sheet.href =
"https://js.arcgis.com/4.22/esri/themes/light/main.css";
theme = "light";
}
}); Here is a demo https://codepen.io/odoe/pen/oNoQZNW?editors=1000
... View more
03-01-2022
06:35 AM
|
1
|
0
|
1080
|
|
POST
|
I don't know Angular well enough to say, @AndyGup might have an idea. Maybe you can tweak the assets copy glob to do it simpler. Something like what is done in the plugin here https://github.com/Esri/arcgis-webpack-plugin/blob/master/lib/requiredPlugins.js#L67 "assets": [
{
"glob": "**/*", // update the glob here to ignore locales
"input": "node_modules/@arcgis/core/assets",
"output": "/assets/"
},
],
... View more
02-24-2022
07:46 AM
|
0
|
4
|
3594
|
|
POST
|
There's some documentation in the Implementing Accessor guide https://developers.arcgis.com/javascript/latest/implementing-accessor/#autocast
... View more
02-23-2022
11:46 AM
|
2
|
0
|
1449
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | yesterday | |
| 1 | 4 weeks ago | |
| 2 | a month ago | |
| 1 | 02-27-2026 06:31 AM | |
| 1 | 01-13-2026 02:15 PM |
| Online Status |
Online
|
| Date Last Visited |
6 hours ago
|