How do I override the feature layer's onclick to check if the point clicked is within the "AIP"
There are probably a couple of ways you could approach this. One might be:- add FeatureLayer1 to the map, but don't assign it an infoWindow- add the AIP layer/graphic to the map- set an onClick listener on the AIP layer, which does something like this:
dojo.connect(AIPlayer, "onClick", function(evt) {
var graphic = evt.graphic;
var attributes = evt.graphic.attributes;
var infoTemplate = new esri.InfoTemplate;
//1. set the infoTemplate's Contents and Title using the attributes
//2. attach the infoTemplate to map.infoWindow
//3. display the map's infoWindow at evt.mapPoint
});