|
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
|
2594
|
|
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
|
2599
|
|
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
|
2129
|
|
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
|
1153
|
|
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
|
3894
|
|
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
|
1602
|
|
POST
|
Do you have a repo? I tried this out looking at the doc to let the plugin copy the assets and this work. new ArcGISPlugin({
locales: ['en', 'es']
}),
... View more
02-23-2022
09:01 AM
|
0
|
6
|
3901
|
|
POST
|
You can do this a couple of ways. Most convenient is to use whenFalseOnce() https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#whenFalseOnce The other is to ruse the WatchHandle remove method when done https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Accessor.html#WatchHandle const handle = layerView.watch("updating", (value) => {
// do your thing
handle.remove()
})
... View more
02-21-2022
09:12 AM
|
2
|
1
|
1662
|
|
POST
|
This should be fixed in our "next" build. https://github.com/Esri/feedback-js-api-next/ Please test with one of these two methods. // CDN
<script src="https://js.arcgis.com/next/"></script> // npm
npm install @arcgis/core@next
... View more
02-18-2022
09:52 AM
|
0
|
0
|
1333
|
|
POST
|
This will depend on your build environment. We have a webpack-plugin that will simplify this for you. https://github.com/Esri/arcgis-webpack-plugin // webpack.config.js
module.exports = {
...
plugins: [
new ArcGISPlugin({
locales: ['en', 'es']
})
]
...
} If you're not using webpack, or don't want to use the plugin (the asset copy/filter functionality is all it really offers in most cases) you can mimic what the plugin does in your own application. This is how it will filter the the locale files in the copy operation. https://github.com/Esri/arcgis-webpack-plugin/blob/master/lib/requiredPlugins.js#L50-L73
... View more
02-15-2022
07:06 AM
|
1
|
8
|
3928
|
|
POST
|
You may have to wait for the view or layer to be finished. Also make sure it's an image, and not svg, depending on how it was created. This sample works grabs the layer and iterates the uniqueValueInfos https://codepen.io/odoe/pen/rNYGjVg?editors=1000
... View more
02-14-2022
02:04 PM
|
0
|
0
|
1680
|
|
POST
|
Yeah, these methods will most likely not be implemented in 4x. If I were to change one thing, is save the extent on watchUtils.whenFalse(view, "updating", method) This way you don't need to check for the small extent changes. You can also utilize the spatialReference.equals(sr) method to make sure they are different https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#equals This is clever, though, nice work
... View more
02-14-2022
10:48 AM
|
1
|
1
|
5951
|
|
POST
|
Looks like a bug in 4.22. We'll get this fixed for the next release.
... View more
02-10-2022
09:12 AM
|
1
|
0
|
1364
|
|
POST
|
You can use symbolUtils.renderPreviewHTML for something like this. https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#renderPreviewHTML
... View more
02-09-2022
10:58 AM
|
0
|
2
|
1705
|
|
POST
|
I am going to guess that your basemap is a different spatial reference than your service. When you query against the service, the SR will be the original SR of the service. You can. request the geometries to be converted to match your map like this. function zoomToLayer(layer) {
// create query from layer
const query = layer.createQuery();
// ask for SR to match the View
query.outSpatialReference = view.spatialReference;
return layer.queryExtent(query).then((response) => {
view.goTo(response.extent)
});
}
... View more
02-09-2022
08:05 AM
|
2
|
0
|
1796
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 3 weeks ago | |
| 2 | 2 weeks ago | |
| 2 | 05-19-2026 02:12 PM | |
| 1 | 04-24-2026 11:01 AM | |
| 2 | 04-21-2026 07:06 AM |
| Online Status |
Offline
|
| Date Last Visited |
yesterday
|