0

我浏览了这个链接,了解如何使用 openstreetmap 数据和 route-me 在 ios 中使用离线地图。我生成了 map2sqlite 文件并通过链接将其集成到 route-me 中。但是地图没有加载所需的区域。是否有任何关于将 map sqlite 文件集成到 route-me 的示例或教程。关于此的教程或工作示例将更有帮助。

当我在设备上运行我的代码时,我得到了以下日志。

2014-09-15 13:08:09.659 SimpleMap[8658:60b] <MapViewAppDelegate: 0x14db9d10> init
2014-09-15 13:08:09.689 SimpleMap[8658:60b] <MapViewViewController: 0x14dbab30> viewDidLoad
2014-09-15 13:08:09.692 SimpleMap[8658:60b] logged method call: -[<RMMapContents: 0x14db9b00> initWithView:screenScale:] (line 96)
2014-09-15 13:08:09.713 SimpleMap[8658:60b] logged method call: -[<RMMapContents: 0x14db9b00> initWithView:tilesource:centerLatLon:zoomLevel:maxZoomLevel:minZoomLevel:backgroundImage:screenScale:] (line 143)
2014-09-15 13:08:09.719 SimpleMap[8658:60b] logged method call: -[MapView at 0,0-320,480 performInitialSetup] (line 70)
2014-09-15 13:08:09.726 SimpleMap[8658:60b] initializing memory cache <RMMemoryCache: 0x14dbf2f0> with capacity 32
2014-09-15 13:08:09.732 SimpleMap[8658:60b] Opening database at /var/mobile/Applications/8886B2C4-1C6A-4160-AE77-519C256A4FBB/Documents/MapOpenStreetMap.sqlite
2014-09-15 13:08:09.837 SimpleMap[8658:60b] Map contents initialised. view: MapView at 0,0-320,480 tileSource <RMCachedTileSource: 0x14dbeeb0> renderer <RMCoreAnimationRenderer: 0x14dc0420>
2014-09-15 13:08:09.850 SimpleMap[8658:60b] Center: Lat: -33.858771 Lon: 151.201596
2014-09-15 13:08:09.854 SimpleMap[8658:60b] Trying to Open db map source /var/mobile/Applications/8886B2C4-1C6A-4160-AE77-519C256A4FBB/SimpleMap.app/mymap.sqlite
2014-09-15 13:08:09.860 SimpleMap[8658:60b] Opening db map source mymap.sqlite
2014-09-15 13:08:09.870 SimpleMap[8658:60b] Tile size: -2147483648 pixel
2014-09-15 13:08:09.874 SimpleMap[8658:60b] Supported zoom range: 0 - -1042284544
2014-09-15 13:08:09.876 SimpleMap[8658:60b] Coverage area: (-2147483648.000000,-2147483648.000000) x (-2147483648.000000,-2147483648.000000)
2014-09-15 13:08:09.878 SimpleMap[8658:60b] Center: (-2147483648.000000,-2147483648.000000)
2014-09-15 13:08:09.880 SimpleMap[8658:60b] logged method call: -[<RMMapContents: 0x14dc5050> initWithView:tilesource:screenScale:] (line 119)
2014-09-15 13:08:09.882 SimpleMap[8658:60b] logged method call: -[<RMMapContents: 0x14dc5050> initWithView:tilesource:centerLatLon:zoomLevel:maxZoomLevel:minZoomLevel:backgroundImage:screenScale:] (line 143)
2014-09-15 13:08:09.885 SimpleMap[8658:60b] logged method call: -[<RMMapContents: 0x14db9b00> dealloc] (line 307)
2014-09-15 13:08:09.890 SimpleMap[8658:60b] logged method call: -[MapView at 0,0-320,480 performInitialSetup] (line 70)
2014-09-15 13:08:09.900 SimpleMap[8658:60b] initializing memory cache <RMMemoryCache: 0x14d78300> with capacity 32
2014-09-15 13:08:09.904 SimpleMap[8658:60b] Opening database at /var/mobile/Applications/8886B2C4-1C6A-4160-AE77-519C256A4FBB/Documents/Map(null).sqlite
2014-09-15 13:08:09.914 SimpleMap[8658:60b] fetching tile 0 (y:0, x:0)@0
2014-09-15 13:08:09.920 SimpleMap[8658:60b] DB error 1 on line 49: no such table: tiles
2014-09-15 13:08:09.923 SimpleMap[8658:60b] Map contents initialised. view: MapView at 0,0-320,480 tileSource <RMCachedTileSource: 0x14dc11b0> renderer <RMCoreAnimationRenderer: 0x14dc5c10>
4

1 回答 1

0

您的日志似乎显示您的数据库格式/内容不正确:

DB error 1 on line 49: no such table: tiles

由于您的数据库中没有图块,因此不会显示任何内容。

我建议您查看Mapbox SDK及其示例应用程序

于 2015-05-20T14:58:44.323 回答