block by wboykinm 5259790

infowindow switch

Full Screen

In this example, click on any polygon to see the custom infowindow, based on a template script that appears in the page header. Then, click on one of the layer switch buttons on the right to fire the event. The layer symbology updates, the layer title updates in the footer, but the infowindow text doesn’t change, even though it should update along with everything else:

$('.tiptitle').text($(this).text());

What’s the problem here? The most-likely culprit seems to be that the HTML of the infowindow template is not actually HTML, but a cue to the template script to assemble the HTML. That cue is not given by the click event of the layer button.

index.html