views:

1463

answers:

4

For an application I am working on, I need to display custom raster image tiles (not vector based, probably from satellite imagery), and I need to do so offline. I would like to use the MapView, but I cannot see a way to tell it to use custom, offline map tiles instead of pulling down data from google's servers.

I've seen a few alternatives, but none seem appropriate to my need

MapDroyd Seems to only support vector-based maps. mapdroyd.com/

OSMDroid Appears to use Open Street Maps; I don't see any documentation anywhere stating that you can use custom map tiles. code.google.com/p/osmdroid/

There was a third alternative, but my post got eaten and I can't find it in my history.

Am I going to have to bite the bullet and 'roll my own'?

+1  A: 

Am I going to have to bite the bullet and 'roll my own'?

Ummm, how do you like the taste of lead? ;-)

Seriously, Google Maps is closed source, and I know of no API to change up the map tiles. I'd be shocked if there is one.

What you might do is try to team up with OSMDroid to make a more generic MapDroid that has pluggable tile sources.

The only other mapping solution I know of for Android, besides the ones you list, is the one from Ericsson Labs, and that is both closed-source and vector, which probably makes it useless for you.

CommonsWare
+1  A: 

I believe that OpenLayers has the functionality you require, but I don't know whether it runs under Android.

In particular, see this OpenLayers wiki page about how to use your own custom tiles.

Mike Williams
+1 - Why was this answer downvoted? It's a great suggestion.
Chris B
Interesting... Someone is definitely using it on Android (http://www.anddev.org/openlayers_map-t1224.html), but I'll have to do more investigation.Googling led me to this related stackoverflow answer, http://stackoverflow.com/questions/895653/java-equivalent-of-openlayers which might have some potential too...
I82Much
+1  A: 

For custom mobile mapping solutions You could take a look at maps lib from Nutiteq

JaanusSiim
+1  A: 

We ended up going with Open Street Maps and customizing source to meet our needs. Unfortunately couldn't easily switch the source of tiles, so we were stuck with the vector based ones. Ended up writing some code to ensure that cached tiles persist on app shut down, so we could access them without connection.

I82Much