gpt4 book ai didi

java - 如何删除标记图标

转载 作者:行者123 更新时间:2023-11-29 05:04:21 24 4
gpt4 key购买 nike

我有一个带有信息窗口的标记。我怎样才能从 map 上删除那个绿手指?看看这个:

enter image description here

我的代码:

Marker startMarker = new Marker(mapView);
startMarker.setPosition(gPt);
startMarker.setIcon(null);//doesn't help
startMarker.setAnchor(Marker.ANCHOR_CENTER, 1.0f);
InfoWindow infoWindow = new MyInfoWindow(R.layout.bonuspack_bubble,
mapView, company);
startMarker.setInfoWindow(infoWindow);
startMarker.setTitle(company.getName());
startMarker.showInfoWindow();
mapView.getOverlays().add(startMarker);

最佳答案

试试这段代码

mapView.getOverlays().remove(startMarker);
mapView.invalidate();

关于java - 如何删除标记图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30934128/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com