Android-在SupportMapFragment中删除Google地图的流量
我将地图加载到:Android-在SupportMapFragment中删除Google地图的流量,android,google-maps,google-maps-api-3,google-maps-api-2,supportmapfragment,Android,Google Maps,Google Maps Api 3,Google Maps Api 2,Supportmapfragment,我将地图加载到: 公共类MapFragment扩展了SupportMapFragment{… 我不知道如何关闭流量层。我尝试了getMap().setTrafficEnabled(false);,但似乎不起作用 有人能帮我理解它是如何工作的吗?谢谢你。谢谢你@Aaron He!问题出在getMap()上。在重构我的代码以使用getMapAsync()后,它工作了!再次感谢!你把getMap().setTrafficEnabled(false);放在哪里?还可以使用getMapAsync(),因为
公共类MapFragment扩展了SupportMapFragment{…
我不知道如何关闭流量层。我尝试了getMap().setTrafficEnabled(false);
,但似乎不起作用
有人能帮我理解它是如何工作的吗?谢谢你。谢谢你@Aaron He!问题出在
getMap()
上。在重构我的代码以使用getMapAsync()
后,它工作了!再次感谢!你把getMap().setTrafficEnabled(false);
放在哪里?还可以使用getMapAsync()
,因为getMap()
已弃用。