我使用谷歌地图,并希望添加片段,但我不想让他们看到我。我尝试了一切,但没有找到解决方案。也许有人知道如何隐藏用户片段?如何通过将标记添加到标记来隐藏谷歌地图片段?
map.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter(){
@Override
public View getInfoWindow(Marker marker) {
return null;
}
@Override
public View getInfoContents(Marker marker) {
View v = getLayoutInflater().inflate(R.layout.custom_maps_window_info, null);
TextView title = (TextView) v.findViewById(R.id.custom_marker_title);
title.setText(marker.getTitle());
return v;
}
});
添加标记
map.addMarker(new MarkerOptions()
.title("TITLE NAME")
.icon(markerIcon)
.position(new LatLng(0, 0))
.snippet("TEST") /* <- hide */
);
需要隐藏刚刚从地图信息窗口
谢谢片段! :)
**我想通过这个文本,并通过片段转移到另一个活动,但我不能在用户成功。** –