OpenStreetMap Forum

The Free Wiki World Map

You are not logged in.

#1 2011-02-25 03:33:13

how to display osm data on android

Hi:

I am trying to use open street map in my android application. For the initial testing, I just want to display a map and put an object on the map. I want to do it in offline mode( no internet connection). Is there a way to save the map of a city to my android phone and display the map in my app? I know it is all osm data. How to display map from osm data in android?

Thanks

Offline

#2 2011-02-25 11:36:15

Re: how to display osm data on android

You are developing your own application?

What do you consider to be an "osm map" ?. Do you mean tiles like http://tile.openstreetmap.org/mapnik/10/663/314.png ? If so then you have to download all the tiles of a city on your phone first. And do you want to zoom ? Then you have to download all tiles from different zoomlevels too.

How to display map from osm data in android?

That looks a pretty technical question to me. Such a tile is just a .png image. So you are asking how to show images (next to each other) in an android app ? Then this is not the right forum.

Offline

#3 2011-02-25 13:27:15

Tordanik
Super Senior Member
From: Germany
Registered: 2008-06-17
Posts: 1,773
Website

Re: how to display osm data on android

foxele wrote:

I am trying to use open street map in my android application. For the initial testing, I just want to display a map and put an object on the map. I want to do it in offline mode( no internet connection). Is there a way to save the map of a city to my android phone and display the map in my app? I know it is all osm data. How to display map from osm data in android?

I'm also not quite sure what you want to do. Do you intend to use pre-rendered images (tiles) or do you want to store raw data on the phone and render it "live"?

If you are looking for an example of the former, have a look at Maps (-) - it downloads tiles and displays them as a map, and can also store them for offline use. I think (but don't know for sure) that OsmAnd can do both tile display and live rendering from raw data. Navit does live rendering using data first converted into its own file format, but I don't know how much of the code for the Android port is actually written in Java.

These are all OpenSource, so you should be able to figure out how they work internally. There's also a List of OSM-related Android software if that helps you.

Offline

Board footer

Powered by FluxBB 1.4.8
Hosting sponsored by Oxilion