Tell me more ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

How can I set the size of an infoWindow dynamically, based on the length of its Title, when the Title isn't known until the user clicks on a map feature?

Take the map here as an example - how could you resize the popup infoWindow to accommodate varying Title lengths?

This map uses the ${Name} notation to represent the Title field, with the field value substituted into the infoWindow when the feature is clicked.

The infoWindow has a fixed size (set using map.infoWindow.resize(250,95)). Since the length of the title isn't known until the feature is clicked, how is it possible to resize the infoWindow based on the length of the Title?

Using ArcGIS Server 10 with the JavaScript API 2.3

share|improve this question
u ever resolve this one Stephen? – Simon Jan 9 at 5:12
1  
@Simon nope, I never got around to resolving this as it dropped off my priority list. Perhaps you could listen for when the infoWindow opens, evaluate the length of the title, and resize according? – Stephen Lead Jan 9 at 5:24

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.