I have a map view with several pins plotted on different addresses. All works very well. The issue arises when you have more than one item pointing to the same address. For example,
Unit 1/ 45 ABC Street, XYZ
Unit 7/ 45 ABC Street, XYZ.
I use the following line of code to fetch the lat and long in order to create a GeoPoint.
List<Address> listfromGoogle = gc.getFromLocationName(a, 1);
where a is the address and gc is the GeoCoder object.
According the API , the two addresses mentioned above returns the same coordinates.
So while plotting the pins on the map, they overwrite each other ending up with one pin for multiple addresses.
I tried to implement a list that displays all the repeating addresses on the balloon. The attempt was in vain and I realised that
OverlayItem(GeoPoint point, java.lang.String title, java.lang.String snippet)
allows me only to supply two strings to be shown on the balloon.
Any clue as to how I could squeeze in a List that displays the multiple addresses?
You should implement a custom OverlayItem
then in your custom ItemizedOverlay you can use this list to create a custom dialog with a list in the
onTap
method