How to start android to use Openstreet Map offline? - android

I can't find relevant answer in the internet.
I want to use Openstreet Map offline as getting the map inside the sdcard and develop for Android app.
I can't find step by step guide how to save into sdcard. Then develop offline map.
Many thanks.

Not sure if this is a good question, but I will try to answer:
As #scai says, there is the #osmdroid toolbox that adds a widget to display OSM map tiles. This rendered tiles can be cached or downloaded from the OSM servers (respect TUP) and shared offline.
There are also other solutions to realize it https://wiki.openstreetmap.org/wiki/Frameworks
But please keep in mind, that it's usually not that easy:
maps get outdated and you wan't to update them at client side
map servers are shared goods and high speed bulk download is a shame
quickly your users will request geocoding, routing and all the features of Google Maps
quickly you want tot display more complex information on top of your widget
So I encourage you to think about what needs to be done first (also for further versions) and then pick the right toolbox :)

Related

How to download specific region of google map in android

I am making an android application that will show google map on the screen. By clicking on a button user can download a the his/her specific region and store that in internal storage. Later when internet connection is poor or not available then user can use the offline map downloaded earlier. How to make this kind of app. Please guide me.. Thanks.
You should carefully read Google Maps APIs Terms of Service especially 10.5 (d) and 10.5 (e), because technically you can (temporary) download tiles for specific region from Google Maps server via series of URLs like http://mt1.google.com/vt/lyrs=m&x=95&y=55&z=7 and then create custom tile provider for Google Maps like in this answer of Alex Vasilkov. Also take a look at this answer of KENdi.

Storing Google Maps data for use offline with my Android application

I've created an Android application that uses Google Maps API v2.
Can someone tell me if it is possible to download and store map tiles and map data for different areas of the map to be used offline. The ideal usage for this would be to be able to download the whole of the UK, store it on an SD card and then have my app look on the SD for the relevant map data.
Thanks
The answer pointed by Agil is for the case where you have your own TileProvider (i.e. you own the data). If you have access to the tiles, then yes, that is the right solution for you.
If you were thinking of downloading Google Maps tiles, then no, the API currently doesn't provide a way to download tiles for offline usage; only the one rendered on screen are cached.
Please refer to this answer. According to that answer, it is possible with Google Maps Android API v2.

Partially download open street map in android

I'm creating an application to allow user to use both online and offline map, online map i use Google map API, offline i use open street map (as Google map cannot be downloaded or cached according to their policy), how do I download the map partially ?
For example, now i have one destiny with coordinates x, y, how do I download map area around this coordinate and save on my device for later use, and later how do i load it out ?
Currently I can only display and zoom in - out with map view.
I recommend mapsforge, you can do offline maps for Android and even for the Desktop. It requires a lot less bandwidth compared to tiles with high zoom levels. Downside is that you'll have to create one map per area on your own servers like I do for graphhopper.
Are you talking about a raster map consisting of tiles or a vector map? Downloading large amounts of tiles from the official OSM servers is against their tile usage policy because these servers run on funded resources. However you can render your own tiles, for example with TileMill and Maperitive.
If you instead want to use a vector map then just go to the OSM wiki and follow the Download link on the front page.
For really small areas, say some streets, you can use the regular API. For larger areas, say a city, you should try the Overpass API. And for anything larger the best is to use an area or country extract. Afterwards you can use tools like osmosis, pbftoosm and osmconvert to process the data further.
Note that you still need to render this raw map data to a vector map.
You should have a (deep) look at the wiki of openstreetmap.org and search the web for "tiles offline osm".
And there is a project called osmdroid. It has a widget with most of the features of the Google Maps Widget. There is a offline tiles provider which can leverage downloaded tiles (cached and zip-files created with special tools).
One of the biggest problems in this area is that most tiles-server do not allow to download big areas of tiles for offline usage. If you use a tool like Mobile Atlas Creator you will get blocked by the tiles server and only download pictures which tell you "you are blocked".
So if you want to provide really big areas for your app-users with higher zoom levels (>14), you have a problem. But if you just provide a map for a small city, you could try to use one of the open tiles servers (AFAIK MapQuest is one of those with more liberate download policy) or buy a certain amount of tiles from the commercial providers (see wiki, I don't want to advertise here).
It would be nice if there was some kind of peer-to-peer file sharing of current maps. Because the license of OSM (at least how I understood it) says, that it's possible to sell maps based on OSM data, but those maps can be shared and published in any way.
If anybody finds a solution for sharing maps (without much costs of AWS/provider/cloudfront/...) this would be interesting for many Android App programmers. The advantage of osmdroid is that all installed apps can reuse the same maps.

Is there a way to cache map locally

Am using Google Maps Android V2 in my application. It take too much time to load. do make use of markers to point some particular location. So I was wondering is there a way to cache map or to store a particular area.Is it possible in my app..??
EDIT
In default Maps app we can cache the on screen map. How do they do that..??
I would advise against such actions(caching the map somehow and displaying it) since it is forbidden by Google terms of use.
There isnt an offline version of Google maps for android(or i am not aware of it, since i couldnt find it when needed a year ago)...the solution is to go with different map api if you really require this.
Are you doing some extensive calculations for your map marker or database work, etc..?
For example i didnt experience slow loading times with google maps when using regular data service internet and loading around 350 map markers on predefined positions...
Please check out this answer, how to use google map in offline app. This is based on osmdroid and also be aware of Google terms of use googleMap.

open street maps api for android

Does anyone know where I can find the open street maps api for android?
I have searched the site and all I can see is other peoples implementations of it.
I'm looking for one which can be integrated into another app and fully customized.
You can integrate OSM by using the Osmdroid API. This gives you functionality very similar to Google maps but you can also use OSM tiles offline if you prepare the tiles with Mobile Atlas Creator (MOBAC)
See Osmdroid home page (GitHub)
You just need the osmdroid-android-3.0.5.jar in your build path. You don't need an API key like Google demands and tiles get cached, so next time you visit that location you save on data download costs/time.
It's got a few tiny bugs, but overall it's pretty good
If you are going for a commercial app them it's worth taking a look at "commercial grade Android SDKs" - all vendors allow you to customise your app (depending on the vendor, the degree of customisation may vary), and I believe all vendors have "free tiers" (payment plans where you actually don't have to pay :) ) that might be good enough for your app (or at least you don't have to pay until your app is commercially successful).
To name a couple Android SDK providers:
skobbler (now Telenav) has an SDK which is able to render maps & display turn by turn navigation on your Android phone. It also supports offline mode. Check out their developer platform for details
OsmSharp also does map rendering and turn by turn navigation. You can pull their code from github
MapQuest has a nice map & routing engine for Android. I think you could also use their routing service with Mapbox maps (see this as a starting point). I don't think they can do offline mode

Categories

Resources