Hello understand how to add a popup for a feature layer, but not for a image service layer. The image contains attribute table.
Regards
Like this? Javascript API - Aerial Information Widget
Yea, like that
Check out the attached code. You will need an identify task.
But my service it's a image service, regards
i want to add a popup to this:
<script>
var map;
require([
"esri/map", "esri/layers/ArcGISImageServiceLayer",
"esri/layers/ImageServiceParameters", "dojo/parser", "dojo/domReady!"
], function(
Map, ArcGISImageServiceLayer,
ImageServiceParameters, parser
) {
parser.parse();
map = new Map("map", {
basemap: "topo",
center: [-71.2, 19
],
zoom: 9
});
var params = new ImageServiceParameters();
params.noData = 0;
var imageServiceLayer = new ArcGISImageServiceLayer("http://portalgis.cathalac.org/arcgis/rest/services/Yaque/combine_wm/ImageServer", {
imageServiceParameters: params,
opacity: 0.75
});
map.addLayer(imageServiceLayer);
});
</script>
Hi Marcelo,
you need to use esri.task.ImageServiceIdentifyTask. More info in the api documentation:
imageserviceidentifytask | API Reference | ArcGIS API for JavaScript
Good luck!