开发者

How to attach a description to a GeoPoint

开发者 https://www.devze.com 2023-02-18 21:17 出处:网络
I am implementing a series of markers onto a mapView in android and would like to be able to tag them with descriptions however I am having trouble finding a method of assigning descriptions to the ma

I am implementing a series of markers onto a mapView in android and would like to be able to tag them with descriptions however I am having trouble finding a method of assigning descriptions to the markers.

The problem is that I need to remove the duplicate GeoPoints while still keeping the descriptions for it.

For example:

GeoPoint1 = [0,0] GeoPoint2 = [0,0] GeoPoint3 = [0,0]
"foo"             "bar"             "something"

would need to be converted 开发者_如何学运维into:

 GeoPoint = [0,0] 
 "foo, bar, something"

I have already used a Set to remove duplicates but as android GeoPoints only allow Lat and Long values I am unable to use this method (I think) meaning I need something different.

Any help would be great as I'm kinda stumped on it.

Thanks =D


You might want to look into using the android-mapviewballoons library. It allows you to add items to an overlay with a title and description, and tapping an item shows a balloon popup with the info.

0

精彩评论

暂无评论...
验证码 换一张
取 消