user2533604
user2533604

Reputation: 665

How to integrate map2sqlite file in route-me

I went through this link regarding how to use offline maps in ios using openstreetmap data and route-me. I generated map2sqlite file and integrated it into route-me by following the link. But map is not loading the required region. Is there any example or tutorial regarding integrating map sqlite file into route-me. A tutorial or a working example regarding this will be more helpful.

When i runned my code on device, i got below logs.

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>

Upvotes: 0

Views: 148

Answers (1)

Dan J
Dan J

Reputation: 25673

Your logs seem to show that your database format/contents are incorrect:

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

Since there are no tiles in your database, there won't be anything to display.

I recommend that you take a look at the Mapbox SDK and their sample application.

Upvotes: 0

Related Questions