0

I'm using the Android MapBox SDK, and I want to show the info window for a marker that I've created. showInfoWindow as far as I can tell is the only way to do this. The problem is it requires both a MapBoxMap, which I have, and a MapView, which I do not. I'm using MapFragment, and I don't see any way to get a MapView instance. It looks to me like this is a gap in the SDK but I'm hoping someone has a solution.

I already hit another critical problem preventing me from using a MapView (issue raised with MapBox) and now this is critical functionality for my app that I can't do without a MapView so I'm thinking I may have to abandon MapBox altogether. :-(

4

1 回答 1

4

而不是Marker.showInfoWindow您需要通过以下方式选择标记:

mapboxMap.selectMarker(Marker marker)

这不仅会显示信息窗口,还会管理选定的状态。

于 2017-07-25T08:22:56.083 回答