Application Development with Offline Maps - android

Is it possible to develop an application for Android and iOS that uses offline maps with routes and use GPS to navigate on them? (On foot and vehicle)
I found another answers but the question that is still in my head is, is it possible to user Google Maps or Apple Maps for this?
I also tried to search for a good 3rd party service that gives me what i want, but still nothing.
Regards,Elkas

You can't use Google Map for offline usage. It's against TOS (Terms Of Service)
(any caching or downloading of google maps is against Google Map TOS)
and is illegal.

You can use OpenStreetMaps(OSM) and a map serving service like Mapbox. OSM uses open mapping data that has been provided by users and other contributors and is free to use. With mapbox you can host your maps online but you can also store maps offline. With Mapbox Studio you can custom design your maps to create the kinds of visual hierarchy, affordances, and brand standards that your app needs.
Check out these links for more details:
http://mapbox.com and
http://openstreetmap.org
Also Mapbox uses a pretty straight forward API and lots of documentation. Implementation into IOS is also very easy and you can almost just copy/paste to Xcode (almost).

Related

How to get OpenStreetMaps or OpenTilesMaps API for personal android project?

So, I think StackOverflow is the best place for asking this question.
I have a personal project in my Academy, I want to make an android app that can use for tracking our track when we are on the mountain.
This app will run offline and use GPS because the mountain signal is mostly weak. So, how to get the API OSM or OpenTilesMaps? I hope u can give me the reference for that. It's very helping me
I've searched some option for Mapping there are Google Maps, OpenStreetMap, and OpenTilesMaps.
I don't want to use Google Maps API because it's not free now.
So i choose OpenStreetMap or OpenTilesMaps
For offline apps, try following web app to create OSM tile packages
https://apl.esri.com/jg/OSMVectorTileExport/index.html
or install QGIS and follow below link. https://www.qgistutorials.com/en/docs/downloading_osm_data.html

Application with maps for Android: General Strategy

Before developing an application I researched what solutions might apply while creating lightweight application with maps for Android.
Basic usage of app is while hiking and therefore below are requirements app must meet:
Must be using hardware resources as few as possible.
Must have ability to save map data for further offline usage for selected local area.
Must have ability to load custom data generated by 3dparity like kml files and custom markers.
Application basic flow is:
Some site community contributes custom markers and kml (or other layer data type) files for desired region.
Application combines some map provider map (like Google Maps, OpenStreetMaps) + Community data for desired region and gives offline usage ability to users. Where users can prepare map with internet connection before hiking and use it offline while hiking.
Strategy and primary problems to solve:
Choose lightweight map sdk.
Solve offline maps problem.
Choosing lightweight maps sdk and problems related to it:
While hiking people often use older versions of smartphones which drain less battery power because they come with older version of Android therefore apps for older versions of android use less computing power.
Common solution here is Google Maps SDK 2.0 which by itself is provided by Google Play SDK but Google Play SDK is getting heavier over time and it requires that user had installed almost later version of Google Play Services as I guess.
Pros of Google Maps SDK 2.0 is that it provides great codebase for further extension and also a great MapView component ready with all UI tweaks.
Cons of Google Maps SDK 2.0 is that it requires user to have Google Play Services installed which by itself drains phone charge. Also new MapView UI components might require more computing resources.
Solving offline maps problem:
As I researched it is possible to provide custom tiles stored anywhere on device in Google Maps SDK 2.0 using TileProvider interface which gives great controls over tiles. Main abstract method of it is:
public Tile (int width, int height, byte[] data).
Other SDKs:
MapBox android sdk comes closer to Google Maps SDK 2.0. It is promissing but is still beta and is opensource. Compared to other less known android map sdks MapBox has gentle documentation, nice tools, is almost lightweight and has community but comes with still bugs.
Also I tried an app by my opinion developed using Google Maps SDK 2.0 https://play.google.com/store/apps/details?id=com.vecturagames.android.app.gpxviewer
In my best guesses this app is using Google Maps SDK MapView to display maps from various sources like OpenStreetMap, MapBox and from almost every map provider available online including google.
Questions:
What are your best practices for developing lightweight apps for android with maps and offline tile base support?
Is it possible avoid Google Play Services dependency while using Google Maps SDK 2.0?
Are there any other opensource map sdks which are performance friendly? For example using OpenStreetMaps map base.

How to increase performance on google map for Android

I wonder if we can get the same behavior and performance in own Andorid app with Google map? If you are using SDK (native development) the performance is diff to what you can experience while using last Google map from Android market. Are there any tips on it? I really like this smooth maps display while scroll up\down and labeling of street names, etc.
No you cannot get same performance while displaying maps in your own application. There are a couple of reasons for it:
Firstly, the code that google uses is different and they are google if you know what I mean.
Your application uses google play services while google maps by google doesnot.
I wonder if we can get the same behavior and performance in own Andorid app with Google map?
Probably not. The Google Maps application does not use the same code base as does the Google Maps add-on for Android.
#Urban's point is very valid -- the more stuff you do in overlays, the slower things will be. An ItemizedOverlay with 100+ points, for example, will definitely be felt.
But if you create an app using the Google Maps add-on without any overlays, the experience you see there is as fast as you are going to get. Overlays of any sort will only make things slower.

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

Caching maps within an android app

I am looking to create an app where users can download a map to their phone before they go to a specific place (in case there is no 3G signal there) and then use GPS to take specific routes that will have been marked on the maps.
I have noticed GoogleMaps 5 has just been released that enables caching.
Is this something I would be able to use or can you not incorporate google maps 5 into another app.
I am very new to Android and am not quite sure what can and can't be done as yet so 'm sorry if
this is a really silly question?
Thanks for any help!
Bex
Is this something I would be able to use or can you not incorporate google maps 5 into another app.
Google Maps (the app) does not use the same Google Maps (the SDK add-on) that the rest of us use. Hence, right now, offline caching is not available to us.
You might consider looking at OpenStreetMap, which has some Android integration and supports offline maps.

Categories

Resources