I'm trying to get a list of the nearest bus stops around a certain location along with which buses stop there. I can easily get nearby bus stops using the Google Places API but the response doesn't include which buses stop there. I want to extract the data that is visible when you click any bus stop (which can be seen below).
Is there a way for me to extract (from the above example the numbers 52 and 452) using any Google API or even a 3rd party API?
Related
I'm having some trouble retrieving some information about the bus stop schedule of a single bus stop.
Basically, when I open the bus stop on google maps, I can see all bus lines for that stop and it's respective schedule time.
After clicking on see departure board:
However, I couldn't find a way of getting this information from the google maps api.
I tried searches by place_id and geographic coordinates and I was able to find some information about this stop, but not lines or schedule times..
I saw some people being able to find some information like this by setting a route on the directions API, but in my case I need the complete schedule of the bus stop itself, and not the info between two locations.
I'm afraid Google doesn't expose this sort of information via their Google Maps APIs at the moment. There is a feature request in the Google issue tracker to make this information available (33 stars currently, however doesn't look like priority at Google as FR was opened in 2015):
https://issuetracker.google.com/issues/35827961
Feel free to star the feature request to add your vote and subscribe to further notifications from Google.
I have build employee location history tracking app in Ionic 4.
The process is as follows:
1- There is a service which fetches the current location after 5 second
2- Upload the fetched coordinates to database
But sometimes the location fetched is incorrect i.e 4-5 meters away from where the current employee is. I dont know why is this happening even though I am using accurate location fetching.
Anyway,
In admin panel, I draw the polygon on Google map from the coordinates which were saved.
As you can see the polygon and the whole track is quite weird.
Is there any way to draw the lines as we get in directions API?
Or something like trailing line drawn like this in life360 App.
I want the history locations to be drawn quite smoothly on maps instead of weird polygons line which doesnt bother the roads and paths
You can use the Directions API. Input all the points as waypoints and the response will contain an encoded polyline that will be on actual roads and look nicer than a polyline.
https://developers.google.com/maps/documentation/directions/
Is there a way to generate a google map link which takes in lat , long values and shows me the place along with the nearby restaurants. Using the places API i get the required response but i get that in JSON format i require a link where you click and it opens up the google maps and shows your respective location and all the nearby restaurants.
If you use this link
http://maps.google.com/?q=lat,long it would show me the location corresponding to the lat,long along with that can i also pass in some parameter to locate the nearby restaurants as well something like http://maps.google.com/?q=lat,lng&nearBy=restaurant
If it can be of help to anyone who is facing a similar problem as i was. Found out a way to generate a google link which points to the google maps with nearby restaurants(any field you want to search for can be replaced with the restaurant string)
http://www.google.com/maps/search/restaurant/#your_latitude,your_longitude,17z
You can replace the /restaurant/ with /bank/ and get the nearby banks to the latitude,longitude specified in the link
http://www.google.com/maps/search/bank/#your_latitude,your_longitude,17z
17 is the zoom level you can change that as per your requirement.
I have a Google spreadsheet with one column of physical addresses, and I want to have a second column be the time in minutes to walk between the address in column 1 and a second address (as determined by Google Maps). Any recommendations on how to accomplish this task?
From my understanding of the Google Maps terms of service, they:
don't like people using their service as a "batch geocoder". This means that
you will need to throttle your requests (place delays between each successive request, to avoid the OVER_QUERY_LIMIT error)
it is against the terms of service to use the geocoder (and maybe the distance service) without displaying a map graphic
If you still want to proceed,
you need some way of extracting the address from your spreadsheet. I think there's a Google docs API that will help you do that. I also found some custom Javascript code that does that for you easily. I don't have a link anymore :(
once you have the addresses readable from the Google Maps Javascript API, you can call the distance or directions API to get the walking distance
then you need to save that back to the spreadsheet.
It sounds like a possible application for the Distance Matrix Service.
But you can only use it if you will be displaying a map
Use of the Distance Matrix API must relate to the display of
information on a Google Map; for example, to determine
origin-destination pairs that fall within a specific driving time from
one another, before requesting and displaying those destinations on a
map. Use of the service in an application that doesn't display a
Google map is prohibited.
I'm reading through Google Maps API documentation and I wonder if such a think is possible:
I specify the point (by coords)
I search for all roads, and junctions around the node (say in 1km radius)
I get parameters for the streets around (polyline coords)
Is it reachable, or google do not share that data?
Thanks in advance
Rafal
I can image writing up a little script that generates a bunch of random points within a 1km radius and then performs directions services via Google Maps API to obtain all possible routes and thus streets within a 1km radius. However, this is problematic since it is kinda against the Google Maps TOS of displaying this information only on a map within a website and not extracting data for you personal use as this would be.
A better approach would be looking into utilizing Open Street Map data where you can download street data from a specific viewport. If buying street network data is an option, you can go to a commercial outlet such as NAVTEQ or PTV which post-processes NAVTEQ data to a format for use in the transport modeling software package you mention on your blog.