One should use isinstance instead of `type(A) ==` because of inheritance. There should be an exception if a list of `elif`s don't match. Make Polyline not only accept tuples, but any iterable.
The defaults for "icon" and "createInfoWindow" are read from the POI, but can be overridden by a filter function returning an appripriate dict.