Application with maps for Android: General Strategy - android

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.

Related

Google Maps Offline Android Development

I just saw this link
https://googleblog.blogspot.com/2015/11/navigate-and-search-real-world-online.html
and was wondering if there is a way with using this downloaded map in my own mapping application.
Like if I go to Google Maps, download the area, and then in my own app upload that area and use it as offline use.
Has anyone been able to do this or is Google ever going to allow this?
Is it possible?
Yes,it is possible, there are different ways to do it, here you can find one:
* TileProvider using local tiles
The problem is that
Google do not allow it.
On their terms and permissions about google maps API (http://www.google.com/permissions/geoguidelines.html) on "Using maps on the web or in applications" they mention:
"When using the Google Maps API, certain restrictions may apply. Google continually updates the imagery within Maps; thus, caching may result in stale or even impermissible imagery. You may also not mass download or use bulk feeds of any Content, including but not limited to extracting numerical latitude or longitude coordinates, geocoding, text-based directions, imagery, visible map data, or Places data (including business listings) for use in other applications."
On the hand, there are other maps providers that allow this practice. Some of them:
-Open street map:
-OSMDroid
-ESRI/Arcgis (arcgis is based on ESRI's cloud services)
is Google ever going to allow this?
Google maps introduced last month (November 2015) the offline mode, does not only download the map, but also the different locations (images, tiles, etc) within. Even if downloading just the maps is possible since 2012, maybe the introduction of offline features can change their perspective over their offline assets terms, but until they do not change their permissions agreement, it is just speculation.

Application Development with Offline Maps

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).

3D maps library for android

Does anybody know any free of charge android maps library that has 3D capabilities?
I know for sure that google maps doesn't support 3d when using the sdk library.
The provider is not a problem. I'm not married with google maps, nor any other.
The following are apps that can be used as example of what i'm trying to accomplish.
Waze
https://play.google.com/store/apps/details?id=com.waze
Route 66
https://play.google.com/store/apps/details?id=com.route66.maps5
Example
I want to mention this solution:
http://www.eegeo.com
It is crossplatform service with 3D modelling, routes tracking, traffic visualizing and a lot of other cool stuff.
I guess this question becomes obsolete now that we have the Google Maps Api V2 is out in the wild. Thanks everyone for taking your time to answer it.
Here's a quick release changelog
The API is now distributed as part of the Google Play services SDK, which you can download with the Android SDK Manager. To learn how to install the package, see Installing the Maps API SDK.
Maps are now encapsulated in the MapFragment class, an extension of Android's Fragment class. Now you can add a map as a piece of a larger Activity. With a MapFragment object, you can show a map by itself on smaller screens, such as mobile phones, or as a part of a more complex UI on larger-screen devices, such as tablets.
Because maps are encapsulated in the MapFragment class, you can implement them by extending the Android standard Activity class, rather than extending the MapActivity used in version 1.
The Maps API now uses vector tiles. Their data representation is smaller, so maps appear in your apps faster, and use less bandwidth.
Caching is improved, so users will typically see a map without empty areas.
Maps are now 3D. By moving the user's viewpoint, you can show the map with perspective.
Here's the new API documentation
Here's the Android Developers blog spot announcing the new API
And here's a screenshot of one of the new API early adopters Trulia
If you are looking for a 3D globe visualisation, you can use Gesium. Here is Hello World example.
We do provide one: Nutiteq 3D Maps SDK. This is SDK, not an application.

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

Categories

Resources