Offline maps

286 views
Skip to first unread message

stefaan....@gmail.com

unread,
Oct 7, 2009, 7:30:21 AM10/7/09
to route-me
Hi,

I know some guys that using route-me have accomplished that you can
download the maps, and thus use them offline after downloading.

Is there someone that would like to share some code of this?

Thanks

Frank Schröder

unread,
Oct 7, 2009, 11:15:56 AM10/7/09
to route-...@googlegroups.com
Hi Stefaan,

I've submitted a patch for offline maps and the map2sqlite tool. In
the patch section there are patches for 0.5 and the trunk.

http://groups.google.com/group/route-me-map/files

Here is the description on how to use the patch

http://groups.google.com/group/route-me-map/browse_thread/thread/4b13467dda581e75/9ff3815faa91ccc0#9ff3815faa91ccc0

and the description of the tool

http://groups.google.com/group/route-me-map/browse_thread/thread/934459dc136ffd28

Hope this helps.

Frank



2009/10/7 stefaan....@gmail.com <stefaan....@gmail.com>:
--
Frank Schröder

stefaan....@gmail.com

unread,
Oct 8, 2009, 3:25:58 AM10/8/09
to route-me
Thanks al lot!

On 7 okt, 17:15, Frank Schröder <frank.schroe...@gmail.com> wrote:
> Hi Stefaan,
>
> I've submitted a patch for offline maps and the map2sqlite tool. In
> the patch section there are patches for 0.5 and the trunk.
>
> http://groups.google.com/group/route-me-map/files
>
> Here is the description on how to use the patch
>
> http://groups.google.com/group/route-me-map/browse_thread/thread/4b13...
>
> and the description of the tool
>
> http://groups.google.com/group/route-me-map/browse_thread/thread/9344...
>
> Hope this helps.
>
> Frank
>
> 2009/10/7 stefaan.meers...@gmail.com <stefaan.meers...@gmail.com>:

stefaan....@gmail.com

unread,
Oct 8, 2009, 5:07:00 AM10/8/09
to route-me
I can't patching it right, this is the error i got:
patch -p0 -i route-me-0.5-db-tilesource-2009-06-28.patch
patching file MapView/Map/RMDBTileImage.h
patching file MapView/Map/RMDBTileImage.m
patching file MapView/Map/RMDBMapSource.h
patching file MapView/Map/RMDBMapSource.m
patching file MapView/Map/RMTileImage.h
Hunk #2 succeeded at 73 (offset -3 lines).
patching file MapView/Map/RMTileImage.m

Then when i compile i got:
".objc_class_name_RMDBTileImage", referenced from:
literal-pointer@__OBJC@__cls_refs@RMDBTileImage in libMapView.a
(RMTileImage.o)
ld: symbol(s) not found

What am i doing wrong? :) It's the latest version yes.

On 8 okt, 09:25, "stefaan.meers...@gmail.com"

Frank Schröder

unread,
Oct 17, 2009, 6:30:44 AM10/17/09
to route-...@googlegroups.com
Hi Stefan,

are you sure you are using the correct patch? There are 2 patches. One
for the stable 0.5 tree and another one for some older version of the
trunk.

Frank

2009/10/8 stefaan....@gmail.com <stefaan....@gmail.com>:
--
Frank Schröder

leandro

unread,
Oct 21, 2009, 12:18:17 PM10/21/09
to route-me
Hello, everybody!

I've installed routeme-0.5.tar.gz so I've applied the patch route-
me-0.5-db-tilesource-2009-06-28.patch. I have the following log:

$ patch -p0 -i route-me-0.5-db-tilesource-2009-06-28.patch.txt

patching file MapView/Map/RMDBTileImage.h
patching file MapView/Map/RMDBTileImage.m
patching file MapView/Map/RMDBMapSource.h
patching file MapView/Map/RMDBMapSource.m
patching file MapView/Map/RMTileImage.h
patching file MapView/Map/RMTileImage.m

But when I compile, I got the following:

Undefined symbols:
".objc_class_name_RMDBTileImage", referenced from:
literal-pointer@__OBJC@__cls_refs@RMDBTileImage in libMapView.a
(RMTileImage.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status

So I'm having the same issue as Stefan's. May be it's Xcode 3.2? I'm
really lost.

Besides, I'd like to know what to do with the file generated with
map2sqlite-1.0 (for example, "map.db"). Should I just include it to
the project or make a database some way? I really don't understand the
following paragraph in Frank's post (http://groups.google.com/group/
route-me-map/browse_thread/thread/
4b13467dda581e75/9ff3815faa91ccc0#9ff3815faa91ccc0):

"To get started you need to create an sqlite db with the two tables
(preferences and tiles) and store the tile images as blobs in the
tiles table and index them with the RMTileKey() function. Then add
the
minimun and maximum zoom level as well as the tile size to the
preference table and you're done. "

The routeme project is great. Hope I can make it work in my computer.
Thank you very much.

Leandro










On 17 oct, 08:30, Frank Schröder <frank.schroe...@gmail.com> wrote:
> Hi Stefan,
>
> are you sure you are using the correct patch? There are 2 patches. One
> for the stable 0.5 tree and another one for some older version of the
> trunk.
>
> Frank
>
> 2009/10/8 stefaan.meers...@gmail.com <stefaan.meers...@gmail.com>:

leandro

unread,
Oct 21, 2009, 4:20:21 PM10/21/09
to route-me
Hello, again!

I've solved the first issue: the error on the undefined symbol. The
patch adds four files but they aren't included automatically in the
project (at least in Xcode 3.2). So I added them manually (Project >
Add to Project) both in MapView and Unit Tests.
After that, I think I had to import the RMDBMapSource header in the
MapViewController.h file of the SimpleMap application (#import
"RMDBMapSource.h").

I could run the application but still didn't see the tiles. And that's
the second issue in my last post. It seems the application finds the
database in my .db file included in the project... but I can't see any
of the tiles.

Thanks,
Leandro

Yaniv

unread,
Oct 24, 2009, 11:08:38 AM10/24/09
to route-me
leandro, I was having difficulties showing the db-map as well.

What I did just for a proof of concept, is to add this line:

mapView.contents.mapCenter = [dbTilesource centerOfCoverage];

This will center the current view to your dbTilesource center. Also,
check that the current zoom that you're using exists in the database.

Make sure that the images that were inserted to the DATABASE were in
PNG format (real png, 24 or 8 bit, it doesn't matter).
Second of all, the tiles are in the format of: Zoom/X/Y --> you can
use this link: http://oms.wff.ch/calc.php?baseurl=cylce&lat=47.629000&long=7.262000&longto=7.906000&latto=47.354000
to convert from X/Y to lot/lon values.

By the way, I found this page to be very helpful:
http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames

Hope some of this will help.


I'm currently trying to understaing how to convert my own tiles to the
correct zoom/x/y values, so that my tiles will fit the WGS84 Lat/Lon
values exactly.

leandro

unread,
Oct 24, 2009, 9:13:43 PM10/24/09
to route-me
Thanks for answering, Yaniv!

Finally, I was able to see the map a couple of days ago. The tiles had
been loaded but I wasn't looking in the right place in the map. When I
realized, I fixed the position of the map and could see them. Thanks
for the solution, though. :)

Good luck with your tile conversion!!





On 24 oct, 13:08, Yaniv <yan...@gmail.com> wrote:
> leandro, I was having difficulties showing the db-map as well.
>
> What I did just for a proof of concept, is to add this line:
>
> mapView.contents.mapCenter = [dbTilesource centerOfCoverage];
>
> This will center the current view to your dbTilesource center. Also,
> check that the current zoom that you're using exists in the database.
>
> Make sure that the images that were inserted to the DATABASE were in
> PNG format (real png, 24 or 8 bit, it doesn't matter).
> Second of all, the tiles are in the format of: Zoom/X/Y --> you can
> use this link:http://oms.wff.ch/calc.php?baseurl=cylce&lat=47.629000&long=7.262000&...
Reply all
Reply to author
Forward
0 new messages