我应该使用图形页面或MapFragment图形、页面、MapFragment

2023-09-04 10:01:53 作者:会发光的叫灯泡

我不知道我是否应该使用图形页面还是坚持使用 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.

 
精彩推荐
图片推荐