前两天做了一个对Android端'滴滴打车'的接口开发吧!
今天来做个简单的流程,
滴滴会提供这样一个接口,
http://webapp.diditaxi.com.cn/?
maptype=wgs&lat=39.98096907577634&lng=116.30000865410719&toname=得实⼤大厦
&toaddr=得实⼤大厦停⻋车场&phone=13000000116&channel=xxxx
参数的说明也会很详细.等会我会将详细文档图片形式贴上.其中四个参数是必须填写的
channel:int 这个参数,也就是渠道号需要你跟滴滴申请.
maptype: string 地图类型, 使用服务地图类型,wgs|baidu|soso,腾讯、 高德也传soso
lat:纬度 float
lng:经度 float
现在来讲讲Android端的开发流程.
新建项目,在manifest文件中添加
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
布局文件
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:id="@+id/wvDD"
今天来做个简单的流程,
滴滴会提供这样一个接口,
http://webapp.diditaxi.com.cn/?
maptype=wgs&lat=39.98096907577634&lng=116.30000865410719&toname=得实⼤大厦
&toaddr=得实⼤大厦停⻋车场&phone=13000000116&channel=xxxx
参数的说明也会很详细.等会我会将详细文档图片形式贴上.其中四个参数是必须填写的
channel:int 这个参数,也就是渠道号需要你跟滴滴申请.
maptype: string 地图类型, 使用服务地图类型,wgs|baidu|soso,腾讯、 高德也传soso
lat:纬度 float
lng:经度 float
现在来讲讲Android端的开发流程.
新建项目,在manifest文件中添加
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
布局文件
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:id="@+id/wvDD"