How to format numeric attribute values in an infoWindow

Discussion created by stevel on Nov 10, 2010
Latest reply on Nov 11, 2010 by stevel
Is it possible to format attribute values in an infoWindow?

For example, see the sample at

The infoWindow template uses population density values from attribute values in a variable:

infoTemplate.setContent("<b>2000 Population: </b>${POP2000}<br/>"
                             + "<b>2000 Population per Sq. Mi.: </b>${POP00_SQMI}<br/>"
                             + "<b>2007 Population: </b>${POP2007}<br/>"
                             + "<b>2007 Population per Sq. Mi.: </b>${POP07_SQMI}");
Is it possible to apply formatting to these values, eg so the POP07_SQMI value is rounded to zero decimal places?