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.
Related
I'm making an Android app that needs to use maps, even if the user is offline. I know that google maps can't be stored for so I tried with Mobile Atlas Creator to genereate tiles and include them whithin the app, but the providers are very limited, they didn't have data for my country.
So my question is what is the best aproach for this type of situations.
You can use an OpenStreetMaps controller (like osmdroid) and Google Maps tiles. According to the Google Maps TOS (10.1.3.b), it seems that you can use a portion of maps if you cache it temporarily and securely
I am currently developing an Android app which will show online maps relating to point of interests nearby the current location of end-users. I am using osmdroid, osmdroidbonuspack and MAPNIK as tile provider.
My main concern is the tiles providers' usage policy as I would like to avoid the "forbidden" responses when users start using the app. I don't expect to have too many users but just in case.
Checking the OSM (MAPNIK) usage policy, it says that it is not allow to use the maps in an app that is distributed without prior permission. I asked for that permission but in case I did not get it, I was thinking to use MAPQUEST maps so I registered in mapquest website to get a private key to be used in the app. The problem is that I don't see any way to add the MAPQUEST KEY when using osmdroid.
Summarising I have two questions:
What is the best tile provider in terms of usage policy to publish an android app?
In case to select MAPQUEST, how can I add a private key? Why does it not required to add a MAPQUEST key when using MAPQUESTOSM? Is completely open free?
Thank you very much,
Regards,
Since you're talking about OSM, I assume you are referring to MapQuest Open (OSM-based), not standard MapQuest (proprietary data).
MapQuest Open doesn't require a dev key for tile download. You just specify the base URL for MapQuest and you're ready to go. Details can be found on the OSM Wiki.
MapQuest has asked to be notified by devs who intend to deploy anything that might request larger volumes of tiles. For an app, this obviously depends on the user base. Back when I built MapQuest tile support into my own app, I notified them and asked if they needed anything else for me, and I was simply told to go ahead – no further steps required.
The tile usage policy wiki page already lists several alternative OSM tile providers. The best one depends on your specific requirements.
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.
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.
Like Nokia's OVI maps can be used offline, there must be some way of caching Google map tiles too. Any hints?
If you are trying to cache the tiles that Google serves, that may be a violation of Google's Terms of Service (unless, under certain circumstances, if you've purchased their enterprise Maps API Premier). That's why gmapcatcher has it crossed off their list. See http://code.google.com/p/gmapcatcher/issues/detail?id=210.
At the gmapcatcher URL above, you will also find a shell script that can download tiles (or so its author says).
There are also other projects that try to make Google Maps available offline:
http://code.google.com/p/ogmaps/
http://code.google.com/p/gmapoffline/
Lastly, if Google Earth can meet your needs, then you can use that. Offline usage of Google Earth requires a Google Earth Enterprise license according to http://www.google.com/permissions/geoguidelines.html.
Note that the preceding page also says: "You may not scrape or otherwise export Content from Google Maps or Earth or save it for offline use." So if you try to cache tiles, that will almost certainly be considered (by Google, anyway) a violation of the Terms of Service.
Unfortunately, I found this link which appears to indicate that we cannot cache these locally, therefore making this question moot.
http://support.google.com/enterprise/doc/gme/terms/maps_purchase_agreement.html
4.4 Cache Restrictions. Customer may not pre-fetch, retrieve, cache, index, or store any Content, or portion of the Services with the exception being Customer may store limited amounts of Content solely to improve the performance of the Customer Implementation due to network latency, and only if Customer does so temporarily, securely, and in a manner that (a) does not permit use of the Content outside of the Services; (b) is session-based only (once the browser is closed, any additional storage is prohibited); (c) does not manipulate or aggregate any Content or portion of the Services; (d) does not prevent Google from accurately tracking Page Views; and (e) does not modify or adjust attribution in any way.
So it appears we cannot use Google map tiles offline, legally.
update:
I found the terms of use from Google Map:
Section 10.5
No caching or storage. You will not pre-fetch, cache, index, or store
any Content to be used outside the Service, except that you may store
limited amounts of Content solely for the purpose of improving the
performance of your Maps API Implementation due to network latency
(and not for the purpose of preventing Google from accurately tracking
usage), and only if such storage: is temporary (and in no event more
than 30 calendar days); is secure; does not manipulate or aggregate
any part of the Content or Service; and does not modify attribution in
any way.
It means we can cache for limited time actually
On http://www.google.com/earth/media/licensing.html there is a "Mobile" section containing :
Similar to our online terms, if you use our APIs or a mobile device’s native Google Maps implementation (such as on an Android-powered phone or iPhone), no special permission is required, but you must always keep the Google name visible. Offline caching of our content is never allowed.
You can use Open Street Map : you will find dozens of different layers and map types, and this is absolutely free. You can download all the map tiles you want. And of course, as anyone can enhance the map, it displays more information than Google's maps.
If you need help, you can ask the community which is also very active.
On Android platforms, Oruxmaps (http://www.oruxmaps.com) does a great job at caching all WMS sources. It is available in the play store.
I use it daily in remote areas without any connectivity, works like a charm.