I am following a google map tutorial on youtube. All is well until I try to display the stored data on the infowindow. In the code below latitude and longitude are displayed in one line concatenated. I would like to have them in separate lines. I have tried a number of html tags as well as '/n'. No joy. Unfortunately, the tags are also displayed along with the data. Any clues would be appreciated.
function showAllColleges(allData) {
var infoWind = new google.maps.InfoWindow;
Array.prototype.forEach.call(allData, function(data){
var content = document.createElement('div');
var strong = document.createElement('strong');
strong.textContent = data.lat + data.lng ;
content.appendChild(strong);
for anybody that is having the same problem I have cobbled the solution from a number of entries in stackoverflow.
Each data.element from the database can be displayed in the infowindow. Here I have shown how to display dacicost, lat and lng
There must be a more efficient way of doing this but, at last, this works.