Select to view content in your preferred language

Symbolizing polygons from point data in map

141
2
Jump to solution
a month ago
dwold
by
Frequent Contributor

I am trying to symbolize polygons from point data in a web map. I was able to do this in a pop-up (see code below), but I would like to bring those counts/values and symbolize the county polygon it is associated with.

Code for pop-up:

var essential_facilities = FeatureSetByName($map, "Essential Facilities", ['FacilityTy', 'County', 'FunctDay1'], false);

// Intersect selected feature with Intensity Feature Set
var intersectEssentialFacility = Intersects(Geometry($feature), essential_facilities);

// Populate array with Intensity values for selected county where FunctDay1 is less than or equal to 67
var FacilityType = [];
for (var k in intersectEssentialFacility) {
    if (k.FunctDay1 <= 67) {
        Push(FacilityType, k.FacilityTy);
    }
}

return Count(FacilityType);

Pop-up for county polygon:

dwold_0-1734707418986.png

I'd like to symbolize the county polygons (the number of facilities with reduced functionality at day 1) using a similar arcade expression but return an error when doing so:

dwold_1-1734707554492.png

Is this possible to do?

 

0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor

The Visualization profile only has access to the Core and Geometry bundles, not the Data access bundle, which includes all the FeatureSet functions.

All FeatureSet functions are not included in rendering profiles, such as visualization and labeling, because they require querying data from a server or database. Allowing these functions in rendering profiles would severely hinder the performance of apps executing the expression.

For example, if an expression were to access data with one query within the visualization profile of a layer with 1000 features, then the expression's execution context would need to make 1,000 queries in behalf of the user.

It also doesn't have access to the $map variable.

 

View solution in original post

2 Replies
KenBuja
MVP Esteemed Contributor

The Visualization profile only has access to the Core and Geometry bundles, not the Data access bundle, which includes all the FeatureSet functions.

All FeatureSet functions are not included in rendering profiles, such as visualization and labeling, because they require querying data from a server or database. Allowing these functions in rendering profiles would severely hinder the performance of apps executing the expression.

For example, if an expression were to access data with one query within the visualization profile of a layer with 1000 features, then the expression's execution context would need to make 1,000 queries in behalf of the user.

It also doesn't have access to the $map variable.

 

dwold
by
Frequent Contributor

@KenBuja Thank you!!

0 Kudos