转换使用的地图API V1到地图Android的API V2 Android应用程序 [英] Convert Android App that uses maps API V1 to Maps Android API V2

查看:107
本文介绍了转换使用的地图API V1到地图Android的API V2 Android应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Android应用程序,使用旧的地图API,它现在去precated!

I have an android app that uses the old Maps API, it's now deprecated!

哪些步骤我应该采取使我的应用程序可与新的API。

What steps I should take to make my app works with the new API.

我使用的也是距离矩阵API和谷歌路线API。

I'm using also Distance Matrix API and Google Directions API.

我的code将工作呢?!

my code will work with it ?!

推荐答案

您可以看看这篇博客我写了关于如何创建使用地图应用程序:

You can take a look at this blog post I wrote on how to create a Map application using:

谷歌地图API V2指南

基本上你将不得不作出的改变是

Basically the changes you would have to make are

1 MapFragment 或<$ C $替换图形页面对象C> SupportMapFragment 对象(根据目标SDK 应用程序)

1. Replace the MapView object with a MapFragment or SupportMapFragment object (depending on the target SDK of your application)

2 在additin你将不得不repalce的 MapActivity 与正常活动(如果你使用 MapFragment 对象)或 FragmentActivity (如果你使用 SupportMapFragment )对象。

2. 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).

3。您将不得不更改清单文件,以新的,这是在指南中所述的权限。

3. You will have to change the permissions in the manifest file to new ones, that are described in the guide.

这篇关于转换使用的地图API V1到地图Android的API V2 Android应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆