Migrating existing app to Google Maps API v2
Mon, 03 Dec 2012 19:16:12 -0800 Post Comments
I started migrating an Android project from the old Google Maps API to
v2. Or an attempt at that, rather.
A few issues with the brand new documentation aside*), there seems to
be a substantial mismatch in the architecture, and as a result, the
vast amount of API calls and classes are not available any more?
(Somebody correct me if I am wrong). After switching the Java imports
to com.google.android.gms.maps.*, I am missing MapActivity, GeoPoint,
RecticleDrawMode and Overlay. Sure there are more. Right now a
migration to v2 seems like a pretty hopeless undertaking for anything
but the most trivial projects. Or am I completely missing the boat
here?
*)
1. Eclipse: File -> Import -> Existing... does not work: As should be
the case for release, there are no Eclipse project files in the Google
Play Services SDK, so I used New -> Project -> Android Project from
Existing Code
2. Eclipse: Reference to google-play-services_lib as a library project
results in a red cross in the referencing project properties and class
references from the project source into com.google.android.gms do not
resolve. Workaround: Include google-play-services.jar as a JAR file
reference
3. A web search for "com.google.android.gms.maps" on Google finds a
link ( https://developers.google.com/commerce/wallet/sdk/android/
reference/com/google/android/gms/maps/package-summary) but no content
there
v2. Or an attempt at that, rather.
A few issues with the brand new documentation aside*), there seems to
be a substantial mismatch in the architecture, and as a result, the
vast amount of API calls and classes are not available any more?
(Somebody correct me if I am wrong). After switching the Java imports
to com.google.android.gms.maps.*, I am missing MapActivity, GeoPoint,
RecticleDrawMode and Overlay. Sure there are more. Right now a
migration to v2 seems like a pretty hopeless undertaking for anything
but the most trivial projects. Or am I completely missing the boat
here?
*)
1. Eclipse: File -> Import -> Existing... does not work: As should be
the case for release, there are no Eclipse project files in the Google
Play Services SDK, so I used New -> Project -> Android Project from
Existing Code
2. Eclipse: Reference to google-play-services_lib as a library project
results in a red cross in the referencing project properties and class
references from the project source into com.google.android.gms do not
resolve. Workaround: Include google-play-services.jar as a JAR file
reference
3. A web search for "com.google.android.gms.maps" on Google finds a
link ( https://developers.google.com/commerce/wallet/sdk/android/
reference/com/google/android/gms/maps/package-summary) but no content
there
