steffanc/Tahoe — pull request #25 by rogerhu (2013-11-03 01:09:08+00:00)
Title: Add AndroidMaps Utils to our dependencies.

It turns out that Android Google Maps SDK makes it really hard to even put text in the markers.
You can put the icon, but putting the text requires drawing a Canvas bitmap. I'd rather not bother.

This library includes an IconGenerator and 9 PNG's to handle it. helps manage this stuff.

Because we're not using Gradle, we need to update our Project Structure.

1. Import this source as a module in the Project Structure section.
2. This module requires Google Play and Google v4 support library.
3. Add this dependency to the Tahoe project.

Creating a marker therefore becomes pretty simple:

IconGenerator tc = new IconGenerator(this);
tc.setStyle(IconGenerator.STYLE_PURPLE);
Bitmap bmp = tc.makeIcon("hello");

Marker marker1 = map.addMarker(new MarkerOptions().position(new LatLng(37.7700699, -122.407618)).
icon(BitmapDescriptorFactory.fromBitmap(bmp)));

I may try to extend the IconGenerator to use our own PNG's. But the speech bubbles are provided out of the box.