Should I use MapView or MapFragment

前端 未结 2 609
失恋的感觉
失恋的感觉 2020-12-04 18:00

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

2条回答
  •  有刺的猬
    2020-12-04 18:14

    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.

    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.

    So I would definitely continue to use MapFragments.

    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.

提交回复
热议问题