nmn22601 nmn22601 - 1 year ago 91
HTML Question

google map infowindow description needs line breaks

I am having trouble getting to show linebreaks in the description area of my infowindow. I have tried adding

in the description but that does not

Here is what I have

var bubbleText = '<div class="bubble-container shadow"><div class="img-container"><img src="placeholder1.png" alt="Location image"/></div><div class="info-container"><h2>' + kmlLayerEvent.featureData.name + '</h2><p>' + kmlLayerEvent.featureData.description.split("<br />")[0] + '</p><a href="' + re_result[0] + '" target="_blank">View Brochure</a></div></div>';


Answer Source

instead of <br /> use <br>


 + kmlLayerEvent.featureData.description.split("<br />")[0] + 


 + kmlLayerEvent.featureData.description.split("<br>")[0] + 
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download