Hi! I'm kind of new to esri API, and I need to resolve a task. My job is to print out AGE_10_14 field values in an alert, where STATE_NAME = 'California'. I could not find any documentation, neither post, which could give me a guide. I accept any help gratefully! My code is:
require([
"esri/config",
"esri/Map",
"esri/views/MapView",
"esri/layers/FeatureLayer",
"esri/renderers/ClassBreaksRenderer",
"esri/symbols/SimpleFillSymbol",
"dojo/_base/Color",
"esri/Graphic"
], function(esriConfig,Map, MapView, FeatureLayer, Extent ) {
const map = new Map({
basemap: "arcgis-topographic"
});
const populationRenderer = {
type: "simple",
symbol: {
color: "#BA55D3",
type: "simple-fill",
style: "solid"
}
}
const view = new MapView({
container: "viewDiv",
map: map,
center: [-105.80543,38.02700],
zoom: 5
});
USACounties = new FeatureLayer({
definitionExpression: "STATE_NAME = 'California'",
renderer: populationRenderer
});
map.add(USACounties, 0);
});