POST
|
Hi @AdamGebhart , You should be able to use the code after you create the item in your portal (this is just a reference to the data). You will have to change the ItemID to the one you create and the field and logic you want to apply after accessing the layer. I think the reason that I cannot access the website, is since it blocks access from Colombia:
... View more
01-26-2022
02:29 PM
|
0
|
1
|
298
|
POST
|
... and just tried, but I don't have access to the rest service you provided.
... View more
01-25-2022
10:54 AM
|
0
|
3
|
1132
|
POST
|
Hi @AdamGebhart , I continued with a map service (group layer) from a sample server and this is what I got: You are completely right that when adding a map service to the map, it will not provide access to the different layers in the same service. I thought that maybe the using the FeatureSetByPortalItem could be used. However, the layer is not a portal item in my portal To overcome this aspect I added a new item to my portal by referencing the map service. This provided the portal item ID that I need to access the other layers within the grouplayer Below you can see the classic web map with a group layer (map service: https://sampleserver6.arcgisonline.com/arcgis/rest/services/Military/MapServer) and the pop-up on the polygon areas show information from the intersecting units: Here's the expression I used: var spx = Portal('https://utility-esri-co.maps.arcgis.com');
var mili = FeatureSetByPortalItem(spx, 'e5cfe3e339394ffb82270e3791a32b6a', 2);
var fsint = Intersects(mili, $feature);
var result = "";
if (Count(fsint)>0) {
result = "Found " + Count(fsint) + " intersecting features:";
for (var f in fsint) {
result += TextFormatting.NewLine + " - " + f["SymbolName"];
}
} else {
result = "No intersection";
}
return result;
... View more
01-25-2022
10:53 AM
|
0
|
0
|
1132
|
POST
|
Hi @AdamGebhart , Thanks for sharing the map. However, I don't seem to have access to the services, so I can't really do anything at the moment. I can have a look at some of the sample Enterprise/ArcGIS Server services to see if I can replicate the situation. What version do you have for your Enterprise implementation?
... View more
01-25-2022
09:33 AM
|
0
|
6
|
1135
|
POST
|
Hi @AdamGebhart , So the limitation might be in the way the service is added to the map. Would it be possible to have access to the map to have a look? You could share it with a group and invite me to that group using "xbakker.spx".
... View more
01-25-2022
08:54 AM
|
0
|
8
|
1137
|
POST
|
Hi @AdamGebhart , So you have a group layer in your (classic 3.x) web map and the Arcade expression I assume you are configuring in the pop-up. Is that correct? When you want to access data in the map, I would suggest using the expression builder. There are two easy ways of assessing the data in the map, one is using $map that is creating problems, but since the data has the same datastore, you could try and use $datastore and see if that works. In the interface you can click on the arrow pointing to the right (">") next to "$datastore" and navigate to the layers in the same datastore as your feature. this will list the layers (rest endpoints in the same service) and select the ones you need for the expression: If you have any problems, let me know.
... View more
01-25-2022
07:49 AM
|
0
|
10
|
1143
|
POST
|
Hi @martav , As mentioned in this thread (https://community.esri.com/t5/arcgis-online-questions/find-number-of-selected-features-list-items-in/m-p/588548) Arcade has no access to the selected features in a map. When you have a selection in the map you can define an action that filters the features used for in indicator. However, this only works when the indicator is using the same feature source. In case the selection should propagate to a different featureset, you can only do this by matching field values. So for me, the main question is, if it is necessary to use an Arcade expression for the indicator or the indicator can point to the same source? From what I understand from your description you have multiple fields you need to sum per feature which is used later on to determine the average for the selected features. Summing values will require Arcade, but using Arcade will result in a different FeatureSet and that might complicate filtering the result of the indicator by the selected features.
... View more
01-25-2022
07:34 AM
|
1
|
0
|
296
|
POST
|
Hola Fernando, Gracias por compartir el mensaje del error, pero todavía no es claro que tipo de elemento visual están usando en el tablero. Existen diferentes condiciones según el tipo de elemento que estás usando. Con cual versión de Dashboard estás creando el tablero (en AGOL con el clásico o la nueva, o si es en Enterprise, que versión de Enterprise y si es clásico o la nueva versión). También sería bueno saber si eres el dueño de los datos y que campos estás usando (tipo de los campos).
... View more
01-17-2022
12:51 PM
|
0
|
0
|
991
|
POST
|
Hola Fernando, Puedes especificar que tipo de fuente de datos estás usando y también el tipo de elemento donde quieres usar la información?
... View more
01-17-2022
12:18 PM
|
1
|
0
|
1001
|
POST
|
@JoeBorgione sorry for the late comment, but it has been both a pleasure and a privilege to interact with you and learn from you. Your leave your footprints in this community; great solutions, helpful comments, and funny remarks will keep on helping people all around the globe! Enjoy your retirement and hope to see you around!
... View more
01-12-2022
09:17 AM
|
1
|
1
|
403
|
POST
|
Hi @bnmcknigh , I don't think you are missing anything. I just noticed that when your symbology is based on an Arcade expression, it looks like it does not scan for the possible values that can result and just returns a single value. Since you cannot add values in the Map Viewer, you would need to edit the json in https://ago-assistant.esri.com/ and add the missing categories, which is not something I recommend. It is better to log this with support.
... View more
12-10-2021
12:58 PM
|
1
|
1
|
1702
|
POST
|
Hi @Stefan_Thorn , Sorry about that, but the alignment options will only be available for point data.
... View more
12-06-2021
06:00 AM
|
0
|
1
|
908
|
POST
|
Hi @Stefan_Thorn - the arcade expression is not accepted. So why Arcade in ArcGIS pro is different from AGOL? - the arcade expression is not accepted. - labels cannot be aligned anymore? Unfortunately, there are differences in Arcade versions as you can find in the version matrix: https://developers.arcgis.com/arcade/guide/version-matrix/ . In this case, it is not the version difference, but the fact that the labels in a web map currently do not support these HTML-like capabilities that allow you to change the font of parts of the label. Next week there will be an update and many changes are coming to the map viewer (not the Map Viewer Classic). There are some changes that allow you to edit HTML for the pop-up, but I do not know if this changes something for the font settings that you are using in Pro. in the Map viewer labels can be aligned already. You will find the placement options when you edit the style: Not sure if the new version will have label rotation.
... View more
12-03-2021
01:48 PM
|
0
|
3
|
913
|
POST
|
Hoi @Ade_Bruijn , Your expression is close, but when you intersect the "wijken" layer with a "buurt", you obtain a featureset or in other words a collection of features even if there is only one feature. You will have to take for instance the first wijk found and then you can access the attribute that contains the name fo the "wijk". var wijken = FeatureSetById($map, /* concept wijken(afgeleid_van_buurten) */ "CBS_wijken_afgeleid_van_buurten__3310");
var wijk = First(Intersects(wijken, $feature));
return wijk["VeldNaamVanVeldMetWijkNaam"]; There is a potential catch... it is possible that a neighboring "wijk" is also returned and to avoid obtaining the wrong "wijk" name you could do a negative buffer to reduce the size of the "buurt" (current feature) and ensure that you get the right "wijk". An example you can find below: var wijken = FeatureSetById($map, /* concept wijken(afgeleid_van_buurten) */ "CBS_wijken_afgeleid_van_buurten__3310");
var buf = Buffer($feature, -1, "meter");
var wijk = First(Intersects(wijken, buf));
return wijk["VeldNaamVanVeldMetWijkNaam"];
... View more
11-19-2021
09:02 AM
|
2
|
1
|
3205
|
DOC
|
Hi @KylieRyan , Not sure what might be going wrong with the expression. The only thing I can think of is it doesn't find the layer in the map (check the exact name) or the feature does not intersect with any features from the featureset or there are differences in coordinate systems between the feature and the featureset. I reorganized the expression a bit, but no big changes: function getAttributeFromLargestArea(geom, fs, field) {
var items = Intersects(fs, geom);
var counts = Count(items);
if (counts == 0) {
return {'errorMessage': 'No intersection found'};
}
if (counts == 1) {
var result = First(items);
return result[field];
}
var largest = -1;
var result;
for (var item in items) {
var size = Area(Intersection(item, geom));
if (size > largest) {
largest = size;
result = item[field];
}
}
return result;
}
// var layerName = $layer;
var fieldName = "parcel_title";
var fs = FeatureSetByName($map, "council_data.property");
return getAttributeFromLargestArea(Geometry($feature), fs, fieldName);
... View more
11-18-2021
06:57 AM
|
0
|
0
|
4838
|
Title | Kudos | Posted |
---|---|---|
1 | 11-12-2017 02:40 PM | |
1 | 11-14-2013 10:56 PM | |
1 | 05-22-2019 01:11 PM | |
1 | 06-28-2019 02:45 PM | |
2 | 07-27-2022 02:21 PM |
Online Status |
Offline
|
Date Last Visited |
3 weeks ago
|