I am trying to add a custom overlay to a Google Maps map in my program, but I'm unable to find the method to do so when using fragments.
All the examples and guides I've been able to found are using MapView
, and the overlays can be added as simply as myMapView.getOverlays().add(myOverlay)
.
I can't however find a similar method when working with a fragment instead of MapView. I have a handle to the GoogleMap
, which does not seem to contain .getOverlays()
, and I am not having that much success with the fragment itself either.
So, can I, and/or where can I find a similar method for adding a overlay to a MapFragment
instead of MapView
?