Select to view content in your preferred language

Displaying all layers in ArcGIS feature service in Angular application

04-21-2022 10:22 AM
New Contributor

As you can see in the below living atlas layer, there are multiple layers inside (state,county,tract etc..)

But when I add this link, it will display only the first layer.(State). Then, when I zoom in the map, that layer disappears.

I want to display all the 4 layers of that feature service.(state,county, tract, blockgroups)

How do I achieve this?



const genderLayer = new FeatureLayer({
url: "",
const layersToCreateMyPopupTemplate = [ageLayer,genderLayer];

const map = new Map({
basemap: 'topo-vector',
layers: layersToCreateMyPopupTemplate

const view = new MapView({
map: map,
zoom: 3,
center: [-97.63, 38.34],




<!-- Map Div -->
<div #mapViewNode></div>



0 Kudos
1 Reply
Frequent Contributor II

You have two options


Or using Layer.fromPortalItem

The root on the service will give you the itemId


I even did a video on this

0 Kudos