Use my own map tiles

375 views
Skip to first unread message

Microspino

unread,
Jul 9, 2009, 4:26:34 PM7/9/09
to route-me
Hello,
Is It possible to use route-me with my own tiles?
I'm building a single-city monument guide with maps and I have a nice
set of them that I want to pan zoom and pin annotate. My Idea is to
follow the advice from sharpmind.de people i saw here (offline maps
data source) about using sqlite3 with my own set of tiles.
Can I do this? Can someone help me?

Frank Schröder

unread,
Jul 10, 2009, 1:49:44 AM7/10/09
to route-...@googlegroups.com
Hi Microspino,

yes that is possible and it is what we did for our app. What kind of
help do you need?

Frank
--
Frank Schröder
frank.s...@gmail.com

Microspino

unread,
Jul 12, 2009, 11:18:19 AM7/12/09
to route-me
Hi Frank,
I've read http://www.mobilegeographics.com/dev/routeme/ trying to
figure out how to do this task.
Since I'm an Objective-C newbie I need some guide/example altough I
can't go easily through the route-me code.

I lost the way here:
"Guide at http://code.google.com/p/route-me/wiki/EmbeddingGuide are
out of date as of April 20, 2009. To create a static version of Route-
Me, follow these instructions instead:
http://code.google.com/p/route-me/source/browse/trunk/MapView/README-library-build.rtf"

because the first link is not up to date and the second is
unreachable.

I understood that I can put my tiles on sqlite as BLOBs but I don't
know how to do It and how to take
them from there using Route-me.

There's also this:
"If you have your own data you'd like to use with Route-Me, serving it
through your own Mapnik installation looks like the best bet. Mapnik
is an open source web-based map delivery platform. For more
information on Mapnik, see http://www.mapnik.org/ ."

Just to clarify I don't want to serve my tiles from a map server,
since my iPhone application would be a "pretty always off-line" one.

This is the kind of help I need.
Many many Thanks.

Daniele
> frank.schroe...@gmail.com

Frank Schröder

unread,
Jul 13, 2009, 9:27:34 AM7/13/09
to route-...@googlegroups.com
Hi Daniele,

the simplest way of getting the RMDBTileSource to work is to use the
"SimpleMap" application which is in the route-me examples and get that
to work first. Once it runs on your iPhone/iPod you can create an
sqlite database with the map2sqlite tool which I've just sent around
and change the viewDidLoad method so that it uses that database.
Assuming that your database is called "mymap.db" you would change the
tile source init code as follows:

- (void)viewDidLoad {
[super viewDidLoad];

...

RMDBMapSource* dbTilesource = [[[RMDBMapSource alloc]
initWithPath:@"mymap.db"] autorelease];
[[[RMMapContents alloc] initWithView:mapView
tilesource:dbTilesource] autorelease];

...

}

The RMDBTileSource assumes that you already have your map tiles
available. Mapnik is - as far as I know - a renderer for OpenStreetMap
tiles. That means that it creates the PNG files that you can display
and it uses the OpenStreetMap map data for that. So you don't need to
do that unless you create your own map tiles.

See if you can get the SimpleMap application to work and take it from
there.

Let me know if that helps you.

Cheers
Frank
--
Frank Schröder
frank.s...@gmail.com

Microspino

unread,
Jul 16, 2009, 1:37:18 AM7/16/09
to route-me
Hello and thanks a lot for the nice and fast response.
I have the Simple Map working on my Simulator and now
I'm going to try to insert my own maps via the method you said.

There still something I'd like to ask.

- What features do the tiles need to have?
- How can I set base lat-long coordinates for every tile?
I.e.:I have just one city with 52 tiles coming from a big tiff.
How I have to prepare them before to fire map2sqlite ?

By the way, when I saw the cloudmade map working
on my simulator I told myself you're great!
Please be patient with all those questions I pose. :)

Daniele
> > I've readhttp://www.mobilegeographics.com/dev/routeme/trying to
> > figure out how to do this task.
> > Since I'm an Objective-C newbie I need some guide/example altough I
> > can't  go easily through the route-me code.
>
> > I lost the way here:
> > "Guide athttp://code.google.com/p/route-me/wiki/EmbeddingGuideare
> > out of date as of April 20, 2009. To create a static version of Route-
> > Me, follow these instructions instead:
> >http://code.google.com/p/route-me/source/browse/trunk/MapView/README-...
> frank.schroe...@gmail.com

Thomas Winkler

unread,
Jul 16, 2009, 11:09:02 AM7/16/09
to route-...@googlegroups.com

On Jul 16, 2009, at 7:37 AM, Microspino wrote:

> - How can I set base lat-long coordinates for every tile?
> I.e.:I have just one city with 52 tiles coming from a big tiff.

That's a very good question. I actually have the same problem: I have
tiles for a specific area (including various zoomlevels) and I want to
use Route-Me to allow panning/zooming in this area (not the whole
world) and be able to place markers on the correct lat/lon position.
So far, I didn't come up with a good solution yet. Currently, I just
display OpenStreetMap tiles like in the SimpleMap example but I have
modified RMOpenStreetMapsSource.m so that it uses my custom tiles if
the currently visible area is covered by my custom tiles (otherwise
it just uses the tiles from OSM). However, it's not a good solution
since the scale of the OSM tiles and my custom tiles doesn't match
100%. Therefore markers that are placed using lat/lon are slightly on
the wrong position. Zooming etc. works fine though.
Ideally, I just want to display the area which is covered by my custom
tiles. This probably requires some adjustments on the projection
parameters and other tweaks. I played around with those but couldn't
figure out how to calibrate my tiles to the right lat/lon.
If anyone's got some hints, please let us know.

Thomas

Benjamin Schramm

unread,
May 20, 2013, 4:00:30 PM5/20/13
to route-...@googlegroups.com, d.sp...@gmail.com
Microspino,
I know this is an old thread, but I am trying to do this as well : Create Custom "Off-Line" Map with Route-Me.

Were you successful? 
If so, any tips, hits, or tricks would be helpful, or just point me in the best direction that you found.  I would be eternally grateful!  

Thankyou!!

Benjamin

Randall Carver

unread,
May 20, 2013, 8:08:19 PM5/20/13
to route-...@googlegroups.com, d.sp...@gmail.com
I generate map tiles with mapnik, OSM, NHD and NED data and then convert them to mbtiles format using osm2mbtiles and use them via  

RMMBTilesSource.   I'm running a customized version of mapbox/mapbox-ios-sdk which is a branch of the Alpstein/route-me code.   But I've run it with the route-me/route-me branch in the past.

Reply all
Reply to author
Forward
0 new messages