[英]Android: How to know whether a bitmap on Google Maps has been clicked?
Here you will need to put some logic to capture which bitmap Image was clicked.
One technique which works in my case is to override a method in your ItemizedOverlay class
protected boolean onTap(int index) {
// Here you get the index of which bitmap image was tapped on
// You can map this index to the related activity you need to open by mean of your logic
OverlayItem item = mOverlays.get(index);
Intent intent=new Intent (context,YourActivity.class);
context.startActivity(intent);
return true;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.