【发布时间】:2012-04-13 20:26:53
【问题描述】:
您好,我正在使用此标记的调整大小版本 (http://www.clker.com/clipart-orange-pin-4.html) 在 android 上的谷歌地图中显示标记。
问题是我不知道如何使标记点与坐标匹配。 箭头点在宽度坐标的 1/5 和高度的 MAX 处。
这是我的课
public class GestionaleItemizedOverlay extends com.google.android.maps.ItemizedOverlay {
public GestionaleItemizedOverlay(Drawable defaultMarker, Context context) {
//super(boundCenterBottom(defaultMarker));
super(boundCenter(defaultMarker));
this.mContext = context;
}
...
还有这个
this.marker_poi = this.getContext().getResources().getDrawable(R.drawable.marker);
this.marker_poi.setBounds(this.marker_poi.getIntrinsicWidth() / 2, this.marker_poi.getIntrinsicHeight(), this.marker_poi.getIntrinsicWidth() / 2, 0);
new GestionaleItemizedOverlay(this.poi, this.context);
在将标记传递给构造函数之前,我是否需要在标记上设置边界?为什么 super(defaultMarker) 使所有标记都不显示?
【问题讨论】:
标签: android google-maps