选择合适的计算策略,以实现Android的谷歌地图 [英] choosing right approch to implement google map in android

查看:136
本文介绍了选择合适的计算策略,以实现Android的谷歌地图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我打算创造的android其中具有以下特点的应用程序

I am planning to create an application in android which has following features


  • 显示源到目的地路线

  • 显示反向路由

  • 显示交通数据

  • 显示备用路由

  • 存储用户数据

除此之外,我想使用诸如图像按钮,文本框,对话框在地图上的一些Android原生的控制。

apart from that i want to use some android native controls such as image button , textbox , dialog over the map.

现在回顾这段链接后我很迷惑位在选择之中。

Now after reviewing this link i am bit confuse in choosing the approach among


  • 在浏览器谷歌地图API V3

  • 在在本机应用程序的嵌入式浏览器谷歌地图API V3

  • 自带谷歌地图API

任何人都可以请帮我在选择的右键办法?

Can anyone please help me out in choosing the right approach ?

推荐答案

那么,有没有简单的答案。每一个方法都有其优点和缺点。

Well, there's no simple answer to that. Every approach has its pros and cons.

现在让我说出一些见解,可以帮助你在你的决定(根据您希望地图为原生Android应用程序的一部分的想法,不只是一个HTML5应用程序 - 纠正我,如果我错了):

Now let me state few insights that might help you in your decision (based on the idea that you want the map as a part of a native android app, not just a html5 app - correct me if I'm wrong):


  1. 您需要存储用户数据。
    如果您想将数据存储在应用程序的话,我想你可以离开了第一个解决方案。这将是非常困难的(甚至不可能)为您妥善地图在浏览器中保持数据。为了维护数据的最佳方式是再直接从服务器上的网页和存储数据的服务器通信(所以你需要一个服务器后端)。您也可以从网页上的一些数据由自己的URL方案的注册意图过滤器传递给活动。
    你使用的方法2和3,在这里你可以使用Android code(如果你在网页视图中嵌入地图,你可以通过的绑定的JavaScript code到Android code )。

您想使用Android原生控制。
现在,你也可以离开了第一个解决方案,您使用的浏览器控件存在。在第二解决方案,可以同时使用(地图不必填满整个屏幕,您也可以将在web视图控件)。

You want to use android native controls. Now you can also leave out the 1st solution, you are using browser controls there. In the 2nd solution, you can use both (the map needn't fill the entire screen and you can also place controls over the webview).

谷歌地图API V3经常更新,目前比原生API舒服得多。原生API没有太多更新(不知道它是在所有更新)由于Android 1.6。

Google Maps API v3 is frequently updated and currently much more comfortable than native API. Native API wasn't much updated (not sure if it was updated at all) since Android 1.6.

这是这3点我就preFER在网页视图中嵌入谷歌地图API V3。当然,我可能会错过你的应用程序的一些重要功能。

From these 3 points I would prefer embedding Google Maps API V3 in a webview. Of course, I might have missed some important features of your app.

这篇关于选择合适的计算策略,以实现Android的谷歌地图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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