Google Maps WebView vs MapView (GMWM)

Hello guys, still with Mr. Root, there is another case. When I implemented  the Google Maps Javascript API boilerplate  in the Android project, it turned out that the user experience (UX) that I felt was very bad, the content was very slow to load, and I couldn't zoom in and zoom out using finger gestures. Here my question arises,

"What are the advantages and disadvantages of using Google Maps Javascript API in WebView and MapView?"

It seems that developing a map application in Android MapView seems more traditional. But I feel the opposite, it also sounds very interesting. Since I developed the web before, I feel more familiar with controlling Google Map API by JavaScript, thanks to Android's powerful feature about  JavaScript interacting with Action . The only reason why I still hesitate is the performance.

When considering cross-platform development, JavaScript has another advantage in this regard. I can modify my app to suit other platforms easily, and there are even open source projects like  PhoneGap  to help me do this.

Has anyone done this before, maybe can suggest what I should do, I don't know if the javascript API key works on localhost.

Observation Result Opinion

I have tried both, google map is displayed on the web as it should (according to its documentation). It runs normally when the web page is opened on iPhone and Android devices. But it is very different when I develop it on android webview, it is really annoying, the performance is very bad, the UX is terrible.

A simple tip to do this test is please try opening google map in the browser and google map in the android application, the difference is very clear in terms of performance, nge-lack! It feels heavy when loading the map page, different from the application version (I think maybe this is because some main documents have been downloaded locally android, built-in with the google map application). Worse still in WebView is the zoom-in zoom-out gesture with fingers does not work, so it can only be done with fingers.

In my opinion, this is the main issue to consider if you are developing an android application. I highly recommend that if you are using the native map component in android studio, do not use WebView to display the map.

In short, back to you, if you don't have much time and want your application to work for both Android and iPhone, then use WebView, maybe the implementation of the native map component in Android Studio can be included in the development agenda for the next version.

But if performance is important and you have time to develop it, then use android studio native map component.


Post a Comment

Previous Next

نموذج الاتصال