针对新版谷歌地图app内置Uber服务打车更轻松和谷歌地图打车软件这两个问题,本篇文章进行了详细的解答,同时本文还将给你拓展android–如何使用谷歌地图api绘制虚线圆圈?、android–如何通
针对新版谷歌地图app内置Uber服务 打车更轻松和谷歌地图打车软件这两个问题,本篇文章进行了详细的解答,同时本文还将给你拓展android – 如何使用谷歌地图api绘制虚线圆圈?、android – 如何通过谷歌地图api的流量获取导航持续时间?、android – 找不到谷歌地图api v2类、android – 自定义信息窗口与谷歌地图api v2等相关知识,希望可以帮助到你。
本文目录一览:- 新版谷歌地图app内置Uber服务 打车更轻松(谷歌地图打车软件)
- android – 如何使用谷歌地图api绘制虚线圆圈?
- android – 如何通过谷歌地图api的流量获取导航持续时间?
- android – 找不到谷歌地图api v2类
- android – 自定义信息窗口与谷歌地图api v2
新版谷歌地图app内置Uber服务 打车更轻松(谷歌地图打车软件)
在最新版本的谷歌地图app中新增了一个Uber服务,可以使用Uber服务 轻轻松松打车,还能选择不同的网约车公司,下面我们就来看看详细介绍
1月13日消息,安卓和IOS平台的最新版谷歌地图app与Uber、Lyft等打车软件合作,在地图app里集成了打车功能,用户在使用谷歌地图的同时如果需要打车,只需要在地图app里就能完成所有的网上打车流程。
- 软件名称:
- 谷歌地图(Google Maps)安卓版(Android) v10.25.2 最新版
- 软件大小:
- 51.3MB
- 更新时间:
- 2019-09-20
新版的地图app界面能显示出叫车的选项,还能选择不同的网约车公司。实时动态显示网约车的位置,方便用户查看和安排自己的时间。与我国国内地图app提供的该功能类似,谷歌地图app里的打车功能也需要绑定打车软件的账号。
相关推荐:
网页版谷歌地图怎么获取经纬度?
谷歌地图高清街景怎么查看世界名胜?
android – 如何使用谷歌地图api绘制虚线圆圈?
如何使用谷歌地图api绘制虚线圆圈?我的意思是使用方法map.addCirlce()绘制默认圆形样式.
像这样:dotted circle
解决方法:
PLZ,使用官方谷歌文档
Circle
你需要中风模式
java.util.List<PatternItem> pattern = Arrays.<PatternItem>asList(new Dot());
map.addCircle(new CircleOptions()
.center(latLng)
.radius(radius)
.strokePattern(pattern)
android – 如何通过谷歌地图api的流量获取导航持续时间?
我想从google maps api获取带有http请求的导航持续时间:
https://maps.googleapis.com/maps/api/directions/json?origin=src&destination=destination
但我得到没有交通的持续时间.
我怎样才能获得流量的持续时间?
解决方法:
在Google Directions API中,它声明:
duration_in_traffic indicates the total duration of this leg, taking into account current traffic conditions. The duration in traffic will only be returned if all of the following are true:
1.The directions request includes a departure_time parameter set to a value within a few minutes of the current time.
2.The request includes a valid Google Maps API for Work client and signature parameter.
3.Traffic conditions are available for the requested route.
4.The directions request does not include stopover waypoints.
因此,您需要满足上述所有要求才能检索流量持续时间.
有关详细信息,您可以访问the Leg section的Google Directions api文档.
android – 找不到谷歌地图api v2类
这是logcat输出
05-16 08:53:34.327: E/dalvikvm(3422): Could not find class 'com.google.android.gms.maps.model.LatLng',referenced from method com.apptree.de_luxe.InfoActivity.<clinit> 05-16 08:53:34.327: W/dalvikvm(3422): VFY: unable to resolve new-instance 170 (Lcom/google/android/gms/maps/model/LatLng;) in Lcom/apptree/de_luxe/InfoActivity; 05-16 08:53:34.327: D/dalvikvm(3422): VFY: replacing opcode 0x22 at 0x0000 05-16 08:53:34.327: E/dalvikvm(3422): Could not find class 'com.google.android.gms.maps.model.MarkerOptions',referenced from method com.apptree.de_luxe.InfoActivity.setUpMap 05-16 08:53:34.327: W/dalvikvm(3422): VFY: unable to resolve new-instance 172 (Lcom/google/android/gms/maps/model/MarkerOptions;) in Lcom/apptree/de_luxe/InfoActivity; 05-16 08:53:34.327: D/dalvikvm(3422): VFY: replacing opcode 0x22 at 0x0002 05-16 08:53:34.347: E/dalvikvm(3422): Could not find class 'com.google.android.gms.maps.MapFragment',referenced from method com.apptree.de_luxe.InfoActivity.setUpMapIfNeeded 05-16 08:53:34.347: W/dalvikvm(3422): VFY: unable to resolve check-cast 169 (Lcom/google/android/gms/maps/MapFragment;) in Lcom/apptree/de_luxe/InfoActivity; 05-16 08:53:34.357: D/dalvikvm(3422): VFY: replacing opcode 0x1f at 0x000f 05-16 08:53:34.367: D/dalvikvm(3422): DexOpt: unable to opt direct call 0x029b at 0x0c in Lcom/apptree/de_luxe/InfoActivity;.<clinit> 05-16 08:53:34.367: D/dalvikvm(3422): DexOpt: unable to opt direct call 0x029c at 0x04 in Lcom/apptree/de_luxe/InfoActivity;.setUpMap 05-16 08:53:34.387: W/dalvikvm(3422): Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lcom/apptree/de_luxe/InfoActivity; 05-16 08:53:34.387: W/dalvikvm(3422): Class init Failed in newInstance call (Lcom/apptree/de_luxe/InfoActivity;) 05-16 08:53:34.387: D/AndroidRuntime(3422): Shutting down VM 05-16 08:53:34.398: W/dalvikvm(3422): threadid=1: thread exiting with uncaught exception (group=0x40a71930) 05-16 08:53:34.457: E/AndroidRuntime(3422): FATAL EXCEPTION: main 05-16 08:53:34.457: E/AndroidRuntime(3422): java.lang.ExceptionInInitializerError 05-16 08:53:34.457: E/AndroidRuntime(3422): at java.lang.class.newInstanceImpl(Native Method) 05-16 08:53:34.457: E/AndroidRuntime(3422): at java.lang.class.newInstance(Class.java:1319) 05-16 08:53:34.457: E/AndroidRuntime(3422): at android.app.Instrumentation.newActivity(Instrumentation.java:1054) 05-16 08:53:34.457: E/AndroidRuntime(3422): at android.app.ActivityThread.performlaunchActivity(ActivityThread.java:2097) 05-16 08:53:34.457: E/AndroidRuntime(3422): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230) 05-16 08:53:34.457: E/AndroidRuntime(3422): at android.app.ActivityThread.access$600(ActivityThread.java:141) 05-16 08:53:34.457: E/AndroidRuntime(3422): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234) 05-16 08:53:34.457: E/AndroidRuntime(3422): at android.os.Handler.dispatchMessage(Handler.java:99) 05-16 08:53:34.457: E/AndroidRuntime(3422): at android.os.Looper.loop(Looper.java:137) 05-16 08:53:34.457: E/AndroidRuntime(3422): at android.app.ActivityThread.main(ActivityThread.java:5041) 05-16 08:53:34.457: E/AndroidRuntime(3422): at java.lang.reflect.Method.invokeNative(Native Method) 05-16 08:53:34.457: E/AndroidRuntime(3422): at java.lang.reflect.Method.invoke(Method.java:511) 05-16 08:53:34.457: E/AndroidRuntime(3422): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 05-16 08:53:34.457: E/AndroidRuntime(3422): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) 05-16 08:53:34.457: E/AndroidRuntime(3422): at dalvik.system.NativeStart.main(Native Method) 05-16 08:53:34.457: E/AndroidRuntime(3422): Caused by: java.lang.NoClassDefFoundError: com.google.android.gms.maps.model.LatLng 05-16 08:53:34.457: E/AndroidRuntime(3422): at com.apptree.de_luxe.InfoActivity.<clinit>(InfoActivity.java:35) 05-16 08:53:34.457: E/AndroidRuntime(3422): ... 15 more
解决方法
“项目” – > “属性” – > “Java构建属性”
在“订购和导出”选项卡上,我在项目中选中了“Android私有库”.我也为它引用的库项目做了这个.这修复了升级到SDK 22后我的类未找到错误.
android – 自定义信息窗口与谷歌地图api v2
private GoogleMap mMap; mMap.setInfoWindowAdapter(new InfoWindowAdapter() { @Override public View getInfoWindow(Marker arg0) { return null; } @Override public View getInfoContents(Marker arg0) { View v = getLayoutInflater().inflate(R.layout.custom_infowindow,null); return v; } }); <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:background="#55000000" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="HELLO" android:textColor="#FF0000"/> </LinearLayout>
但这只会改变内容而不是infoWindow本身.它仍然保持白色,底部有一个小阴影,现在黑色bg可以看到一个红色的HELLO文本.我想将这个默认的infoWindow改成一个透明的黑色矩形.我该怎么做?
解决方法
例如
@Override public View getInfoWindow(Marker marker) { // Getting view from the layout file View v = inflater.inflate(R.layout.map_popup,null); TextView title = (TextView) v.findViewById(R.id.title); title.setText(marker.getTitle()); TextView address = (TextView) v.findViewById(R.id.distance); address.setText(marker.getSnippet()); return v; } @Override public View getInfoContents(Marker arg0) { // Todo Auto-generated method stub return null; }
关于新版谷歌地图app内置Uber服务 打车更轻松和谷歌地图打车软件的问题就给大家分享到这里,感谢你花时间阅读本站内容,更多关于android – 如何使用谷歌地图api绘制虚线圆圈?、android – 如何通过谷歌地图api的流量获取导航持续时间?、android – 找不到谷歌地图api v2类、android – 自定义信息窗口与谷歌地图api v2等相关知识的信息别忘了在本站进行查找喔。
本文标签: