Tuesday, 27 August 2013

Getting a SpannableString to my implementation InfoWindowAdapter

Getting a SpannableString to my implementation InfoWindowAdapter

Google Maps V2. I have markers on a map that I have an associated
SpannableString associated with. I want to display this spannableString in
the popup window when the marker is clicked. I create an implementation of
InfoWindowAdapter, but then I realize that all the data it receives is
from MarkerOptions.. I can't attach a SpannableString to
MarkerOptions.title() or MarkerOptions.snippit() because they only accept
String. I can't extend MarkerOptions because it's final.
It appears I am sol.. however, there must be someway to do this I think.
Is there a way to arbitrarily associated data with an object? I guess I
could create a HashMap.. Seems hacky and obtuse..
All help appreciated. thank youuuu!

No comments:

Post a Comment