我更新自: ' osmdroid-android-4.3 + osmbonuspack_v5.1 'to' osmdroid-android-5.1 + osmbonuspack_v5.7 '
我还导入了' osmdroid-third-party-5.1.jar '
然后我检查了OsmNavigator的源代码,发现mapView的创建与旧版本的OsmDroid不同:
//map = (MapView) findViewById(R.id.map);
GenericMapView genericMap = (GenericMapView) findViewById(R.id.map);
MapTileProviderBasic bitmapProvider = new MapTileProviderBasic(getApplicationContext());
genericMap.setTileProvider(bitmapProvider);
map = genericMap.getMapView();
错误:GenericMapView无法解析为类型
我做不到:import org.osmdroid.bonuspack.mapsforge.GenericMapView;
问题:我在哪里可以找到包裹:org.osmdroid.bonuspack.mapsforge.GenericMapView;
?
答案 0 :(得分:0)
在osmbonuspack / MapsForgeForOsmdroid
中如果您将OSMBonusPack包含在Gradle和Jitpack中,请添加:
dependencies {
...
compile 'com.github.MKergall.osmbonuspack:MapsForgeForOsmdroid:v5.7'
}