Hi,
I m using the Editor to display attribute inspector. But for some cases i need to open the display the attribute inspector with the object id i have.
Is it possible to make a query with object id, and display its data in the editor attribute inspector ?
Best Regards.
Ozcan,
You should be able to do this pretty easily. There is a good example here:
Using the attribute inspector | ArcGIS API for JavaScript 3.18
You can easily add a function like this to select a feature by OBJECTID and open the info window containing the attribute inspector. Here is a code snippet:
function updateByOBID(myOBID)
var selectQuery = new Query();
selectQuery.where = "OBJECTID = " + myOBID;
selectQuery.returnGeometry = true;
teamsFL.selectFeatures(selectQuery, FeatureLayer.SELECTION_NEW, function(features) {
if (features.length > 0) {
//store the current feature
updateFeature = features[0];
map.infoWindow.setTitle(features[0].getLayer().name);
map.infoWindow.show(evt.screenPoint, map.getInfoWindowAnchor(evt.screenPoint));
} else {
map.infoWindow.hide();
}
});
}
regards,
Tom