I’m using an ItemizedOverlay containing a list of OverlayItems to display markers on top of a MapView. My problem is that when an OverlayItem uses the default marker defined for the overlay, its getMarker() method returns null. Is there another way I can get that marker image? I’d like to see if I can animate it during onTap().
I’m showing a bunch of markers on the map, many of which use the same image, so I thought it best to make use of the overlay’s default image to save memory. For this app it’s possible there could be more than 100 markers displayed for a given overlay.
You have a couple of different ways how to address this. I’m showing the simplest one I know, if it don’t solves your problem, let me know.
With this you can use the default marker in your code for the onTap()