How to get the road name in google maps? - google-maps-api-3

i want to get ONLY the road name in google maps not exact address, using either the geocoder or the directions service.i tried this results[0].address_components[1].long_name but it returns several different names (not necesserily wrong) on the same road.

You need to do a reverse geocode lookup on the location. Google provide this: http://code.google.com/apis/maps/documentation/geocoding/
Read more here: http://en.wikipedia.org/wiki/Reverse_geocoding

Related

Is it possible to include businesses in the HERE Geocoder Autocomplete Search?

Use Case:
I've got a search box where the intention is to search for addresses, cities and businesses, and up to 5 matching locations will be returned. Then, I'll use the geocoder to get lat/lon coordinates for a selected location based upon locationId.
Desired Outcome: The geocoder autocomplete API works well for cities/states/addresses/etc., but I'd like for the results to include businesses as well (where a business result would come with a locationId). Is this going to be possible with the Here API? Using the Places segment of the API would be an option as well if there's a path forward along that route.
NO, Geocoder API helps to find only addresses based on housenumber, street, country ,county, pincode but it does not tell you if the address is of a business category.
You can try Places API and check if it works for your usecase. Read more at developer.here.com/documentation/places/topics/quick-start-find-text-string.html.
Below is an example of Hotel category(Business) in Sunny Vale, CA. You can get the id and location details here.
https://places.cit.api.here.com/places/v1/discover/explore?at=37.370831%2C-122.024636&cat=500-5000-0000&cs=pds&Accept-Language=en-US%2Cen%3Bq%3D0.5&app_id=xxxx&app_code=xxxx

Finding Places without providing nearby location

In Google Maps, I can type in 'Eiffel Tower' and it will present the correct location/Place. But using the Places Library with Maps API, it seems that you must always provide a nearby location when searching. You can't search for 'Eiffel Tower', it has to be 'Eiffel Tower' and you have to provide coordinates for 'Paris, France' as well. Is there any way to achieve an API experience closer to the regular Google Maps experience?
UPDATE:
If I search with the regular Maps API Geocoder, 'Eiffel Tower' does in fact return the correct address. But if I search Geocoder with 'Madison Square Garden', I receive completely unrelated locations. This is despite the fact that the Google Maps website does immediately identify 'Madison Square Garden' correctly.
Summary: It seems that the Places Library cannot search Places without a nearby Location provided. Additionally, Geocoder can sometimes search for famous places but not other times. Results do not seem to correspond to the Google Maps website results.
When you search in Google Maps, you ARE providing a "nearby" location. It uses the center/bounds of the current map view. Searching for a place without context wouldn't be very helpful.

Google Maps JS API FusionTableLayer - Get LatLng From Geocoded Location

I've searched google every way from Sunday that I could think of but I cannot seem to find an answer to my question.
Right now I have a map that is using a FusionTableLayer to display the location of geocoded addresses. Does anyone know if it's possible to get the LatLng coordinates of the geocoded address without having to do a secondary geocoder call to geocode the address? Or maybe get an array of all of the markers currently displayed?
like myFusionTableLayer.getMarkers() or myFusionTableLayer.getMarkerLocation(index) or something would be helpful.
It is not possible to retrieve the locations from geocoded addresses in FusionTables. It used to be possible, but that capability was removed, I believe for legal reasons.
If you geocode the addresses outside of FusionTables and store the coordinates in the table, they will be available.

Google Maps API v3 street address vs city, zip

I am using Google Maps API v3 Distance. It has worked well for the majority of the addresses in my database. However, it seems like some addresses just aren't available in Google Maps, and it seems to pick the closest street address match which could be way off. I would expect Google Maps in this case to provide an answer based on city and zip. Does anyone have a solution? I've thought of double checking mathematically by geocode and checking Yahoo maps(or other sites) for the ones that are way off but that adds processing time and is not a very elegant solution. There must be some setting I'm missing or other such work around.
Thanks!
BTW shout out to the new Json Serializer! Well it was new to me anyways.
How are you formatting the address you are sending ?
I've used the Google Maps API to do some reverse geocoding and if a street could not be found (due to a typo or what have you) Google would return the lat lng for the historic town center.
I structured addresses as Country, city cityzip, street nr.
You should use the location_type of the geometry object to determine what accuracy was returned. I suggest checking to see if the returned resulsts indicate whether a result is anything other than ROOFTOP or RANGE_INTERPOLATED.

help geocoding a vb.net dataset

i am looking to map a dataset of addresses on a map.
basically, i want the users to type a street name in my town and be able to see the houses that have signed up already on that street. so a pinpoint should show up on the houses that came up on the dataset.
at first i was thinking of just geocoding all the address and uploading the excel sheet into a database however, this wont work because new signups would then lack longitudes and latitudes
so what i am aiming to do is geocode the addresses on server side and then mapping the geocoded results
The Artem Google Maps control, available on Codeplex.com will let you geocode using the Google Map API from an address. If you have a very large number of records you want to geocode, I recommend MS Mappoint, which has a COM API that can easily be called from .NET.

Resources