我正在尝试使用kmlLayer.removerLayerFromMap()从地图上删除KML图层,但是它不起作用
当我在地图上添加KML图层时,我将其存储在KMLLayer的ArrayList中 并且每当用户按下卸妆kml图层按钮时,我都会在按钮onClickListener上从地图上删除所有kmllayer
Initial position is 0 (0.000s reply)
New position is 2 (2.887s reply)
adding kmlLayer
KmlLayer kmlLayer = new KmlLayer(mMap, new ByteArrayInputStream(byteArr),
getContext());
if(!kmlLayer.isLayerOnMap()){
Log.i("LAYER","LAYER added");
kmlLayer.addLayerToMap();
downloadedKMLFiles.add(kmlLayer)
}
Removing kml layer