当前位置: 动力学知识库 > 问答 > 编程问答 >

android - Holes in polygon on OSM

问题描述:

I recently upgraded from 3.05 to 4.2 in open street maps for Android where i used to initialize my mapview using the code below

 mapView = (MapView) findViewById(R.id.mapView);

mapView.setTileSource(TileSourceFactory.MAPQUESTOSM);

This used to work fine in the 3.x version of osm library for android but the tiles wont load in the 4.2 one. In LogCat i go those 2 errors but i do not know if there are relevant with osm.

1

 03-23 20:44:35.773: I/o*.o*.v*.MapView(9397): Using tile source: [email protected]

03-23 20:44:35.773: I/AndroidLoggerFactory(9397): Logger name 'org.osmdroid.tileprovider.MapTileProviderBase' exceeds maximum length of 23 characters, using 'o*.o*.t*.MapTileProvid*' instead.

03-23 20:44:35.773: I/AndroidLoggerFactory(9397): Logger name 'org.osmdroid.tileprovider.LRUMapTileCache' exceeds maximum length of 23 characters, using 'o*.o*.t*.LRUMapTileCac*' instead.

03-23 20:44:35.773: I/AndroidLoggerFactory(9397): Logger name 'org.osmdroid.tileprovider.modules.TileWriter' exceeds maximum length of 23 characters, using 'o*.o*.t*.m*.TileWriter' instead.

03-23 20:44:35.773: I/AndroidLoggerFactory(9397): Logger name 'org.osmdroid.tileprovider.modules.MapTileModuleProviderBase' exceeds maximum length of 23 characters, using 'o*.o*.t*.m*.MapTileMod*' instead.

03-23 20:44:35.773: E/File(9397): fail readDirectory() errno=13

2.

03-23 20:44:44.083: I/System.out(9397): downloader calls detatch()

03-23 20:44:44.103: I/System.out(9397): downloader calls detatch()

03-23 20:44:44.583: W/System.err(9397): [DEBUG] GbaRequest - GbaRequest: Constructor Called 222 userAgent Apache-HttpClient/UNAVAILABLE (java 1.4)

03-23 20:44:44.583: W/System.err(9397): [DEBUG] NafRequest - NafRequest: NafRequest constructor===useragent Apache-HttpClient/UNAVAILABLE (java 1.4)

03-23 20:44:44.603: W/System.err(9397): [DEBUG] GbaRequest - GbaRequest: Constructor Called 222 userAgent Apache-HttpClient/UNAVAILABLE (java 1.4)

03-23 20:44:44.603: W/System.err(9397): [DEBUG] NafRequest - NafRequest: NafRequest constructor===useragent Apache-HttpClient/UNAVAILABLE (java 1.4)

Can anyone help with that?

网友答案:

I solved it. i had to add the write_external_storage and read_external_storage permissions so the osm can download the tiles.

分享给朋友:
您可能感兴趣的文章:
随机阅读: