Skip to content Skip to sidebar Skip to footer

Choosing Right Approch To Implement Google Map In Android

I am planning to create an application in android which has following features Show Source to Destination Route Show Reverse Route Show Traffic Data Show alternate Route

Solution 1:

Well, there's no simple answer to that. Every approach has its pros and cons.

Now let me state few insights that might help you in your decision (based on the idea that you want the map as a part of a native android app, not just a html5 app - correct me if I'm wrong):

  1. You need to store user data. If you want to store the data in the app, then I guess you can leave out the first solution. It would be very difficult (or even impossible) for you to properly maintain your data with map in a browser. The best way to maintain data is then to directly communicate with a server from the webpage and store data on the server (so you need a server backend). You can also pass some data from the webpage to an activity by registering an intent filter for your own url schema. You don't have such problems using approach 2 and 3, where you can use android code (if you are embedding the map in a webview you can access android code by binding javascript code to android code).

  2. You want to use android native controls. Now you can also leave out the 1st solution, you are using browser controls there. In the 2nd solution, you can use both (the map needn't fill the entire screen and you can also place controls over the webview).

  3. Google Maps API v3 is frequently updated and currently much more comfortable than native API. Native API wasn't much updated (not sure if it was updated at all) since Android 1.6.

From these 3 points I would prefer embedding Google Maps API V3 in a webview. Of course, I might have missed some important features of your app.

Post a Comment for "Choosing Right Approch To Implement Google Map In Android"