EventBus is a library of Greenbot . This is very simple for all users how to implement and its basic use. Here I will also share examples for better understanding. What is EventBus? EventBus is subscribed/publish event bus to communication between components with limited lines of code, in short, its bus for events transfers the data between one activity(class) to another to reflect the changes based on our needs. That makes the data exchange between components like Activity, Fragment, Services, and any kind of backgrounds threads pretty easy. EventBus can handle the threading for us: events can be posted in threads different from the posting thread. Common use can be dealing with UI changes. In Android, UI changes must be done in the Main(UI) thread. In other words, networking or more time-consuming task cannot be handled in the Main thread, for that we must use AsyncTask or Handler to make it more smooth. Now we have one more options use EventBus to change the UI po...
I was looking for a way to get the route between 2 points and displayed in the Google Map using Google Maps API v2. After around many sites to get an actual idea of how to implement the Map Route in Android using Google Map API v2.
First I will give you a small & simple description of the Map and Route.
- Route is just Poly-lines which is connected with each other.
- Google API gives routes between two locations.
- Also give Distance, Total Duration, etc.
- Just we want to give two coordinates between two locations (cities, states, etc.)
Here I would like to share Google Map API v2 which displays Route between two locations.
Please look below the Route between the two location images
If you are satisfied with this post then please give your comments.
First I will give you a small & simple description of the Map and Route.
- Route is just Poly-lines which is connected with each other.
- Google API gives routes between two locations.
- Also give Distance, Total Duration, etc.
- Just we want to give two coordinates between two locations (cities, states, etc.)
Here I would like to share Google Map API v2 which displays Route between two locations.
Please look below the Route between the two location images
You can download full source code from here.
AndroidMapV2Route Example
AndroidMapV2Route.apk
If you are satisfied with this post then please give your comments.
Thanks for your interest!!!
Hi Prashant,
ReplyDeleteOnce again thank you for the nice tutorial.
I am making an app where users can send data on network about their trip stories and other users can read and rate the story.
I have recently posted a question on stackoverflow about my confusion on server side connection:
http://stackoverflow.com/questions/24484855/is-there-any-option-for-running-an-android-app-without-real-server
The question reflects what I wanted to know from you two weeks ago (assuming that you remember me!).
I'll be very greatful if you help me by posting an answer to the question.
Also see the edited part of the question (at last in description).
ReplyDeleteNice way of explanation. Please continue as many RoboGuice tutorials as you can, but with the same mode of explanation.
ReplyDeleteHi Prakash,
DeleteThanks for your interest with my Post.
Will post more articles when I get time from my busy schedule.
Thanks again.
Thanks for sharing this useful information.
ReplyDeleteHow to clear google maps history
Hi, This post is awesome and very useful. Can you please explain how to keep Markers to the in between cities of Starting and Ending Location.
ReplyDeletethis application shows message that unfortunately stopped
ReplyDeletei think i should enter google map key so where should i enter that key