【发布时间】:2018-11-06 04:55:53
【问题描述】:
我在 cartoDB 浏览器中有一个包含三层的地图,我无法在 android 应用程序中的地图中添加图层如何使用 java 代码将 CartoDB 浏览器中的 aKMZ 图层(不是底图)添加到 Android 应用程序以显示应用程序中的所有图层?? 谁能帮我? ????
添加底图的代码
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Register the license so that CARTO online services can be used
MapView.registerLicense(LICENSE,getApplicationContext());
// Get 'mapView' object from the application layout
mapView = (MapView) this.findViewById(R.id.mapView);
// Add basemap layer to mapView
CartoOnlineVectorTileLayer baseLayer = new CartoOnlineVectorTileLayer(CartoBaseMapStyle.CARTO_BASEMAP_STYLE_VOYAGER);
mapView.getLayers().add(baseLayer);
}
【问题讨论】:
-
欢迎来到 SO。请提供您的代码,以便我们为您提供帮助。