Resizing info windows as percent and scrollbars

444
1
08-24-2012 06:09 AM
CarlosVulgamott
New Contributor
Morning list this is Carlos Vulgamott with the City of Lakewood, Colorado.  I am new to the  ArcGIS JavaScript API and have a few questions regarding using window resizing percentages vs pixel size on popup info windows and adding scrollbars.  I am adding popup window info and the only method I can find for resizing is using the pixel value and I want to use a percent but it???s not allowed.  I would also like to add scrollbars to this info window but can???t seem to locate that method within the help.  So I am hoping someone could show me a work around or point me in the right direction.

//RESIZE ALL INFO WINDOWS map.infoWindow.resize(300, 300);
var infoWin = new esri.InfoTemplate("${ADDRESS}", GetMarkerInfo(addressID, section)); graphic.setInfoTemplate(infoWin);

Thanks for your time in advance and have a good weekend.

Carlos Vulgamott, GISP
GIS Coordinator
City of Lakewood
303-987-7703
carvul@lakewood.org
0 Kudos
1 Reply
SteveCole
Frequent Contributor
There was some code I was looking at this week about infoWindows and keeping them within the visible screen. Maybe this thread can help you.


Otherwise, you could try something like this where you base the dimensions on a percentage of the map's overall dimensions:
map.infoWindow.resize(map.width * 0.75,map.height * 0.6);


Steve
0 Kudos