Plotting a GPS trail route on a Google map, embedding to site - android

New to Stackoverflow, did some searching and couldn't find anything that really matched what I'm looking for unless I'm using the wrong keywords. I did find guides on how to plot a route when you know the actual route, but I'm looking to do it from actually walking it, see below:
I'm fairly new to web development and am looking to plot maps of a trail on a website using an embedded Google map or some other free map platform if it's suitable (OSM?) I have an Android phone and I'd like to actually be able to:
(1) walk this route,
(2) take the GPS data somehow &
(3) match it up to a Google map to
(4) post it on my webpage.
That will help visitors know the actual route (which is not available on Google Maps in any detail) and have somewhat of a "guide" of the near-exact trail route. I imagine this can be done, as Runkeeper and other applications do this (with additional data on speed, time, etc.) for tracking your runs. I don't really want any of that additional data as much as I would like to just capture the GPS route itself, and have it in some format that I can then use to make a map out of automatically. Not sure where to start with this, or if it can be done easily. Any information or guidance would be greatly appreciated. I have no experience in Java; very limited Javascript and OK in HTML/CSS. I've never used the Google Maps API either.
Thanks!

You may use API Picker lists to help you on the most common things you may want to do on a map or with location-based data, and this also suggests the API that most suits your needs.
Listed below are the useful APIs to plot a route on a map:
Polylines in the Google Maps Android API
Polylines in the Google Maps SDK for iOS
Polylines in the Google Maps JavaScript API
Directions mode in the Google Maps Embed API
Paths in the Google Static Maps API (a web service)
Links of useful APIs for whatever you want to do on a map can be found in the documentation.

Related

Is Google Directions API route recommendation updating according to real-time traffic?

I'm building a route recommendation app in Android Studio where the user can see the best route between two destinations on the map. I am using Google Maps APIs for that and I know that it's using Dijkstra's algorithm to determine the route. But I wonder if the API can update the route according to real-time traffic, I didn't find any information about that.
Google Maps is updated constantly – literally, every second of every day!
refer this page

How to plot multiple destination and provide Route for the user in Google map?

I've been researching for a long time in finding tutorials.
This is what i want to attain/make, Credit to Voyage: Route Planner
That application itself is similar for what i want to make.
Questions are:
-How to plot multiple destination and provide Route for the user in Google map?
-Is there any books/tutorials/website that i can read/use/watch to learn more about google map?
How can i give the directions to the user after i provide the route? or how can i do this?
-I've already saw similar question like this but then it is written in Javascript.
Thank you.
To answer your questions:
How to plot multiple destination and provide Route for the user in Google map?
As far as I know, multiple destinations support hasn't been an added feature yet for Android as also discussed in this thread.
However, you can get some ideas about getting directions for multiple destinations from the given suggestion in Google Maps Help Forum and routing from this YouTube video - Google Maps Routing Multiple Destinations
Is there any books/tutorials/website that i can read/use/watch to learn more about google map?
You may use these helpful references, video and others
To plan a route through a series of up to 23 locations using the Google Maps Directions API, you can use Waypoints.
Android Location API - Tutorial
How can i give the directions to the user after i provide the route?
As discussed in Directions Requests, this can be done by sending HTTPS or HTTP requests and adding certain parameters with the following format:
https://maps.googleapis.com/maps/api/directions/outputFormat?parameters
I hope that helps.

Getting road info from Google Maps API 2

I want to receive roads information from Google Maps API like the regular street info.
For example, in the Google Maps application, you can see the traffic in each road. Is there any way to receive this info in data and not just view on the screen?
I need to get information such name, traffic, speed-limit and point of start and end.
I think about something similar to the existing streets info, I will give a location (long,lat) and the system will return the nearest roads around (maybe crossroads also).
Is there any way to get this information with Google Maps API? If not, there is another service that can provide this info?
I tried to find some details but I can't find anything...
You can use Google Directions API for this. It provides you closest directions, distance and time to travel. I also recommend using Google-Directions-Android library for parsing all that stuff, it really saves a lot of time.

Obtaining deviations from set google maps route?

We would have all used the google maps app on android, so my question is little relevant to that.
In the gmaps for android app, when I choose a driving route, the route gets displayed on the map with voice and text commands. Suppose I deviate from that path, it recalculates the route and alerts me saying follow the original route.
So my question is, can we do this in the google maps API that is provided for android in our own app? If so what is the best followed approach.
My use case goes like this: I have a user who will start his journey to a set of client hotels, and if the transit he takes deviates I simply have to alert him saying he is following a wrong route or he has to follow the modified route. Kind of a security feature.

GoogleMaps v2 route in real time?

here is now researching how best to draw a path in real time. Get coordinates and draws up earlier and so forth ..
Materials in the network is. But I can not understand the following.
There are many examples of inheritance Overlay then implement the draw () method and draw. But this we will have a one-time, and I need to constantly draw.
Received a starting position, went to finish the position has changed to its original position and so forth.
How?
Examples.
Drawing a line/path on Google Maps
How can I parse out points and draw a route on a Google Map in Android?
Thanks.
First of all from your tags you are pointing to Google Maps API V2 while the links you are
posting are for Google Maps API V1. That's said it's means that you do not have the Overlay object to work with and neither is the GeoPoint is the object you should use to show you direction positions.
In Google maps API V2 what you could do is to add/remove Polylines to show you directions.
Those Polyline will connect LatLng Points.
Now to find you directions you can use the Google Direction API.
Here is a post on how to find directions and show them on Google Map API V2:
Draw driving route between 2 GeoPoints on GoogleMap SupportMapFragment
Now from that how you will implement the your location updates and your desired destination updates it's up to you:
Something important to consider:
It's not officially allowed by Google Maps APIs Terms of Service to use Google Maps API for driving directions:
Google Maps/Google Earth APIs Terms of Service
Last updated: May 27, 2009
...
10. License Restrictions. Except as expressly permitted under the Terms, or unless you
have received prior written authorization from Google (or, as applicable, from the
provider of particular Content), Google's licenses above are subject to your adherence
to all of the restrictions below. Except as explicitly permitted in Section 7 or the
Maps APIs Documentation, you must not (nor may you permit anyone else to):
...
10.9 use the Service or Content with any products, systems, or applications for or in
connection with:
(a) real time navigation or route guidance, including but not limited to turn-by-turn
route guidance that is synchronized to the position of a user's sensor-enabled device;
and may be disabled for certain apps (somehow, at least on Android)... FromGeocode
scraping in .NET conversation:
This is not allowed by the API terms of use. You should not scrape Google Maps to
generate geocodes. We will block services that do automated queries of our servers.
Bret Taylor
Product Manager, Google Maps

Categories

Resources