我应该使用图形页面或MapFragment [英] Should I use MapView or MapFragment

查看:99
本文介绍了我应该使用图形页面或MapFragment的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道我是否应该使用图形页面还是坚持使用 MapFragment 。我的应用程序是一个应用程序,找到最近的一套是最接近你的地方。我希望能够添加的位置,显示细节的标记,当我preSS一个标记,当用户沿着地图动作我希望能够得到地图的中心坐标,并显示最近的地点规定的范围内。我会处于劣势,如果我继续使用 MapFragments 或者我应该切换到图形页面,而我仍然有机会?

I am not sure whether I should be using MapView or stick to using a MapFragment. My application is an app that finds the nearest set of places that are closest to you. I want to be able to add locations, display details of a marker when I press a marker and when the user moves along the map I want to be able to get the coordinates of the center of the map and display the nearest locations within a defined radius. Would I be at a disadvantage if I continue to use MapFragments or should I switch over to MapView while I still have the chance?

推荐答案

首先,很快的MapView和谷歌地图API V1将停止支持,将不会收到任何新的更新。很快所有的支持,会自行消失。

First of all, soon the MapView and Google Maps API V1 will stop being supported and won't receive any new updates. And soon all the support will go away.

其次,MapFragment可能会有点不太灵活的权利,但在地图presented,操纵一个看起来好多了。我猜,它的功能将改善与时间。

Secondly, MapFragment may be a little bit less flexible right now, but the map presented, manipulated a looks much better. And I guess that it's functionality will improve with time.

所以,我肯定会继续使用MapFragments。

So I would definitely continue to use MapFragments.

更新: 正如@布赖恩怀特指出,在评论中,今天有一个图形页面谷歌API V2 ,你应该使用它时,你要嵌入在一个片段的地图。这样你就可以避免级联片段,当你不就得了。

UPDATE: As @Brian White pointed out in the comments, today there is a MapView in Google API V2, and you should use it when you want to embed a map in a fragment. That way you will avoid cascading fragments when you don't have to.

这篇关于我应该使用图形页面或MapFragment的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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