Finding common cross street using google maps (or API) - google-maps

I'm making an application that uses google maps. The app has a database of schools with their address, coordinates etc. Given addresses of two houses, i want to find the nearest cross street between the two houses and from there I want to plot the path to one of the schools.
Is there any API or framework available.
(I'm looking for similar solution on iOS as well. I'll post a new question for iOS)

The is no API, to find the nearest cross street.
Whereas to plot the path between 2 address, you can use Google Maps DirectionsService.
A service for computing directions between two or more places.

Related

Geolocation: How to get a uniqueID for a street/block?

Background I'm a bit new to google maps/mapping sdks in general. I want to create a street by street "heat" map of an area on iOS. As an easy to understand example, let's say it will be for the purpose of mapping daily puppy sightings in a city. The data changes regularly, we need to show that certain streets have more puppy traffic than others.
Similar to the ones pictured here
https://blog.mapbox.com/spotangels-mobile-parking-maps-30db4b10aee7
And here
https://www.trulia.com/local/san-francisco-ca/type:traffic_volume_live
To do this, I would like to get a unique ID for each street block.
Something like this:
Question: How can I tell when a user entered a unique street? How can I get a unique street ID?
Related side question: If it's not possible in google maps, links to doing it in OpenStreetMap or Mapbox would be appreciated.
Places I've looked
How to get an use an unique identifier for each street in google maps api
Issue: No answer
Highlighting whole street with some maps API
Issue: Info from 2010
Google Maps: Get coordinates of a street block
Issue: No answer
Get street graph for a game using Google Maps API
Issue: Info from 2012
Map Highlight Odd/Even Side of Street
Issue: Unanswered
Display traffic data with maps
Issue: Unanswered
How to get only street/road coordinates via reverse geocoding (Google Maps API)
Streets in a radius
How to get all roads around a given location in OpenStreetMap?
Partial solution OSM
This should be doable with OSM data.
Retrieve the streets around you (e.g. using Overpass API and the around query). Determine the way you are currently driving on, then split it at each intersection node. Now you have street segments similar to your second image. The start and end node ID of each segment could be used as (temporary¹) identifier.
¹ temporary, because IDs in OSM can change eventually.

Street and Road names in Google Map

I would like to retrieve all the road and street names, if i enters a area in search box. Is that possible in Google API ?
I have checked List of all street and road names in Google in API for solution, but there it is been given for auto complete box and the request is not for my requirement.
Also I learnt that Open Street Maps provide us these data, unfortunately I would like to perform some operations based upon the Google API's. So can you suggest me a way, otherthan OSM.
Google Maps API does not provide such functionality. However, there is a Google Maps Roads API which is one of their premium paid APIs which lets you query nearest road names and other road metadata. You can check that out here:
https://developers.google.com/maps/documentation/roads/intro
You can also try Overpass-Turbo (https://overpass-turbo.eu/) which lets you query OSM data. You can set the bounds and the OSM tags you are interested in.

Getting all addresses on a street - Google Maps Geocoding API

My task is to take a specific street and find all of the houses on that street. My input is a complete address with city, zip, etc - except without the house number. The desired output is a literal list of every home on that street and their respective house numbers. (411 Street Dr., 413 Street Dr.)
I can't find anything in the Maps / Geocoding API which provides this functionality, or even something similar like finding all of the addresses within a polygon.
The only real solution is to "guess" house numbers on the street and verify whether not it's a real address. To make this slightly more accurate, the TIGER database could potentially be leveraged. It does include "address ranges" for streets, such as "400 - 432".
My question is: does anybody know of alternate API or another combination which provides complete results (every address 99% of the time)?
It is so burdensome to make that many requests and having to essentially throw most of them in the trash!
PS. The Places API will not work here because the need is residential homes.
The Google Maps APIs do not offer bulk download of maps data as you seem to be looking for. You can use the APIs to let users find places, but they are not for you to obtain exhaustive maps data sets.
Maybe you can use the Google Maps APIs to build your application/s in such a way that you don't really need to have all houses in each street, enabling each user to find the one place s/he needs.

maps windows phone 8

I am trying to make an application for windows phone 8 that could track current location of user and gives a route from current location to desired destination location.
With existing maps feature (bing, Nokia maps) it is not possible to track the location areas for Karachi Pakistan by their respective names. For example, if I want to get the route from pizza hut, Karachi to dolmen mall, Karachi, it will never show a route since the areas are not marked in the map.
This problem doesn't occur for people living in the US I suppose, since I saw many tutorials where exact locations are shown by just typing in the area names in the search bar (as for Redmond and Chicago). What should we, the users of elsewhere do.... while if we see Google maps, all areas even of Karachi, Pakistan are marked.
please help.
In Bing Maps, if you have two coordinates that are on roads that are drawn on Bing Maps you can get a route between them anywhere in the world. WP8 uses just Nokia data which is only one of several data providers used by Bing Maps. You can use the Bing Maps REST services to route between any two coordinates that are on roads in the world, including Pakistan. Here is some information about the Bing Maps REST routing service:
http://msdn.microsoft.com/en-us/library/ff701705.aspx
http://msdn.microsoft.com/en-us/library/jj819168.aspx
http://msdn.microsoft.com/en-us/library/jj870778.aspx
Bing Maps are very powerful and easy to implement but unfortunately they are not supported in Pakistan. Due to restriction you are not able to find route between two geo location point or places. But Microsoft promised to give its support in Pakistan very soon as they are working on it as well.
The link given below will show you the restriction of bing maps in different regions.
http://msdn.microsoft.com/en-us/library/jj670541.aspx
I have written a blog post in which I have drawn a route between two location points but it will not work for you as I already told you.
http://dev-bingmaps.blogspot.com/
Now there is one solution in from which you can find route that is to use google maps.

How to find a closest street

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.