function createMapMenu() { // Creates right-click context menu for map ctxMenuForMap = new dijit.Menu({ onOpen: function (box) { currentLocation = getMapPointFromMenuPosition(box); var infoTemplate = new esri.InfoTemplate(); identifyParams.geometry = currentLocation; identifyParams.mapExtent = map.extent; var deferred = identifyTask.execute(identifyParams); deferred.addCallback(function (response) { eturn dojo.map(response, function (result) { var feature = result.feature; feature.attributes.layerName = result.layerName; if (result.layerName === 'LayerOfInterest') { //This can get you the list of attributes feature.attributes; } return feature; }); }); } });
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.