I have this layers (Series of images)
inside each one, there are this:
I need this information (now empty) to show in a infowindow. How can access to this?
Solved! Go to Solution.
Rolando,
You can get this date by getting the description property of a FeatureLayer:
FeatureLayer | API Reference | ArcGIS API for JavaScript 3.18 | Description
Or you can use esriRequest to get this as well.
Rolando,
You can get this date by getting the description property of a FeatureLayer:
FeatureLayer | API Reference | ArcGIS API for JavaScript 3.18 | Description
Or you can use esriRequest to get this as well.
thanks Robert,
But I want to know anything else:
Suppose that I click on map, right? So, the map is composed by little rectangs [0,1,2 ... sublayers or really, satellital images] at respective places. How can I get what layer (or rectangle of satellital image) I am clicking?
(sorry, if this question should not be here, I will republish it again)
Thanks a lot.
Rolando,
OK that is a very different question then. You would use the IdentifyTask for that.
Thanks Rober, It was really helpful.
Robert,
Can you explain me this example?
At this lines:
// InfoWindow expects an array of features from each deferred
// object that you pass. If the response from the task execution
// above is not an array of features, then you need to add a callback
// like the one above to post-process the response and return an
// array of features.
map.infoWindow.setFeatures([deferred]);
yes, it has comments but I don't understand.
Instead,
var deferred = identifyTask
.execute(identifyParams)
.addCallback(function (response) {..} ,
I'm making,
identifyTask.execute(identifyParams, function (response) {..} .
Instead .setFeatures([deferred]), I'm sending .setFeatures(feature), where feature = response[0].feature, and is saving the infoTemplate.
When I click the map, the infoWindow content is 'No information', Why?
Thanks a lot.
Rolando,
The answer is simple a deferred like the identify task returns an array of graphics and the map.infoWindow.setFeatures ia expecting an array of graphics. So you just have to make an array of graphics out of your graphics response and not a single graphic like you are now "setFeatures(feature)".