Hello,
I'm upgrading a web app from 3.18 to 4.24. I'm trying to get the popup template for a feature layer to work and I'm running into an issue. Here's some of my code:
this.map = newMap({
basemap: {
baseLayers: []
},
});
var highlight = {
color: new DojoColor([255, 255, 0, 0]),
haloColor: new DojoColor([255, 0, 0]),
};
this.mapView = new MapView({
container: containerName,
map: this.map,
extent: new GeometryExtent({
xmin: -10006366.616730398,
ymin: 3439317.824438894,
xmax: -9309260.918769779,
ymax: 4215918.031816076,
spatialReference: new SpatialReference({ wkid: 102100 })
}),
highlightOptions: highlight,
popup: {
dockEnabled: true,
dockOptions: {
buttonEnabled: false,
breakpoint: false
}
}
});
var featureLayer = new FeatureLayer(layerUri,
{
id: layerListItem.layerId,
outFields: ['*'],
opacity: 0.6,
visible: true,
spatialReference: new SpatialReference({ wkid: 102100 }),
popupTemplate: {
title: "Test"
}
});
this.map.layers.add(featureLayer);
The feature layer is visible on the map after adding it and I'm even able to highlight the features within by clicking on them. However, the popup does not appear under any circumstance. Anyone have any ideas?