1

I'm using google maps apiv2 and I'v added a marker on the map. The marker has a long snippet, so I want to insert some carriage return into the string. I've tried \n, \r and System.getProperty("line.separator"), but nothing happens.

How can I add a CR in a snippet?

timss
  • 9,982
  • 4
  • 34
  • 56
user1071138
  • 656
  • 3
  • 12
  • 30
  • check this link: http://stackoverflow.com/questions/13904651/android-google-maps-v2-how-to-add-marker-with-multiline-snippet – Maulik May 17 '13 at 12:41

2 Answers2

1

You will have to create your own info window View using GoogleMap.setInfoWindowAdapter. The default info window implementation seems to remove newlines.

MaciejGórski
  • 22,187
  • 7
  • 70
  • 94
0

I've been looking at this today and found that HTML line breaks <BR>work fine. Some other HTML elements too: <font size=+1>,<font color=red> & <hr> It doesn't seem to like any CSS though.

Jono
  • 1
  • 1