有人知道如何将多行代码段添加到Google地图标记吗?这是我添加标记的代码:
map.getMap().addMarker(new MarkerOptions()
.position(latLng()).snippet(snippetText)
.title(header).icon(icon));
Run Code Online (Sandbox Code Playgroud)
我想要片段看起来像这样:
| HEADER |
|foo |
|bar |
Run Code Online (Sandbox Code Playgroud)
但是当我试图将snippetText设置为"foo \n bar"时,我看到了foo bar,我没有任何想法如何使它成为多线.你能帮助我吗?