How do I insert a newline into text of a marker tooltip. I am using \n
which doesn't seem to be working.
See code below:
mark = new google.maps.Marker({
map: map,
position: center,
title:inspStates[i].name+ "\n"+"total: "+inspStates[i].totalInsp+ "\n"+ info,
zIndex:3
});
Use single quotes (' ') instead of double quotes (" ")it will work, like this code.
mark = new google.maps.Marker({
map: map,
position: center,
title:inspStates[i].name+ '\n total: '+inspStates[i].totalInsp+ '\n'+ info,
zIndex:3
});