问题
In my app, I am using Google Map API V1 and it is in Google play; so is it mandatory to upgrade to V2 or I can go ahead with this for future? Regularly we are upgrading the app?
If I upgrade the Map API to V2, then do I need to change the app signing key?
Please help.
回答1:
The sad answer is that most of the objects of Google Map API V1 are replaced with new Objects in Google Map API V2.
For example instead of using GeoPoints you are going to use Latlng points. Overlays are gone as well and replaced with Polylines and Polygones.
Take a look at this answer I gave here:
Convert Android App that uses maps API V1 to Maps Android API V2
And have a look at this blog post I wrote that will get you started with Google Map API V2 implementation in your app: Google Map API V2
So as you can understand most of the code should be rewritten to fit Google Map API V2.
Basically the changes you would have to make are
Replace the MapView object with a MapFragment or SupportMapFragment object (depending on the target SDK of your application)
In additin you will have to repalce the MapActivity with a normal Activity (if you use the MapFragment object) or the FragmentActivity (if you use the SupportMapFragment object).
You will have to change the permissions in the manifest file to new ones, that are described in the guide.
Yes of course you need to change the API key also....
回答2:
No, your app will continue to work with V1 (for now).
You cannot get a new V1 license (old news, right, not since early 2013), but your current license is still valid.
At some point in the future, Google will likely decide to cut access to V1 - that is why they deprecated it, and that is why they have given us all plenty of warning.
Basically, we all "should" have started working with V2 in our new apps months ago, and by the time they choose to shut down V1, we "should" all be in a position to upgrade our old apps.
("should" i.e. in theory.... in practice, well, maybe not all of us are with V2 yet)
来源:https://stackoverflow.com/questions/20258307/is-it-mandatory-to-change-the-google-map-api-v1-to-v2