开发者

Android Map View v/s Web View?

开发者 https://www.devze.com 2023-04-06 13:39 出处:网络
I am c开发者_开发技巧onfused between webview and mapview, which is better?? in terms of flexibility, overlays, usage, load-speed, zoom levels etc etcMapView is the native built-in class for doing Map

I am c开发者_开发技巧onfused between webview and mapview, which is better?? in terms of flexibility, overlays, usage, load-speed, zoom levels etc etc


MapView is the native built-in class for doing Map related stuff. WebView is a native element for the browser. It has a javascript to Java bridge, so you can call Java methods in your native Android application from the JavaScript page.

For my personal experience:

  • WebView is less flexible, kinda sluggish for UI interaction.
  • MapView has better optimizations and has richer content.
  • MapView has definitely better caching.
  • MapView loads faster (imo)
  • The MapView api's make life much easier. Zooming/handling etc is great.

Though if you are good at JavaScript and the V3 you should go for WebView. It all boils down to the feature set (WebView has a larger feature set, or so I've heard) that you want to use, your project duration (MapView is faster and easier to code for)


Those 2 classes are completely different.

The WebView class is there to show a webpage, the MapView class is there to intergrate Google Maps into your application. So depending on what you want to achieve you can pick one.

Since your tags say Google and Maps you should use the MapView, see also the Google Map View tutorial on the Android Developers site.

--
for future questions please provide some more information in your question.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号