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
|
485
|
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
|
792
|
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
|
303
|
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
|
425
|
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
|
426
|
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
|
847
|
POST
|
No. This feature isn't available in ArcGIS. The equivalent functionality is browse features, which allows you to view the titles of all popups in a cluster, click to view the individual feature's popup and view it's actual location on the map. You can also use alternate approaches to clustering if you want the "flare" behavior. Here's one available on GitHub: https://github.com/nickcam/FlareClusterLayer And an example: http://flareclusterlayer.azurewebsites.net/index_v4.html . The images below show the default behavior in the JS API. Note the symbol for the selected feature in the browse action is too small to really see. That is because it uses the symbol directly set on the layer's style. To see it better, just bump up the size of the symbol.
... View more
12-29-2022
11:28 AM
|
0
|
0
|
195
|
POST
|
Can you post a link to a codepen demonstrating the issue. It's hard to debug without seeing this config connected to real data.
... View more
12-29-2022
11:18 AM
|
0
|
1
|
215
|
POST
|
That pattern isn't supported in 4.x. Rather than set a symbol for each graphic, you should set a renderer on the FeatureLayer. In this case you would set a SimpleRenderer with a PictureMarkerSymbol on the symbol property. Very similar to how you see it in this sample: https://developers.arcgis.com/javascript/latest/sample-code/layers-featurelayer-collection/
... View more
12-20-2022
09:48 AM
|
0
|
2
|
415
|
POST
|
Your Arcade expression appears to be missing a default value in the Decode function. Add another param, like the number 3, or null so the expression can properly evaluate. var code = Decode(color, '#990000', 0, '#006600', 1, '#000000', 2, null);
... View more
12-12-2022
11:40 AM
|
0
|
0
|
244
|
POST
|
A codepen or similar app would help debug this. On the surface it seems like an issue with PictureMarkerSymbol.
... View more
11-30-2022
03:19 PM
|
0
|
0
|
316
|
IDEA
|
The symbol property is now public and part of the web map. Marking this idea as implemented. Release notes: https://developers.arcgis.com/javascript/latest/release-notes/#custom-cluster-styles Sample: https://developers.arcgis.com/javascript/latest/sample-code/featurereduction-cluster-symbol/
... View more
11-28-2022
11:40 AM
|
0
|
0
|
534
|
IDEA
|
This was implemented in v4.25. See the release notes here: https://developers.arcgis.com/javascript/latest/release-notes/#custom-cluster-styles Here are examples that demonstrate this: https://developers.arcgis.com/javascript/latest/sample-code/featurereduction-cluster-renderer-sum/ https://developers.arcgis.com/javascript/latest/sample-code/featurereduction-cluster-aggregate-fields/ https://developers.arcgis.com/javascript/latest/sample-code/featurereduction-cluster-pie-charts/
... View more
11-28-2022
11:38 AM
|
0
|
0
|
1196
|
POST
|
Each renderer has an authoringInfo property for preserving properties like slider values set by the user: https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-AuthoringInfoVisualVariable.html#maxSliderValue If you set these values in the renderer, the "fromRendererResult" methods on the sliders take these properties into account when updating slider values: https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-smartMapping-ColorSlider.html#fromRendererResult
... View more
10-26-2022
04:32 PM
|
0
|
2
|
291
|
POST
|
Getting statistics for two fields like this is not supported at the moment in this function. However, we are adding support for it in our next release. In the meantime, you can use Query.outStatistics to get the count of features with values from two fields. // query for the average of the population change for all features
// Notice that you can pass a SQL expression as a field name to calculate statistics
let statDef = {
onStatisticField: "CASE WHEN AppType = ‘RD’ AND AppStat = ‘active’ THEN 1 ELSE 0 END", // service field for 2015 population
outStatisticFieldName: "RD_active",
statisticType: "sum"
}
let query = layer.createQuery();
query.outStatistics = [ statDef ];
const { features } = await layer.queryFeatures(query);
let stats = features[0].attributes;
console.log("Average change:", stats.RD_active);
... View more
09-08-2022
09:52 AM
|
0
|
0
|
459
|
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
|