Google Places not finding location that Maps API does -


the below link (maps api) finds kensington san diego neighborhood. https://maps.googleapis.com/maps/api/geocode/json?address=kensington,%20san%20diego

{    "results" : [       {          "address_components" : [             {                "long_name" : "kensington",                "short_name" : "kensington",                "types" : [ "neighborhood", "political" ]             },             {                "long_name" : "san diego",                "short_name" : "san diego",                "types" : [ "locality", "political" ]             },             {                "long_name" : "san diego county",                "short_name" : "san diego county",                "types" : [ "administrative_area_level_2", "political" ]             },             {                "long_name" : "california",                "short_name" : "ca",                "types" : [ "administrative_area_level_1", "political" ]             },             {                "long_name" : "united states",                "short_name" : "us",                "types" : [ "country", "political" ]             }          ],          "formatted_address" : "kensington, san diego, ca, usa",          "geometry" : {             "bounds" : {                "northeast" : {                   "lat" : 32.777394,                   "lng" : -117.0968502                },                "southwest" : {                   "lat" : 32.755116,                   "lng" : -117.1127622                }             },             "location" : {                "lat" : 32.7668062,                "lng" : -117.1058848             },             "location_type" : "approximate",             "viewport" : {                "northeast" : {                   "lat" : 32.777394,                   "lng" : -117.0968502                },                "southwest" : {                   "lat" : 32.755116,                   "lng" : -117.1127622                }             }          },          "place_id" : "chijqxnex0pu2yarsigymqosyks",          "types" : [ "neighborhood", "political" ]       }    ],    "status" : "ok" } 

the link below (places api) cant find https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=36.26361161176487,-115.12227065576182&keyword=kensignton,%20san%20diego&rankby=distance (of course 1 wont work without api key key responds zero_results)

{    "html_attributions" : [],    "results" : [],    "status" : "zero_results" } 

however can't use map api find starbucks near me (i tried , sent me canada). so...how can search either starbucks, neighborhood, or address , reasonable results

i'm not sure mean "as neighborhood", link below return kensington, san diego (be sure use api key). details returned different maps search.

https://maps.googleapis.com/maps/api/place/textsearch/json?location=36.26361161176487,-115.12227065576182&query=kensignton,%20san%20diego&key=your-api-key

for type of search, try using textsearch instead of nearby search, , replace 'keyword, or name' 'query'.

go page , scroll section titled 'text search requests' more info. https://developers.google.com/places/web-service/search


Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -