I have multiple feature layers on the map, and I wish to display a different sized infoWindow for each layer.

As far as I can tell, the map has one infoWindow, which can be resized using:


Each feature layer then provides the infoTemplate which contains the Title and Content, but no sizing information (right?).

How can I show a large infoWindow when clicking on FeatureLayer1, and a small infoWindow when clicking on FeatureLayer2?


Actually I think I figured it out.

Override the standard featureLayer onClick behaviour using:

dojo.connect(featureLayer1, "onClick", function () {

dojo.connect(featureLayer2, "onClick", function () {
  • That should do it! Good work Steve. Feb 15 '12 at 18:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.