开发者

OSMdroid: Markers above each other - how to click

I have a big problem with OSMdroid: I have a map with a bunch of markers, some of them are near each other so that the marker drawables are above each other.

Now, when the user clicks such a marker "stack" the code from t开发者_JAVA技巧he onClickListener for each marker is executed.

How can I prevent this execution and instead show a list of the markers "clicked"?


Using Touch event

public boolean onTouchEvent(MotionEvent event) {

    switch (event.getAction()) {
        case MotionEvent.ACTION_DOWN: {
            //Add this item to array        
            break;
        }
        case MotionEvent.ACTION_UP: {
            //Show list     
            break;
        }
    }
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜