POST
|
Yikes. Do you mind logging an issue with support so we can get this into the system for fixing ASAP?
... View more
03-02-2024
01:02 PM
|
1
|
0
|
180
|
POST
|
You can do this by changing the selectedClusterBoundaryFeature symbol. view.popup.viewModel.selectedClusterBoundaryFeature.symbol = {
type: "simple-fill",
style: "none",
outline: null
}; Here's an app that demonstrates this: https://codepen.io/kekenes/pen/yLwWJoq?editors=100
... View more
02-21-2024
10:46 AM
|
1
|
0
|
150
|
POST
|
It's possibly a bug in the Enterprise map viewer. Is the error showing up in the Arcade editor where you're authoring the expression? If so, I'd log a bug with support so they can get that fixed. The execution context for the editor must have a matching spatial reference as well as the map. If you're copying and pasting into the playground of the online documentation, then you will definitely see that error as the spatial reference there is web mercator.
... View more
02-20-2024
02:53 PM
|
2
|
1
|
481
|
POST
|
You can test it out using https://js.arcgis.com/next/
... View more
02-05-2024
04:26 PM
|
0
|
0
|
149
|
POST
|
This should be fixed in the next update of the JS API (v4.29).
... View more
02-05-2024
04:25 PM
|
0
|
1
|
149
|
POST
|
You need to define aggregate fields for them to come through in $feature. That's what I meant by featureReduction.fields. This sample demonstrates how to do that. https://developers.arcgis.com/javascript/latest/sample-code/featurereduction-cluster-aggregate-fields/
... View more
02-02-2024
08:29 AM
|
0
|
0
|
267
|
POST
|
Yes you would need to set layer.featureReduction.renderer. to incorporate the three field values, you can either use a UniqueValueRenderer (if all the values are categorical) OR write an Arcade expression to combine them into a composite score. Something like the example below. Note that since this is a cluster renderer the attributes in $feature come from featureReduction.fields NOT layer.fields. So you'll need to account for that. const clusterRenderer = new SimpleRenderer({
symbol: {
type: "simple-marker",
size: 8,
outline: {
width: 0.5,
color: "rgba(255,255,255,0.5)"
}
},
visualVariables: [{
type: "size",
field: "cluster_count",
minSize: 12,
maxSize: 60,
minDataValue: 1,
maxDataValue: 1000
}, {
type: "color",
valueExpression: `
// $feature gives you access to feature attributes.
var status = Decode($feature.status,
"U", 10,
"C", 5,
0
);
var alert = Number($feature.alert);
var priority = Decode($feature.priority,
"High", 10,
"Medium", 5,
"Low", 3,
0
);
var score = (status + alert + priority) / 3;
return score;
`,
stops: [
{ value: 0, color: "white" },
{ value: 3, color: "beige" },
{ value: 5, color: "yellow" },
{ value: 7, color: "orange" },
{ value: 10, color: "red" }
]
}]
});
layer.featureReduction.renderer = clusterRenderer; mposite score or level. for example...
... View more
02-01-2024
10:36 AM
|
0
|
0
|
313
|
POST
|
I write about how you can do this in a few places. Basically, you can follow the pattern in this sample: https://developers.arcgis.com/javascript/latest/sample-code/visualization-update-data/ This is also described in this "Time styles" guide: https://developers.arcgis.com/javascript/latest/visualization/data-driven-styles/time/#attribute-animation Here are some blog posts that provide context and more examples: https://www.esri.com/arcgis-blog/products/js-api-arcgis/mapping/six-ways-to-visualize-change-over-time-in-web-maps/ https://www.esri.com/arcgis-blog/products/js-api-arcgis/mapping/animate-and-explore-covid-19-data-through-time/ https://www.esri.com/arcgis-blog/products/js-api-arcgis/mapping/mapping-large-datasets-on-the-web/ If you get it working, I'd love to see how it turns out.
... View more
12-13-2023
09:11 AM
|
0
|
0
|
282
|
POST
|
I wrote a blog article about how to do this a few years ago. The live samples are using older versions of the API, but the pattern for coloring the bins should be the same. https://www.esri.com/arcgis-blog/products/js-api-arcgis/mapping/make-your-histogram-legendary/
... View more
12-06-2023
02:52 PM
|
0
|
1
|
155
|
POST
|
fieldInfo.label doesn't take Arcade expressions. Arcade can only be defined in 2 places inside popups: expressionInfos, and ExpressionContent elements. To accomplish what you're attempting, you need an ExpressionContent element. This gives you full control over popup elements all within the scope of an Arcade expression. The expression itself needs to return the content type you want...in this case a chart. That chart's labels and values can be calculated using any Arcade function within the expression. Here's an example of the expression: var label = Text($feature.Field2);
var attributes = {
"Field 18 label": $feature.Field18
};
attributes[label] = $feature.Field25;
var fields = [];
for (var a in attributes){
Push(fields, a);
}
return {
type: "media",
attributes,
mediaInfos: [{
type: "piechart",
title: "Count by type",
value: {
fields
}
}]
}; And how you would reference it in your app: https://codepen.io/kekenes/pen/rNPqymw?editors=1000
... View more
11-30-2023
12:01 PM
|
1
|
1
|
208
|
POST
|
Thanks for pointing this out. I can easily reproduce from your app. Can you contact Esri support and have them log an issue, so we can get this in our system to fix? That way you can also track the progress of the bug report.
... View more
11-27-2023
11:51 AM
|
0
|
1
|
294
|
POST
|
I would reach out to Esri support and show them the app where this is occurring. It appears to be originating in the rendering engine somewhere, but we won't know for sure until we see a live reproducible case. Once Support verifies it's an issue, it's submitted as a bug and the dev team will take a look at it.
... View more
11-27-2023
11:40 AM
|
0
|
1
|
124
|
POST
|
I suggest reaching out to Esri support if you suspect this is a bug. They will attempt to reproduce the issue independently then log a bug so the dev team can take a look at it.
... View more
11-27-2023
11:37 AM
|
0
|
0
|
129
|
POST
|
I'm not sure I follow the scenario 100%, but it sounds like you could just use the smart mapping functions for this: https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-renderers-type.html#createRenderer The smart mapping functions generate renderers based on the underlying data. The createRenderer function for unique values works for all "feature layer-like" types, including GeoJSON. Here's an example: https://codepen.io/kekenes/pen/wvNPGXJ?editors=100
... View more
11-15-2023
02:44 PM
|
0
|
1
|
224
|
POST
|
Not necessarily a performance benefit. Just an alternative that is fewer lines. I try to go with the shortest expression. Though I'd say the for loop version is more readable than the reduce approach.
... View more
11-06-2023
11:51 AM
|
0
|
0
|
727
|
Title | Kudos | Posted |
---|---|---|
1 | 03-02-2024 01:02 PM | |
1 | 02-21-2024 10:46 AM | |
2 | 02-20-2024 02:53 PM | |
1 | 11-30-2023 12:01 PM | |
3 | 11-06-2023 09:05 AM |
Online Status |
Offline
|
Date Last Visited |
a month ago
|