|
POST
|
This labelFormatFunction returns the years in the extent (shown using this sample, with a few alterations) labelFormatFunction: (value, type, element, layout) => {
const options = {year: 'numeric'}
const normal = new Intl.DateTimeFormat("en-us", options);
switch (type) {
case "min":
element.setAttribute("style", "color: #ff642e;");
element.innerText = normal.format(value);
break;
case "max":
element.setAttribute("style", "color: #ff642e;");
element.innerText = normal.format(value);
break;
case "extent":
const start = timeSlider.fullTimeExtent.start;
const year0 = value[0].getFullYear();
const year1 = value[1].getFullYear()
element.innerText = `${year0} - ${year1}`;
break;
}
} slider.png
... View more
11-21-2023
06:31 AM
|
1
|
0
|
1607
|
|
POST
|
The latest update (October 2023) now allows you to do this. Prior to this release, you could only configure one Map Layers widget with a custom layer list for a map. Now this limit has been lifted. You may connect multiple Map Layers widgets, each with a custom layer list, to the same Map widget.
... View more
11-20-2023
02:13 PM
|
0
|
0
|
1519
|
|
POST
|
I don't see any way to do that within the Arcade element, since it strips out the formatting from your text. The only way I can come up with is to use the regular Text element for your text and add the Arcade element for the url. But you'd have to do that for each pair of fields.
... View more
11-20-2023
01:14 PM
|
0
|
0
|
2146
|
|
POST
|
Yes, you can add additional information to the title property of the template. For example const template = {
title: "Earthquake Info for {place}",
content: "Magnitude {mag} {type} hit {place} on {time}",
fieldInfos: [
{
fieldName: "time",
format: {
dateFormat: "short-date-short-time"
}
}
]
}; will give you this result template.png
... View more
11-17-2023
06:28 AM
|
1
|
0
|
894
|
|
POST
|
Do you have access to the source? When I run this part of the code in the Playground, I get the same error since I don't have permissions to see that item. var p = Portal("https://www.arcgis.com/");
// Create FeatureSet for points
var fs1 = FeatureSetByPortalItem(p,'2b84b6b511584a34807749f5d9969dd4&sublayer=0', 0, ['NatureReserve','Priority','IssueCategory','Notes','RecordDate','CompletionDate','CompletedBy','CreationDate','GlobalID'], true);
return fs1 Have you included the line "return FeatureSet(out_Dict);" to return the FeatureSet? Use the console in various places in your code to make sure it's not breaking down somewhere. For example, examine the features variable at the completion of each loop.
... View more
11-17-2023
06:21 AM
|
0
|
0
|
2666
|
|
POST
|
I'm using the Alert component, but TypeScript is throwing an error. import { Alert } from 'jimu-ui' alert.png The Alert component does work properly, but doesn't show all the properties in the suggested code completion (like closable, withIcon, etc).
... View more
11-16-2023
02:09 PM
|
0
|
2
|
1450
|
|
POST
|
The first two items may be solved by making sure you select all the text you want to apply these settings. In this example, I select the two lines before centering them and changing their line spacing. I can't see how to set the margin or padding, however
... View more
11-16-2023
10:37 AM
|
1
|
1
|
3158
|
|
POST
|
You haven't instantiated the variable "p" used in your FeatureSetByPortalItem calls. Change line 2 to var p = Portal("https://www.arcgis.com/");
... View more
11-16-2023
09:58 AM
|
0
|
2
|
2687
|
|
POST
|
Normally when looking at the entire world, you're going to see a small map. For example, open this sample and zoom out as far as you can. mapview.png Set the MapView's zoom property (or extent) to a more localized view of map and it should fill up the screen.
... View more
11-15-2023
12:05 PM
|
0
|
0
|
2255
|
|
POST
|
You can set the popupEnabled property to false for any layer you don't want the popup to appear. const streetLayer = new FeatureLayer({
url: "https://services6.arcgis.com/Qptn479QktK11k72/arcgis/rest/services/Stsearch/FeatureServer",
definitionExpression: ("Customer_N in ('HW: ERYC Highway Maintained','HW: ERYC Part Maintained')"),
outFields: ["*"],
title: "East Riding maintained road",
renderer: stsRend,
popupEnabled: false
});
... View more
11-15-2023
07:18 AM
|
0
|
2
|
2847
|
|
POST
|
Are you trying to see if LP1 contains one of those four values or the array "['a','b','c','d']"? If you're checking if it contains one of those values, then you'll use the Includes function in your iif. var owned = ['a','b','c','d'];
var v = iif(Includes(owned, $feature.LP1),"Yes", null);
return v;
... View more
11-14-2023
11:06 AM
|
0
|
1
|
2190
|
|
POST
|
What type of field is $feature.Date? If it's a Date field, you can simplify this expression. return Year($feature.Date); One thing to be aware of with the Date function is months are 0-based, so to create a date for January 1, 2023, you would use Date(2023,0,1). The result of Date(2023,12,31) is January 31, 2024.
... View more
11-14-2023
07:00 AM
|
0
|
1
|
1762
|
|
POST
|
I had tried doing that in the Designer but had no success in avoiding null values without changing that field property.
... View more
11-13-2023
02:04 PM
|
0
|
1
|
6059
|
| Title | Kudos | Posted |
|---|---|---|
| 3 | 2 weeks ago | |
| 1 | 02-04-2025 06:39 AM | |
| 1 | 05-01-2026 08:26 AM | |
| 1 | 04-10-2026 12:01 PM | |
| 1 | 04-13-2026 09:11 AM |
| Online Status |
Offline
|
| Date Last Visited |
a week ago
|