Does Mapbox have test addresses that will produce specific responses?
Specifically, we want to use address search that will produce low-accuracy results - so we can test that our app responds correctly.
Related
I want to get literally every search result from a certain term. For example if I have the term "dentist las vegas" I want to get at least 5000 results with all links google provides.
I want to make it with jsoup. Do anyone have a sample code for me please?
You can use Google Maps Platform's Text Search Request if you wish to get the results of all "dentists in Las Vegas" including their websites and other information. The service is especially useful for making ambiguous address queries in an automated system, and non-address components of the string may match businesses as well as addresses.
Below is a sample request:
https://maps.googleapis.com/maps/api/place/textsearch/json?query=dentists+in+Las+Vegas&key=YOUR_API_KEY
There's an optional parameter "pagetoken" wherein it returns up to 20 results from a previously run search. Setting a pagetoken parameter will execute a search with the same parameters used previously — all parameters other than pagetoken will be ignored.
I am using Google Places API Text Search to fetch for pharmacies and looks like it isn't filtering address correctly.
When I search for Walgreens, it returns some results from Broadlands, Herndon and some other locations.
If I search for Walgreens Broadlands or Walgreens Herndon, it returns nothing.
But if I search for Walgreens Miami or Walgreens Village it returns correctly.
Other strange behaviour is that, sometimes, executing the same request two times returns different results. For that reason, I don't know if you will get the same results using the links I provided.
Google documentations states the following:
The service is especially useful for making ambiguous address queries in an automated system, and non-address components of the string may match businesses as well as addresses. Examples of ambiguous address queries are incomplete addresses, poorly formatted addresses, or a request that includes non-address components such as business names.
From my understanding, the examples I gave should work just fine.
Am I missing something? What is wrong in these cases?
It sounds like a bug, I would suggest filing an issue in Google Issue tracker for Places API.
The unique workaround I can think about is providing an additional information about the area where you are searching the Walgreens pharmacy. I believe the queries with location bias work better than without it. If I use the coordinate of Broadlands (39.0181644,-77.5202688) and specify radius of 50 km, the Places API text search for Walgreens return results
https://maps.googleapis.com/maps/api/place/textsearch/json?query=walgreens&location=39.0181644%2C-77.5202688&radius=50000&type=pharmacy®ion=US&key=MY_API_KEY
as shown in the screenshot
I hope this helps!
I am having an issue with finding an address when all I have is the street number + street name and a postal code (assuming in US).
Using url parameters like:
address=1234+street+rd%2C12345%2Cunited+states
seems to always interpret <12345> as part of the street, like a sub unit or something. Using components parameters like:
address=1234+street+rd%2Cunited+states&components=postal_code:12345
will find the correct postal code but does not return the address information for the specific location like street number and name.
If I also add the route component and specify the street name then the full address information will be returned. Likewise if I use the locality component, then the full information will be returned:
address=1234+street+rd&components=locality:city+land|postal_code:12345
address=1234+street+rd&components=route:street+rd|postal_code:12345
The issue is I am using the geocoder to parse the addresses so I am relying on a full address response to get the components. In this specific case Im assuming the user only entered a postal code and street info so I dont have the option to include locality (without using a second maps calls) nor do I want to assume Ive broken down the street info correctly.
Can anybody shed some light on possible issues Im running into or possibly how to make a maps api call with only street number, street name, postal code, and country being known?
The Geocoding API documentation says the following:
A query containing a component filter only returns the geocoding results that match the filter. If no matches are found, the geocoder returns a result that matches the filter itself.
https://developers.google.com/maps/documentation/geocoding/intro#ComponentFiltering
So, if address=1234+street+rd%2Cunited+states&components=postal_code:12345 founds a postal code it is likely because the address is missing from Google database.
You have an option to report missing addresses as described here:
https://support.google.com/maps/answer/3094045?hl=en&ref_topic=3093612
Hope this helps!
I'm trying to limit the amount of information returned from a get by using the extended properties and projections (property-KEY), but I get the same information regardless of what I specify in the get request.
For example, from OAuth playground
//www.google.com/m8/feeds/contacts/default/thin?v=3.0&max-results=10&q=mytest#gmail.com
//www.google.com/m8/feeds/contacts/default/property-familyName?v=3.0&max-results=10&q=mytest#gmail.com
//www.google.com/m8/feeds/contacts/default/full?v=3.0&max-results=10&q=mytest#gmail.com
Am I interpreting the API correctly for projections? I expected to get only the family-Name when I specify a projection of property-familyName?
I'm losing some hair over Google's AJAX API currently. What I do is turning structured location data into a Google local search API query in order to give users an alternative result list of places.
ex.:
http://ajax.googleapis.com/ajax/services/search/local?v=1.0&key=XXX&hl=en_US&mrt=localonly&rsz=large&q=pizza+Neustadt+DE
However, the API behaves very oddly at times, often not taking into account certain parameters I pass to it. For instance:
If I search for "term Rome Roma IT" on Google Maps, then it finds all terms in Rome as expected. If I repeat the same search on the API, I get zero results (I have to remove either 'Roma' or 'Rome' for it to work -- Roma is the administrative region here, and Rome the city name).
Why is that?
Another example. There is like 20 different towns, cities and boroughs called Neustadt in Germany. Now, when I search on Google Maps, it only finds one, unless I specify an additional qualifier, like a region or something.
Now, on the API level I kinda expected that when passing lat/lon parameters along with a query for Neustadt then it would be clever enough to pick the correct Neustadt by looking at the geo coding. But that doesn't happen, it always picks the same Neustadt and ignores the geo data.
q=pizza+Neustadt+DE&sll=48.8053,11.7579
I had similar problems when doing bounding box searches. The bounding box seems to be ignored completely, since I'm still getting result data which is a hundred kilometers off:
q=pizza+Neustadt+DE&sll=48.8053,11.7579&sspn=0.00001,0.00001
The last result is not even in the same city; shouldn't the tiny bounding box not result in any data whatsoever? I could even pass a zero size BBox and I would still get results.
I know there's an actually quite extensive documentation for the Local Search API, but it never goes into detail about which parameters are used when and how a query has to be structured and is evaluated, which makes it very difficult to get decent results.
Do you have any hints, tipps, suggestions on how to get to grips with Google Local search?
UPDATE:
I just found something REALLY odd. Could someone please go to this website:
http://code.google.com/apis/ajaxsearch/documentation/localsearch/index.html
open firebug, and monitor the HTTP traffic when typing in this search query:
test Rome Roma IT
You will get a bunch of results on the map. Now copy the URL that was contacted via AJAX and send a request to it on the command line:
curl "http://www.google.com/uds/GlocalSearch?key=internal-sample&v=1.0&rsz=large&sll=41.97684819454683%2C12.486648559570312&sspn=0.204185%2C0.549316&q=test%20Rome%20Roma%20IT&lssrc=lsc&lscstyle=final&start=0&callback=_callbacks_._5g139yfuc"
Now I get ZERO results. How can that possibly be? It's definitely not the key or callback args, I removed them without any change to the outcome of that query.
Is Google extending their search results when a query comes from one of their servers?
I've encountered exactly this same problem and it seems to be down to a combination of licensing issues and the fact that what Google exposes via its APIs and what it displays in the Maps/Google search pages are a combination of different searches (search, maps, base, data etc.etc.)
On the licensing issue, it seems that Google can display more information when a user goes via the browser, compared to requests via API calls (which could theoretically be automated).
See here for example.