Like Nokia's OVI maps can be used offline, there must be some way of caching Google map tiles too. Any hints?
问题:
回答1:
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.
回答2:
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.
回答3:
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
回答4:
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.
回答5:
You want to use a spatial index. It reduces the 2d complexity to a 1d complexity and is used in many mapping applications. You can download my php class hilbert curve at phpclasses.org. A lot easier is the z curve. Translate the x- and y coordinate into binary and then concatenate both value. The upper bound is the mostsignificant bits. Then use the quads for the folder structure on the disk for example: 1/ 2/ 3/ /4 is the path to tiles of the first level.
回答6:
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.
回答7:
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.