始终显示在Android的地图标记称号 [英] Always show map marker title in Android

查看:134
本文介绍了始终显示在Android的地图标记称号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我添加默认标记为GoogleMap的方式如下:

I'm adding default Marker to GoogleMap the following way:

GoogleMap map = ((MapFragment) getFragmentManager().findFragmentById(R.id.editMapMap)).getMap();

MarkerOptions markerOptions = new MarkerOptions();
markerOptions.position(currentLocation.getCoordinate());
markerOptions.title(Utils.getLocationString(currentLocation.getCoordinate()));
markerOptions.snippet("Blah");

locationMarker = map.addMarker(markerOptions);
locationMarker.setDraggable(true);

我怎样才能使标志始终显示标题和片段没有联系?我也想禁用隐藏他们联系。

How can I make marker always show title and snippet without touch? I also would like to disable hiding them on touch.

推荐答案

这是很容易的:

locationMarker.showInfoWindow();

这篇关于始终显示在Android的地图标记称号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆