|
POST
|
Hey Paulo, Can you send a link to a simple test application in a codepen so we can reproduce the issue? Thanks, Kristian
... View more
01-13-2022
04:02 PM
|
0
|
2
|
1854
|
|
IDEA
|
I think Find should suit this case. Let me know if it doesn't... IIF(Find("https://www.esri.com", $feature.URL) > -1, "Go to Esri sponsored site", "Vendor Website") Here's the documentation: https://developers.arcgis.com/arcade/function-reference/text_functions/#find
... View more
10-11-2021
11:03 AM
|
0
|
0
|
1910
|
|
POST
|
No. There isn't any hidden option for 5x5 in the JS API. Also, AGOL doesn't allow for 5x5 classes...I'm curious where you saw that. Can you describe your use case for the 5x5? This would result in 25 unique colors, which can be difficult to interpret. 4x4 already pushes the limit in that sense. Is it a diverging scenario where you want to have two neutral colors and two diverging color ramps? That would be an interesting scenario we can investigate for an enhancement...
... View more
10-08-2021
09:30 AM
|
0
|
1
|
820
|
|
POST
|
> My first question is how is the colour of a cluster decided? The color of a cluster is determined based on the style of the layer. If it is a unique value style, the color of the most common type within the cluster is used to shade the entire cluster. If a class breaks or continuous color visualization is used, then it is the color of the average value of features in that cluster. This behavior is described in the "Styles and configurations" part of the FeatureReductionCluster API reference: https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FeatureReductionCluster.html#styles-and-configurations Be sure to expand the "Read more" area to read the details: > is there a way to give precedence to a particular field so that if the cluster has that particular field, it would take its colour. There isn't a great way to do this yet. We're evaluating providing an API for styling cluster features in a future release (not yet decided). However, you can achieve this using Arcade and by changing the style of the base layer. You would need to specify an Arcade expression on the layer's renderer then set up two class breaks: one to symbolize clusters that have no features of the desired type and another that has at lease one. Here's an example: https://codepen.io/kekenes/pen/WNOmYjQ?editors=100 In this app I color the clusters yellow if it contains at least one "ice quake". I can also provide the number of ice quakes in the popup. Hope that helps.
... View more
09-30-2021
04:22 PM
|
0
|
0
|
2279
|
|
POST
|
In the context of a renderer $feature only gives you access to a layer's attributes. cluster_count is an attribute of a cluster graphic, and isn't part of the layer fields. We're still in the planning stages of allowing people to customize the style of clusters. This would be disconnected from the layer style.
... View more
09-28-2021
01:17 PM
|
1
|
0
|
1545
|
|
POST
|
Yep. That is one way to work around the issue for now. The problem with this, however is the size of the cluster doesn't adjust to use the sum. It still uses the average, which can lead to some really small sized clusters with larger numbers than clusters with a larger size. This is something we should support. Still working on some details to help it fit with the existing API smoothly. No timeline at the moment.
... View more
08-11-2021
09:00 AM
|
2
|
1
|
1756
|
|
IDEA
|
If we publicly release "symbol" now, then we won't be able to release other rendering capabilities later. It will be limiting to other scenarios. If controlling other rendering aspects of clusters is important, like color, then we need to have a proper API for exposing all rendering properties, including a symbol.
... View more
05-19-2021
03:01 PM
|
0
|
0
|
5517
|
|
POST
|
The minDataValue/maxDataValue weirdness is because your scenario is a bit unorthodox (to scale symbol sizes based on string values). The more typical case looks like the following: var sizeVisVar = {
type: "sizeInfo",
field: "EDUCBASECY", //total adult population 25 years and older
minDataValue: 10000, //counties with fewer than 10,000 adults will be assigned the min size
maxDataValue: 1000000, //counties with more than 1,000,000 adults will be assigned the max size
valueUnit: "unknown",
minSize: {
type: "sizeInfo",
valueExpression: "$view.scale",
//The min size of the symbol varies depending on the map scale
stops: [
{ value: 250000000, size: 6 },
{ value: 6000000, size: 6 }, //at a 1:6,000,000 scale, the min size is 6px
{ value: 1000000, size: 4 },
{ value: 200000, size: 2 },
{ value: 1000, size: 2 }
]
},
maxSize: {
type: "sizeInfo",
valueExpression: "$view.scale",
//The max size of the symbol varies depending on the map scale
stops: [
{ value: 250000000, size: 50 },
{ value: 6000000, size: 50 }, //at a 1:6,000,000 scale, the max size is 50px
{ value: 1000000, size: 40 },
{ value: 200000, size: 20 },
{ value: 1000, size: 10 }
]
}
}; Hopefully this snippet makes more sense. In this case, the Arcade expression only returns "$view.scale". Then the minSize/maxSize variables manage which sizes to assign to features at certain scales. Because your scenario involves string values, you have to manage all of that yourself inside an Arcade expression. So rather than return a data value (like 10,000 people) you need to return a size (like 32px). Then you trick the size variable into assuming it's a data value, by setting minSize = 1 and minDataValue = 1; and maxSize = 32 and maxDataValue = 32.
... View more
05-18-2021
10:01 AM
|
0
|
0
|
7103
|
|
POST
|
It looks like you're using a JS function instead of Arcade. If you reference Arcade in a separate script tag, then make sure to set the type to "plain/text" or something else that tells the browser it's not JavaScript "esri/arcade" would even work. `$feature` has no meaning in JavaScript. That's why you're getting an undefined message. Within the context of JavaScript, the Arcade expression needs to be a string value much like you see it in my first example. I've just updated this codepen to make this more clear: https://codepen.io/kekenes/pen/VwpKKmQ?editors=1000
... View more
05-17-2021
03:03 PM
|
0
|
2
|
7114
|
|
POST
|
There's no need to use geometryEngine for this case. You can take advantage of CIMLineSymbol and offset the line symbol from the geometry. Here's a code pen that does this with a highway layer: https://codepen.io/kekenes/pen/eYgeVEB The lines of note are here: [5/14 2:37 PM] Kristian Ekenes
{
type: "cim",
// CIM Line Symbol
data: {
type: "CIMSymbolReference",
symbol: {
type: "CIMLineSymbol",
symbolLayers: [
{
primitiveName: "highway",
// white dashed layer at center of the line
type: "CIMSolidStroke",
effects: [
{
type: "CIMGeometricEffectOffset",
offset: 5,
option: 0
}
]
}
]
}
}
} When using geoemtryEngine offset, you first need to query for the geometries, then modify them using offset and add them back to the view as a client-side feature layer. That's a lot of work on your part. CIMLineSymbol allows you to request the features only one time and symbolize the various circuits on offsets depending on the value you provide the symbol. Let me know if you need further assistance. Kristian
... View more
05-17-2021
09:52 AM
|
1
|
1
|
2320
|
|
POST
|
Here it is working in a 3x app: https://codepen.io/kekenes/pen/VwpKKmQ?editors=1000 To clarify all my earlier statements. In order for this to work for a text field (or any field), you need to return a size value in the Arcade expression. This makes for an awkward sizeInfo configuration because the minDataValue/maxDataValue and minSize/maxSize pairs always need to be equal. It's an unorthodox way for handling this scenario, but works...
... View more
05-17-2021
09:45 AM
|
0
|
5
|
7124
|
|
POST
|
Franklin, This should work in your scenario... > 1st, I am using javascript 3x and I noticed that you are using 4x in your example This method will work regardless if the app is in 3x or 4x. Both APIs support Arcade and size visual variables. The syntax for setting a visual variable is slightly different in 3x than it is in 4x. For example, type is "sizeInfo" in 3x, and "size" in 4x. You may also have to use renderer.setVisualVariables() instead of setting a property directly. >The field only has three values: 1, 2, and 3. The field type doesn't matter in this case. As I stated in the first reply, the Arcade expression in the size variable need to return a size value, not a data value for this scenario to work. That's why the minDataValue and maxDataValue properties are set to 1-32...they are representing sizes, not data values. I used a text field in my example because your code snippet uses text values... "sparse", "moderate", "dense"... It will work in 3x. I'll attempt it in that API.
... View more
05-17-2021
09:24 AM
|
0
|
0
|
7124
|
| 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
|