I am working on an application where i need to show images that comes from server url, as the annotation(marker) on google map something like profile pic of the user. How to use a layout or custom view as the marker?
Thanks RawCoder
I am working on an application where i need to show images that comes from server url, as the annotation(marker) on google map something like profile pic of the user. How to use a layout or custom view as the marker?
Thanks RawCoder
You can use OverlayItem.setMarker()
.
overlayItem.setMarker(icon);
Where icon
is the Drawable
you retrieve from your URL.
EDIT in addition to your comment and your edited question:
I'd recommend you add the one image you posted in your question in the resources drowables and use it as a basis drawable. The retrieve the custom image from your URL and overlay it onto the existing one creating a new drawable image which you'll be able to use with setMarker()
.
The click will be caught by Overlay.onTap()
.