我正在使用osmdroid 5.6.5版本(最新版本),但MAPNIK地图瓦片加载速度极慢。
我在两台设备上尝试应用程序,都使用高速互联网连接(蜂窝数据和WIFI)。
看起来这是一个问题,因为不可能加载得那么慢。
以下是Activity中带有地图的代码片段:
我在两台设备上尝试应用程序,都使用高速互联网连接(蜂窝数据和WIFI)。
看起来这是一个问题,因为不可能加载得那么慢。
以下是Activity中带有地图的代码片段:
@Override
protected void onCreate( Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
appContext = getApplicationContext();
//important! set your user agent to prevent getting banned from the osm servers
Configuration.getInstance().load(appContext, PreferenceManager.getDefaultSharedPreferences(appContext));
setContentView(R.layout.navigation);
mMapView = (MapView) findViewById(map);
mMapView.setTileSource(TileSourceFactory.MAPNIK);
mMapView.setMultiTouchControls(true);
mMapView.setBuiltInZoomControls(true);
// add rotation gesture
mRotationGestureOverlay = new RotationGestureOverlay(this, mMapView);
mRotationGestureOverlay.setEnabled(true);
mMapView.setMultiTouchControls(true);
mMapView.getOverlays().add(this.mRotationGestureOverlay);
// Set to default location
IMapController mapController = mMapView.getController();
mapController.setZoom(15);
GeoPoint startPoint = new GeoPoint(48.8589654,2.2926013);
mapController.setCenter(startPoint);
}
我似乎找不到这个缓慢加载的原因。是否有使用更简单的地图选项?那会有帮助吗?还有其他解决方案吗?我可能做错了什么吗?
谢谢。