[英]Mapbox Android, How to add a button to a Marker
You can do this by creating your own info window adapter, An example doing this can be found in the demo app here . 您可以通过创建自己的信息窗口适配器来完成此操作。有关示例,请参见此处的演示应用程序 。 Important code to use:
要使用的重要代码:
mapboxMap.setInfoWindowAdapter(new MapboxMap.InfoWindowAdapter() {
@Nullable
@Override
public View getInfoWindow(@NonNull Marker marker) {
...
// return the view which includes the button
}
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.