Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/2.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
Java 如何将Kmlayer添加到M4B Google Map For Business?_Java_Android_Google Maps_Kml_Kmz - Fatal编程技术网

Java 如何将Kmlayer添加到M4B Google Map For Business?

Java 如何将Kmlayer添加到M4B Google Map For Business?,java,android,google-maps,kml,kmz,Java,Android,Google Maps,Kml,Kmz,我需要按照以下步骤将Kmlayer添加到GoogleMapforBusiness 首先,我使用“GoogleMapsUtils”和以下渐变 compile 'com.google.maps.android:android-maps-utils:0.4+' 就这样 以下是应用代码: try { KmlLayer kmlLayer = new KmlLayer(googleMap, R.raw.traiff160809, RTA.getContext()); kmlLayer.ad

我需要按照以下步骤将Kmlayer添加到GoogleMapforBusiness

首先,我使用“GoogleMapsUtils”和以下渐变

compile 'com.google.maps.android:android-maps-utils:0.4+'
就这样

以下是应用代码:

try {
    KmlLayer kmlLayer = new KmlLayer(googleMap, R.raw.traiff160809, RTA.getContext());
    kmlLayer.addLayerToMap();
} catch (XmlPullParserException e) {
    e.printStackTrace();
} catch (IOException e) {
    e.printStackTrace();
}
但我无法在构造函数中传递GoogleMap for business实例

请给我忠告, 谢谢