百度地图之短串分享(四)
turn true;
}
}
/**
* 使用ItemizevOvelray展示反地理编码点位置,当该点被点击时发起短串请求.
*
*/
private class AddrShareOverlay extends ItemizedOverlay {
private MKAddrInfo addrInfo;
public AddrShareOverlay(Drawable defaultMarker, MapView mapView,
MKAddrInfo addrInfo) {
super(defaultMarker, mapView);
this.addrInfo = addrInfo;
addItem(new OverlayItem(addrInfo.geoPt, addrInfo.strAddr,
addrInfo.strAddr));
}
@Override
public boolean onTap(int index) {
currentAddr = addrInfo.strAddr;
mSearch.poiRGCShareURLSearch(addrInfo.geoPt, "分享地址",
addrInfo.strAddr);
return true;
}
}
}
其布局文件:
[html]
< xml version="1.0" encoding="utf-8" >
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >