1

I'm trying to add an image from my backend to a certain pin, currently I can add the title and the snippet but how do i add and image to that?

Cristian Cam G
  • 362
  • 1
  • 3
  • 19

1 Answers1

3

You need to create Custom Info window for that. For Official documentation, you can refer this https://developers.google.com/maps/documentation/android-api/infowindows

Also you can find a sample tutorial here http://android-er.blogspot.in/2013/01/create-custom-info-contents-for-by.html

Also one more thing, you may not be able to distinguish between click events on various components of the layout as mentioned in the documentation.

As mentioned in the previous section on info windows, an info window is not a live View, rather the view is rendered as an image onto the map. As a result, any listeners you set on the view are disregarded and you cannot distinguish between click events on various parts of the view. You are advised not to place interactive components — such as buttons, checkboxes, or text inputs — within your custom info window.

But you can follow this workaround for making them work.

Community
  • 1
  • 1
Mukesh Rana
  • 4,051
  • 3
  • 27
  • 39