views:

189

answers:

3

I need to use a different datasource inside a map in Android than the google provided data. Is there a way to change the datasource to a tile based service (openstreetmap.org for example)?

Or are there other Android map APIs which are OpenSource and can be adapted (except Ericcson Mobile Maps - this doesn't work for me because of the licence)? It doesent have to have a server side part - a rich function library would be enough.

A: 

While the Android OS is toted as an open operating system, unfortunately the core of the OS is still closed - this includes the modules like Google Maps. While I guess it could be possible by using your HOSTS file to rewrite where Google Maps queries for its data, you would still have to reverse engineer how the application retrieves the data, and then you would have to output your own data in place. Really, I think that sounds pretty messy, and not the most ideal hack.

If there is a way to do this, I'm not aware of it on the Android. If I recall correctly this was possible on the iPhone by manipulating the cached map tiles, but retrieving map tiles from another source, not possible as far as I know.

Seidr
"unfortunately the core of the OS is still closed - this includes the modules like Google Maps". No, the core of the OS is open. Google Maps is an application and SDK add-on that is closed.
CommonsWare
My bad, I was unaware of that.
Seidr
Most of the rest of what you wrote is correct -- I just wanted to comment on the "core of the OS is still closed" portion.
CommonsWare
+1  A: 

Use OpenStreetMaps, like you suggest. There are 18 applications that integrate with OpenStreetMaps already.

CommonsWare
+1  A: 

osmdroid now can be used as a library to provide similar functionality to Google Maps, but using OpenStreetMap data instead. http://code.google.com/p/osmdroid/

Anders Petersson