【问题标题】:Osmdroid map tiles doesnt showOsmdroid 地图图块不显示
【发布时间】:2014-10-20 11:50:25
【问题描述】:

我正在为我的 android 编写一个地图应用程序。

现在,启动 osmdroid,一切正常。问题是当我打开地图时,它显示了网格,但没有瓷砖。

我正在使用:

  • osmdroid-android-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
  • /sdcard/osmdroid/tiles/(3folders)

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

【问题讨论】:

    标签: android osmdroid


    【解决方案1】:

    很可能与this one 重复。

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

    【讨论】:

    • 我会看看那个。非常感谢!
    猜你喜欢
    • 2013-07-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-11-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多