Gagan Singh
Gagan Singh

Reputation: 1

Google Maps API v1 to v2 using MapView

I have an application using Google Maps API v1. I need to make changes but I dont know what to change in Google Maps API v2 to continue using the Map View from v1.

I added the meta-data with the api key as a child of application. And I removed it from the Map View <com.google.android.maps.MapView

Its too difficult to use Map Fragment and change everything because there's too much code using Map View.

I found this link but it doesnt seem to help much.

https://developers.google.com/maps/documentation/android/reference/com/google/android/gms/maps/MapView

Upvotes: 0

Views: 2003

Answers (2)

CommonsWare
CommonsWare

Reputation: 1006799

I dont know what to change in Google Maps API v2 to continue using the Map View from v1.

You cannot use the MapView from Maps V1. Maps V2 has different classes for this, and while it does have its own widget named MapView, the API is different.

Its too difficult to use Map Fragment and change everything because there's too much code using Map View.

You do not have a choice.

Upvotes: 2

Thibault D.
Thibault D.

Reputation: 10005

I found this link but it doesnt seem to help much.

That's mainly because the equivalent of MapView (in terms of getting access to the Maps API) is the GoogleMap object you can get from the MapFragment.getMap().

Here is the GoogleMap class reference

Upvotes: 0

Related Questions