Google Maps API House Number not Showing - javascript

I am trying to use Google maps autocomplete input to search for places and fill out the form fields. I do not get the house number (Street Address in the following form) from the API for the following address;
30 Ellabay Crescent, Redland Bay QLD, Australia.
If you try 30 Ellabella Court, South Morang VIC, Australia it fills out the Street Address field properly;
Here my working example in JSFiddle;
https://jsfiddle.net/ssrpsathira/2n5s4qx0/4
I tried logging the output from the API call for this address when selected from the autocomplete dropdown and there was really no street address value in the address components of the API response and yet I am not sure why the street address number is shown in the autocomplete text.
Is there something I am doing wrong, or is it just the API behaviour? I really need to get this fixed to show the house number of the address.
Thank you.

I am not sure this is a proper answer but it would be too long to put this as a comment.
Why does one work and the other not? I don't know, and IMO, both should not work.
Ellabella Ct, South Morang VIC 3752 seems to have only numbers from 1 to 8 registered on Google Maps and this seems to be consistent with another data source: http://www.street-directory.com.au/vic/south-morang/ellabella-court
Ellabay Crescent, Redland Bay QLD seems to have none. Try a search in the above website, it's not even on the map yet. Might be a new area? In any case, trying to reverse geocode any house on that street with Google Maps API returns just Ellabay Crescent, Redland Bay QLD 4165.
So I don't think there is anything wrong with your script, but maybe the data is just not up to date.
You can contribute to adding information on Google Maps. For that, please read https://www.localguidesconnect.com/t5/News-Updates/Exclusive-Edit-a-road-segment-in-Google-Maps/ba-p/149865
That still doesn't explain why it works in one case and not in the other when both street numbers seem to be unknown by Google...
You can file a new bug in the issue tracker if you think this should be corrected.

Related

How to extract datetime of a location when it was added to the google maps?

I am trying to extract datetime of a location pin when it was added in Google maps.
For e.g. if I search McDonalds in an area then it should give datetime for all McDonald locations in that area with their datetime.
Is there a way to pull up that data.
P.S. This question may not belong here so apologies for that. I have tried other forums but I couldn't find any relevant information.
I hope you are using google maps API for development, so if you want to get place details then you can use Place API.
https://developers.google.com/maps/documentation/places/web-service
Nearby Search and Text Search allow additional parameters to filter results, (e.g. minprice, maxprice, opennow, and type).
PlaceOpeningHours is parameter from which you can get time for particular place
https://developers.google.com/maps/documentation/places/web-service/search-find-place#PlaceOpeningHours
I hope this answer is helpful to you.

Fetch Longitudes and Latitudes by walkthrough the MAP

I have a question and I don't know that is feasible or not. I tried hard but I am not getting any idea. Actually what I am doing is I am collecting the data for doing a load test. For that I am collecting several address. I got some of the longitudes and latitudes from one of the website. Based on these longitudes and latitudes I generated the address by using the Google Places API. But I need more data but I don't have any geolocations.
Here my questions are
Is there any way to get the address without mentioning the latitude and longitude by using google maps.?
Is there any way to get the addresses by walk through the google maps.? Say for example, in the google maps if I click San Jose, CA, United States we can see a mark in the google maps (Mark represents boarders of that place). Is there any way to get all the addresses from that mark. Say for example, I will mention one of the geolocation and based on that I will move north side by slightly increasing the longitude and latitude and in the same way after some time I will move some other side etc.
Is there any way to know the boarders of that place.?
Is there any way to get the address without mentioning the latitude and longitude by using google maps.?
You can try out Google Places API to search based on the address. You can search for places there and return Places that are likely to match the query.
Is there any way to get the addresses by walk through the google maps.? Say for example, in the google maps if I click San Jose, CA, United States we can see a mark in the google maps (Mark represents boarders of that place). Is there any way to get all the addresses from that mark. Say for example, I will mention one of the geolocation and based on that I will move north side by slightly increasing the longitude and latitude and in the same way after some time I will move some other side etc.
I think you may be referring to the oogle Maps Geocoding API for this one. It can convert addresses to coordinates and vice-versa (reverse geocoding)
Is there any way to know the boarders of that place.?
It seems to not be possible based on this SO ticket. However it did provide an alternative solution that may be similar to what you want to do.
Hope this helps!

Google geocode location result differs from maps result

I have a address in Germany
Deutschland, 13086 Berlin, Caligariplatz 1
If I search for "Caligariplatz 1" directly in maps it shows the right location.
[https://www.google.de/maps/place/Brotfabrik/#52.552605,13.430414,17z][1]
If I use the geocode function from the api
[https://maps.googleapis.com/maps/api/geocode/json?sensor=false&address=13086%20Berlin,%20Caligariplatz%201][2]
The formatted address in the result is 13086 Berlin, Deutschland without the street. The location is wrong. The location_type is only APPROXIMATE
Is it possible that some streets are not known by the geocode Database?
It's not the only problem. How can i fix it?
A couple of things first:
The geocoder is not a general purpose map/location search. It specifically tries to determine a position for an address. It is therefore inherently different to a search on Google Maps, which for example also supports searches like "parks in Berlin". Also, the data used by the Geocoder might be different.
Addresses should be formatted according to the conventions of the local postal service. Your address should be formatted "Caligariplatz 1, 13086 Berlin"
Now for your particular address, Google Maps finds it because there is a Place with that address. You could actually find this location with the Places API.
The address itself does not appear to be in the database, as you can for example confirm with MapMaker. Since this is a square and not a traditional street, the building in question should probably be edited to include the address.

Return a list of Google Maps locations that I have previously specified

Let me begin by saying, I have been searching for resources for this question for more than 3 days, so I truly hope I did not miss an "answer" anywhere.
Background:
I am working on a website/app built in HTML/CSS/Javascript that will use geolocation (Google Maps & Places API) to find a users location and return them the (for example) top 5 closest water parks to them at that location they are currently at.
Question:
I want to control the list of results the API picks from. So let's say, it'll only give them 5 out of 30 water parks that are near them and I have previously specified the names/locations of those 30 water parks.
The reason I want to do this is because after searching via Google Maps for "water parks nearby 123 Main Street, City, State" - it doesn't return all the results I want it to, just some.
As I stated, I have looked far and wide for this answer. I have read almost all of the relevant Google Places API and Maps API documentation with no clear cut answer. I have also found a few website that let you use a Google Docs spreadsheet to specify locations, but you can't get the code from them. And I have seen a few example using XML, but nothing exactly what I'm looking for.
I will also note that I am familiar with C# and PHP if that helps get me closer to my goal. But it seems like Javascript is the way to go.
Any help/hints/tips would be greatly appreciated! Thanks!!
Store the data in a database that supports spatial queries(may be a FusionTable for example), then you may use ST_DISTANCE to order the results by distance and LIMIT to limit the resultset.

Does Google Maps API offer a way to search for locations by name?

When one visits http://maps.google.com, they are able to type queries into the search field and receive results based on locations or places, and not hard search results, as they would in a normal Google Search query. They're a unique style of result (names of places, locations) suited to the Maps interface for obvious reasons.
I've been digging through both the Maps and standard Google Search API for a couple hours now, and have done multiple searches on this question, and I can't seem to find the answer.
They obviously have the Local Search, but that's been deprecated, and it only yields results if you provide an initial lat/long. I want to be able to find places or locations with no initial lat/long.
Essentially what I want to do is allow a user to type in an address, name of a place or name of a city or state or a zip code, or essentially any other kind of location that is allowable on Maps, and geocode it. I feel stupid because this seems like it has to be there, but nothing I've seen in the API seems to do this.
I don't need the AJAX suggested results, necessarily. Just a way for a user to type in a nice name and geocode from it, though results as a user types would be ideal.
What am I missing here?
What you are looking is Geocoding API from google maps.
Find Documentation here
UPDATE 5/12/2011
Google just opened up public access to their Places API. This is more to the heart of the original question request:
https://developers.google.com/maps/documentation/places/web-service/autocomplete
I think you're looking for the google.maps.Geocoder class:
A service for converting between an address and a LatLng.

Categories