This is a demo showing a custom icon class. For implementation details, head over to my GoogleMaps wiki.