Minor nit on this.  Can you see if instead doing this works?

'''javascript
$('#plottedDataHeader').html(_.template('Plotted data for selected location: <%= lat %>&deg;N <%= lon %>&deg;W', {