Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/182.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android-在SupportMapFragment中删除Google地图的流量_Android_Google Maps_Google Maps Api 3_Google Maps Api 2_Supportmapfragment - Fatal编程技术网

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()
已弃用。