1

I populate my google maps with number of Markers based on my server data.

MY server data contains ProfilePic , Name , Designation , & lat long etc...

When I click on my Marker I open BottomSheet that display the details like ProfilePic , Name , Designation . just like google map does

I don't know how do I get ProfilePic and other data on click of my marker .

I am very familiar to Recyclerview adapter concept ,

How do I apply this concept to my marker ?

karthik kolanji
  • 2,044
  • 5
  • 20
  • 56

2 Answers2

2

You can set custom adapters of infowindow for marker in google map.. check this example--http://androidfreakers.blogspot.in/2013/08/display-custom-info-window-with.html

0

Solution 1-> You can use HashMap for mapping of markers and your server data list.

Solution 2-> You can append the id or position to marker title with token(comma, semicolon...) and then onClick marker you can break them for further mapping to your server data list. In this case you also need to override customInfoWindow.

Example to follow:- http://devlearning.blogspot.in/2014/05/android-custom-info-window-with.html

Hope this may helpful to you

Thanks,

Bhuvnesh

Bhuvnesh
  • 1,055
  • 9
  • 29