I am currently pulling in a map service as a MapImageLayer. I'm using the IdentifyTask to display results in a popup; however, I'm having a few issues:
Relevant code snippets:
mapView = new MapView({
container: app.containerMap,
map: map,
center: app.center,
zoom: 9,
padding: app.viewPadding,
popup: {
highlightEnabled: true,
featureNavigationEnabled : true
}
});
var tLayer= new MapImageLayer({
url: "https://server/arcgis/rest/services/tViewerr/tLayers/MapServer"
});
map.add(tLayer)
mapView.on("click", executeIdentifyTask);
function executeIdentifyTask(event){
identifyURL = tLayer.url;
identifyTask = new IdentifyTask(identifyURL);
identifyParams = new IdentifyParameters();
var identifyActions = [];
identifyParams.tolerance = 15;
identifyParams.returnGeometry = true;
identifyParams.layerIds = [2,3,4,5,6];
identifyParams.geometry = event.mapPoint;
identifyParams.mapExtent = mapView.extent;
identifyTask.execute(identifyParams).then(function(response){
var results = response.results;
return results.map(function(result){
var feature = result.feature;
identifyActions = createIdentifyActions(result);
var layerName = result.layerName;
feature.popupTemplate = {
title: layerName,
content: "{*}",
overwriteActions: true,
actions: identifyActions
};
return feature;
});
}).then(showPopup);
function showPopup(response){
if (response.length > 0) {
mapView.popup.open({
features: response,
location: event.mapPoint
});
mapView.popup.on("trigger-action", triggerPopupActions)
}
}
Thank you!
Hi there, I was wondering if there was any update on this. I too have noticed the hamburger disappear. Bug or no longer supported?
Hey, any issues to fix this yet do we know? I'm pulling in a popup for a raster, from a layer hosted in the Atlas (URL), same issue occurring, pop up only shows when zoomed right in