NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I am a newbie to osm map, i successfully created the map with multiple marker and info window. Now i want the map to run without internet connection on android device. Can someone please show me a step by step tutorial or a piece of code so that i grasp the knowledge of how to implement offline osm map. I searched on the net but there are little resources on osm map.

asked 10 Feb '13, 03:13

Sophia's gravatar image

Sophia
16112
accept rate: 0%

edited 10 Feb '13, 03:16


You can try looking at OsmAnd it is open source and has a public source code repo. Feel free to study the code and look at what it is doing / how it works. You might also want to look at their map creator app. I hope that helps.

Your question is a bit vague, do you have a vector map, or map tiles? Are you developing an android application or just want a solution for your self where you have an offline map?

permanent link

answered 10 Feb '13, 04:26

redsteakraw's gravatar image

redsteakraw
1.0k172437
accept rate: 22%

where can i find the source code ? I am using map tiles and i want an offline map for myself. when i open the map activity i want the map to be saved on my sd card so that when there is no connection, the stored map appear on the screen.

(10 Feb '13, 05:04) Sophia
1

I linked to the project page where you can get the source code. Use git to fetch the code. Try playing around with OsmAnd you can get a free version if you install the Fdroid(android app store with all open source / free software) marketplace. OsmAnd supports offline maps, so if you want to download your local town / city and be able to search and get directions / view the map while offline it is possible.

(10 Feb '13, 05:44) redsteakraw

I am not able to install git to fetch the code. Do you have another sample ?

(10 Feb '13, 06:29) Sophia
1

You can browse through the code online. Try installing the map maker and OsmAnd, It may just be the app you are looking for.

As a side note, I would recommend looking for a way to install git as it is popular with many of the open source / free software projects. It is a nice SCM and allows you to make commits while offline. It is also the main SCM of some of the largest open source projects. If you are into programming it is a nice tool to learn. Git is available for OSX, Linux and Windows.

(10 Feb '13, 07:35) redsteakraw

In general, you can have a look at the OSM wiki about Android

There are some apps that display OSM based maps offline -> search for "offline" there

And some of them are opensource ... sou it is up to you to inspect the sourcecode and find out how each one is working.

You also have to decide first whethet you want to display pre-rendered map tile graphics like the main site osm.org does ... or you want to render the OSM data as vector graphic in realtime, like Osmand, Mapsforge, ZANAvi, Navit or others do.

permanent link

answered 11 Feb '13, 12:01

stephan75's gravatar image

stephan75
12.6k556210
accept rate: 6%

edited 11 Feb '13, 12:01

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×710
×622
×181
×106
×38

question asked: 10 Feb '13, 03:13

question was seen: 11,860 times

last updated: 11 Feb '13, 12:01

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum