Osmdroid地图瓷砖没有显示

时间:2014-08-27 02:14:05

标签: android osmdroid

我正在将Map应用程序编程到我的android。

现在,让osmdroid工作起来,一切都很好。问题是,当我打开地图时,它会显示网格,但没有瓷砖。

我正在使用:

  • osmdroid-机器人-4.0.jar
  • SLF4J-API-1.7.7.jar
  • SLF4J-NOP-1.7.7.jar

在创建方法上,我有以下内容:

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Specify the XML layout to use:
    setContentView(R.layout.osm_map);

    // Find the MapView controller in that layout:
    m_mapView = (MapView) findViewById(R.id.mapview);

    // Setup the mapView controller:
    m_mapView.setBuiltInZoomControls(true);
    m_mapView.setMultiTouchControls(true);
    m_mapView.setClickable(true);
    m_mapView.setUseDataConnection(false);
    m_mapView.getController().setZoom(MAP_DEFAULT_ZOOM);
    m_mapView.getController().setCenter(
        new GeoPoint(MAP_DEFAULT_LATITUDE, MAP_DEFAULT_LONGITUDE));
    m_mapView.setTileSource(TileSourceFactory.MAPNIK);
} // end onCreate()

瓷砖已在MOBAC 1.9.16上创建,并以两种方式存储在SD卡中:

  • /sdcard/osmdroid/mapnik.zip
  • / SD卡/ osmdroid /瓦/(3folders)

修理它的任何提示? Navcat完全没有错误。

1 个答案:

答案 0 :(得分:1)

最有可能与this one重复。

如果您打算使用使用MOBAC生成的zip文件,请将内容存储在" / sdcard / osmdroid / tiles /(3folders)"是无关紧要的。你应该删除这3个文件夹。

相关问题