osmdroid: Tiles load extremely slowly
I am using the latest version (5.6.5) and the tiles load extremely slowly, to the rate of bad UX. This happens on two devices I tried the app on, both with high-speed internet connection (both cellular and WIFI). I’m using the MAPNIK map, everything based on the tutorial of osmdroid.
`@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);
}`
I can’t seem to find the reason for this slow load. Is there an option to use a simpler map? will that help? Are there any other solutions, something I’m doing wrong?
Thanks.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 3
- Comments: 20 (2 by maintainers)
Guys android 6 given new way assigning permission of external storage so i have given ActivityCompat.requestPermissions(LoginActivity.this, new String[{Manifest.permission.READ_EXTERNAL_STORAGE,Manifest.permission.ACCESS_FINE_LOCATION},1); or else goto settings->Applications->Application Manager->choose your app->permission and on permissions so that problem will solve.