|
POST
|
Can you share the difference in renderer JSON saved to the service versus the renderer on the layer's portal item? It seems to be related to that.
... View more
06-15-2023
11:27 AM
|
0
|
0
|
1834
|
|
POST
|
Yeah, I see the issue, but it's a bit of a confusing one... It's in the where clause of the Filter function. That where statement is a SQL where, and doesn't allow Arcade functions. So this bit: "DATE_HEURE > Date(2023-05-01)" Needs to change to: "DATE_HEURE > '2023-05-01'" Then it should work... Here's an example: https://codepen.io/kekenes/pen/NWOJapJ?editors=100
... View more
05-25-2023
07:03 AM
|
0
|
0
|
1137
|
|
POST
|
Yes. This is possible. You need to query the features within the bin and create a column chart representing however you partition the data. This sample demonstrates how to query features inside a bin using Arcade: https://developers.arcgis.com/javascript/latest/sample-code/featurereduction-binning-arcade-summary/ In the popup, click one of the arrows next to the pie chart to see a similar visualization using a line chart. This chart displays the number of crimes that occurred in each month within the bin. This blog also steps you through the process: https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/how-to-summarize-aggregate-data-using-arcade-in-popups/
... View more
05-23-2023
09:51 AM
|
0
|
0
|
1188
|
|
POST
|
The first scenario works because passing an array of strings to the values property is a convenience pattern when you're only working with one value. The second example is using incorrect syntax. You can't pass an array to values.value or values.value2. The values property takes an array of objects, like this... That way you can pair up values that go together in a const renderer = {
type: "unique-value",
field: "test1",
field2: "test2",
uniqueValueGroups: [{
heading: "Heading 1",
classes: [{
label: "Label 1",
symbol: {
type: "simple-marker",
style: "circle",
color: "#58ff60",
outline: {
color: "rgba(140,255,120,0.5)",
width: 6
}
},
values: [{
value: "testValue"
}, {
value: "testValue1",
}, {
value2: "testValve2"
}]
}, {
label: "Label 2",
symbol: {
type: "simple-marker",
style: "circle",
color: "#58ff60",
outline: {
color: "rgba(140,255,120,0.5)",
width: 6
}
},
values: {
value: "testValue3",
value2: "testValve4"
}
}]
}]
} Or if you want field1 and field2 values combined to represent one category, you specify the values for each within a single object. values: [{
value: "testValu1",
value2: "testValue2"
}, {
value: "testValue3",
}, {
value2: "testValve4"
}]
... View more
05-19-2023
04:08 PM
|
0
|
4
|
1631
|
|
POST
|
1. I need more detail here. Specifically, what are the more complex cases? Is it just that you have more categories? 3. I think you misunderstood that line of documentation. Individual features are displayed. That line is specifying how those features get their symbol. If you specify a cluster renderer, all features (clusters and individual features) are styled using the cluster renderer. That is what is meant by "cluster renderer overrides the style of the features in the view". If you don't specify a cluster renderer, the cluster style is inferred from the layer renderer, which determines how individual features are styled. This isn't a change we're going to revert. The previous behavior is wrong even if that's what you were used to. Many people called support pointing this out and requesting this change. I suggest using the pie chart style in your scenario. If I see a lot of default symbols in clusters in a scenario like this, that tells me that pie chart is more appropriate anyway since there is no clear pattern of predominance. You also have options for how many categories to display in pie chart clusters...and individual features will display with the color of the category to which they belong as a solid color. Since the behavior was incorrect previously, I don't consider this a breaking change. If you notice strong visual differences in this scenario with clustering when upgrading the API version, it's exposing the problems we had in previous versions of the API, rather than the introduction of a bug in newer versions.
... View more
05-11-2023
10:41 AM
|
0
|
1
|
2389
|
|
POST
|
This is actually a result of a bug "fix" related to cluster visualizations with unique value renderer. Neither visual is great in my opinion. Without a cluster renderer, the cluster uses the symbol of the most common category (or uniqueValueInfo) contained within the cluster. Your dataset involves tie values. Prior to 4.25, in the case of a tie where the most common category was in a tie with another category, the rendering engine just picked one of the symbols and used it. This is problematic since it portrays predominance in one category when it doesn't actually exist. At 4.25, we updated this to match our predominance renderer for layers so tie values are represented with the default symbol. I don't think this is a perfect solution as the default symbol makes it look like the features don't belong to any of the categories. There are a couple of things you can do to change the visual. 1. Use a pie chart renderer for the cluster style. This will show the actual breakdown of categories within the cluster. This is great for scenarios where predominance can be misleading even when tie values are not involved. However, it can make it hard to read if a lot of categories are in play. In your scenario, where there are only 3 categories (a fourth being tie values), I think this is a fine option. 2. You can update the defaultSymbol on the layer style and indicate it represents "tie values" by setting a defaultLabel. 3. You can override the default cluster renderer with your own unique value renderer accounting for ties using a distinct symbol. Hopefully that helps.
... View more
05-08-2023
10:56 AM
|
1
|
4
|
2430
|
|
POST
|
You cannot use SummaryStatistics for binning before first creating the bins in a view. The binning implementation is purely client-side, so the bins must first be created before they can be queried for statistics. You can use SummaryStatistics to query a feature layer that hasn't yet been added to a map because the statistics query can be sent to the feature server. Because we don't have a server-side binning solution at the moment, the same cannot be done here. If you're trying to query stats before bins display, I suggest you create the bins with a transparent symbol first, then issue the query and create the renderer and apply to the feature reduction object. That way you won't see flashing when the app starts up.
... View more
04-24-2023
09:28 AM
|
1
|
0
|
1053
|
|
POST
|
Yes. You can use those values in your stops. You first have to initialize binning then query the bins before creating the stops for the renderer. You can do this on your own using the summaryStatistics method, or you can use the smart mapping renderer creators to generate the stops for you based on the statistics. https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-renderers-color.html It's the same parameters, but instead of outputting stats, it outputs a renderer.
... View more
04-14-2023
11:21 AM
|
1
|
0
|
1393
|
|
POST
|
Yes. You can do this with the smartMapping statistic functions. In this case you need summaryStatistics. You can also get a histogram and unique values with count if needed. You just need to be sure to set the forBinning parameter to true. const stats = await summaryStatistics({
layer,
view,
field: "aggregateCount",
forBinning: true
}); Here's a codepen that demonstrates how to do it for the basic configuration sample you posted: https://codepen.io/kekenes/pen/bGmEvWj?editors=1000 Let me know if you run into issues.
... View more
04-13-2023
11:47 AM
|
1
|
0
|
1405
|
|
POST
|
I would try using the new uniqueValueGroups for this purpose. The way you declare which value belongs to which field is more explicit, so you're less likely to run into issues. Try this... // This example groups categories under three headings:
// Commercial, Residential, and Other
layer.renderer = {
type: "unique-value",
field: "farmType",
field2: "livestockType",
fieldDelimiter: ", ",
uniqueValueGroups: [{
classes: [{
label: "Pig",
symbol: {
type: "picture-marker",
url: "https://cdn-icons-png.flaticon.com/512/776/776450.png",
width: "25px",
height: "25px",
outline: {
color: [255, 255, 255],
width: 1,
},
},
values: {
value: 1,
value2: null,
value3: null
}
}, {
label: "Cow",
symbol: {
type: "picture-marker",
url: "https://cdn-icons-png.flaticon.com/512/6165/6165370.png",
width: "25px",
height: "25px",
outline: {
color: [255, 255, 255],
width: 1
}
},
values: {
value: 2,
value2: 1,
value3: null
}
}, {
label: "Goat",
symbol: {
type: "picture-marker",
url: "https://cdn-icons-png.flaticon.com/512/8686/8686214.png",
width: "25px",
height: "25px",
outline: {
color: [255, 255, 255],
width: 1
}
},
values: {
value: 2,
value2: 2,
value3: null
}
}, {
label: "Slaughterhouse",
symbol: {
type: "picture-marker",
url: "https://cdn-icons-png.flaticon.com/512/1995/1995607.png",
width: "25px",
height: "25px",
outline: {
color: [255, 255, 255],
width: 1
}
},
values: {
value: 3,
value2: null,
value3: null
}
}, {
label: "Chicken",
symbol: {
type: "picture-marker",
url: "https://cdn-icons-png.flaticon.com/512/1449/1449791.png",
width: "25px",
height: "25px",
outline: {
color: [255, 255, 255],
width: 1
}
},
values: {
value: 4,
value2: null,
value3: null
}
}]
}]
};
... View more
03-03-2023
10:00 AM
|
0
|
1
|
1272
|
|
POST
|
Hi @JulienHenchoz , for rendering inconsistencies between JS API versions, I suggest reaching out to Esri Support so they can verify the issue and log it into our system. For the most part, maps between 3x and 4x should look the same. There are some cases where you may see minor differences. These ones are probably worth a look on the support side.
... View more
02-28-2023
10:53 AM
|
0
|
0
|
2797
|
|
POST
|
let layer = new FeatureLayer({
portalItem: { id: "5ce5374a461e45bab714b43ffedf151d" }
});
uniqueValues({
layer: layer,
field: "Candidate"
}).then(function(response){
let infos = response.uniqueValueInfos;
const values = infos.map((info) => info.value);
}); Just call Array.map() and return the value in the callback. That will create a new array with only the values.
... View more
01-30-2023
08:57 AM
|
0
|
0
|
896
|
|
POST
|
@Bud Adding a page for working with vertices is a good idea. I'll add this to our list of todos for a documentation enhancement. Thanks for reaching out.
... View more
01-23-2023
10:55 AM
|
2
|
0
|
970
|
|
POST
|
It must be intentional, since I've been unable to share links in replying to comments in the past. I'll pass along the info to the ArcGIS Blog folks to get a more official response.
... View more
01-23-2023
09:47 AM
|
2
|
0
|
971
|
|
IDEA
|
Here's some additional info/context to the rationale for not including feature set functions in visualization and labeling profiles: https://developers.arcgis.com/arcade/function-reference/bundles/#data-access.
... View more
12-29-2022
02:48 PM
|
0
|
0
|
2872
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-06-2025 03:09 PM | |
| 1 | 04-29-2025 08:36 AM | |
| 1 | 08-20-2024 08:06 AM | |
| 1 | 08-13-2024 11:53 AM | |
| 1 | 07-22-2024 11:04 AM |
| Online Status |
Offline
|
| Date Last Visited |
05-06-2025
03:01 PM
|