An ItemizedOverlay
is a class extending Overlay
(as you want to do) and mostly completed (you still need to extend it and fill the specific parts) in order to add a list of Drawables
to the map in specified Geopoints
(using a list of OverlayItem
). It also implements onTap()
for the items added.
So bottom line, ItemizedOverlay
is a pre-coded class aiming what seems to be your objective.
Limitations
It may not be the best solution for all your overlays ...
Examples where it would be better to use your own calss extending overlay:
- If your
POI
requires aDrawable
that needs to be rotated at runtime (i.e. an arrow pointing in a changing direction) - If you want to draw a route without markers
- If you want to draw something that can't be easly made from a drawable
Regards.