Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do multiple lines in GoogleMaps marker snippet in Swift?

Let says I have this code

//time and speed are strings marker.snippet = time + speed // 2016/04/14 60kmph

I want them to show in two lines and not one line only Thanks in advance.

like image 241
Tom Derry Marion Mantilla Avatar asked Dec 29 '25 08:12

Tom Derry Marion Mantilla


2 Answers

Hahaha, "\n" LOL???

"\n" should get parsed as a standard new line.

So result would be this?

marker.snippet = time + "\n" + speed
like image 168
mxaddict Avatar answered Dec 30 '25 22:12

mxaddict


Just try with

 marker.snippet = " \(time) \n \(speed)" 

All the best

like image 38
Harish Singh Avatar answered Dec 30 '25 23:12

Harish Singh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!