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
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With