Street and Road names in Google Map - google-maps

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.

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.

How google get polygon data for locality in a city

I have seen google showing polygon lines for locality in a map. eg: https://www.google.co.in/maps/place/Koramangala,+Bengaluru,+Karnataka/#12.9354922,77.6146828,14z/data=!3m1!4b1!4m5!3m4!1s0x3bae144ed898fc2d:0x1681f38e8c00ae56!8m2!3d12.9279232!4d77.6271078
I wanted to know how google gets this data. Do they use any kind of mapping of images to the government data available in the countries in the world. I dont think all the countries provide data (lats, longs) at such granular level.
Right now this feature is unavailable for Google Maps API. But there is a feature request on Google's Issue Tracker that you can star and comment on.
Here's the link:
https://issuetracker.google.com/35816953
There are workarounds for this though where you get the data elsewhere and draw the polygons yourself.
Here's the link to that:
Google Maps how to Show city or an Area outline

A* algorithm with google maps API

I want to implement an A* Search Algorithm with google maps's API, but how can I get the coordinates just from the streets, not from the houses etc? And how can I get the neighbor's coordinates from this specific street coordinate? How can I identify crossroads? Does someone have an idea? I need this to trace a route, but I don't want to use google's algorithm
*Coordinates= Latitude,Longitude
The street data is not available via the Google Maps API for use in other routing algorithms read the terms of service). You will need to use an open source for mapping data like Open Street Maps

how to get an administrative_area_level_1 list for a given country from google maps api?

I'm building a drill down interactive map
I want to use lists, that will enable the user to drill from continent to country to administrative_area_level_1 regions
is there a way to query google maps api and get a list of administrative_area_level_1 names for a given country?
I looked in geocoding - which gives me essentially a lat/lng coordinates for an address
also looked at reverse geocoding, that will return address components for a given lat/lng
not relevant...
i need a list of administrative_area_level_1 names for a given country...
I don't believe Google has a complete list or API for that information, but there are several resources that might be helpful:
Counties (US Census Data)
Cities (Google AdWords API
"Geographical Targets" (Google AdWords API)
That last one is ambiguous but seems to include quite a lot. You could probably filter it down to just what you need.
Unfortunately the Google Maps API does no provide this functionality. You will have to look into solutions such as the SimpleGeo Context API.

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.