Must-Be-A-Bug in the Google Places API

I’ve been working on the Google Places API for the past few weeks and am still facing a huge problem getting relevant results to the user.

I am working on Locations located next to the search query API

I'm on Oxford Road, in Manchester, England, UK, and I want all the airports near me.

Here is my request to get all airports nearby with a radius of = 50,000 meters (which is the maximum)

https://maps.googleapis.com/maps/api/place/nearbysearch/json?key=YOUR_PLACES_API_KEY_HERE&location=53.48,-2.24&sensor=true&language=en&rankby=distance&types=airport

This is the answer that I get (basically I get too many items, many of them are not airports, but for some reason they are connected to airports, they are not estimated by distance at all, and they are only 20 results, the rest are shown on the following pages, etc.):

{ "debug_info" : [], "html_attributions" : [], "next_page_token" : "ClRNAAAAQdlc4UAt5AlEzrfqljvq5L1RvcjTOxn2lO7FNxaDuWSz0RBpgtQ9IqOyK4zu1MmZZDcMAK3U-HJFVU2HYRNfbsIKOwdBiknDUFLH1Yfww7gSEAn9OyN6lo-hVwQbKm5MK44aFMWlMD1QEdbX2jiBW7nFoyarfg3k", "results" : [ { "geometry" : { "location" : { "lat" : 53.362564, "lng" : -2.273354 } }, "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/airport-71.png", "id" : "7e59cffe6f154bc1be5bf49e59304ee270c04c34", "name" : "Manchester Airport", "photos" : [ { "height" : 400, "html_attributions" : [], "photo_reference" : "CpQBhQAAAGZ6qPa3NHdBLr7x7tnIzzJgmo8P43RI0vCx19Y8QD0o0tF622Gw0dk5wxnTEZXont8kAsXfafcbnF2Mhz2WiruDpttVdDjlO2GpLZjsJflvo_FjIGzcYNt1VllVh35HKoW70Q_i-wKyKvwuxju01HPJB9dl9tnekxLpaP2Km4ZGMTCcPUvVi52LwVvLcZNy_hIQQOfWsIHG_wjsdPkAhzyNGxoU3VyMaBQcvCxPiMvf-L7tEKTLdCE", "width" : 600 } ], "rating" : 3.9, "reference" : "CoQBcQAAAAS3ajNSEXtPQl-88CIMflhMuVoKt3l6mI8-0IBWGYUTyl0TczG35XJzxP-ncQtDdeS6mJi2_X52JzDynFql8KXj3u9Ey3YRjxMNwbZhOJrqx2T4a1UyjETUnZ26_aGkUqjqnPiryTMQTXwGsGA7PHjY6b0AKAiF8qxk-yj2TiNgEhAGJQUpTqh_ra4ZsO60525GGhRHDToRB8YoxZk0-3oAX6293pMSMA", "types" : [ "airport", "transit_station", "establishment" ], "vicinity" : "Manchester" }, { "geometry" : { "location" : { "lat" : 53.336707, "lng" : -2.85744 } }, "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/airport-71.png", "id" : "b8ec5a4e18e9e5f33370a310b5782ffff0ac9eaf", "name" : "Liverpool John Lennon Airport", "photos" : [ { "height" : 669, "html_attributions" : [], "photo_reference" : "CpQBgQAAAAFSQQ9hX21FNybgc9BJCLeDjowfbKtmyv514IO22PRZmKG5-oA82j9-qKKtLFc5WKLLbxpFXYZj2dHFWoOdiSExkGVXX_Fl1Mp4DybgzdLg3BIxzCfFYlJIgo4BlxQmKVmnfV3_lRnqy7nhIQuMOM6xymCuHfe4Nh8eYaBABDzHNEm9AnPgbpSmi26ekGrNfxIQ5UQsqIUvt2A6e7eJ1Sh_ohoUtPqcFFRxf_puCqZWIpwoFJfmdds", "width" : 1000 } ], "rating" : 4.3, "reference" : "CoQBewAAAKOO2-503qHECL0IPTskEH4algxlBomAByUYLQB9UznvE7KJHUUby1Hh3g1kS-0S63RsUVQHj24kq0rieDDF5W6PZNGob6Gbt8a7o6amj1VjI_FhS2pvm6uSbzuQS33s7NnNU8IfbVM8bQlDjgmshDawl7bQGRmW8M4A0NSbMPlQEhDLjLRBtWj_YYq_qk7HGe6dGhREMmZpHIjSEzg4LIU6A6UG1tclvg", "types" : [ "airport", "transit_station", "establishment" ], "vicinity" : "Liverpool" }, { "geometry" : { "location" : { "lat" : 53.471439, "lng" : -2.389757 } }, "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/airport-71.png", "id" : "7daebd58d7c1ceed21144e199bb5f28a623ffa86", "name" : "City Airport & Heliport", "photos" : [ { "height" : 384, "html_attributions" : [], "photo_reference" : "CoQBcgAAACkmeo07b1LucvpZYpFltPyb22FwBpc59IWAp9MZPtO2LJmTlLHRa5ICgiuj6rkLZNm67LD6MkK8VKzwrZdRMi-0MSU3FcszADoGAgYugU4VovrBVGWJP1BOpYnUmLBsAqKtpyWCVsAPq8wFKfqc0TJQdu5SNrVCFj7JPEXAEk4aEhDss729m8IoXsy7rDWu4obYGhSrM9HK92kkDjzRnveyuZvZNMt9EA", "width" : 562 } ], "reference" : "CoQBdgAAAIEpHYaJS1_G92WLYaYRmY06zWs9HYU0aTi27tx1TY7VYSVcSpLpSm-H4wTV9ZWRB7oaUE5LGtyEJjaFBaDuTakG2nr781Fw4O2au_VKqzPgVMiFBc9EL5nxnRzsY167LitNT2N-ZBve_SqPu0GIMNni5DPJbvJ9LFiX27KUiKrLEhDVY6MAuH5xdw3ZXPqkyyZNGhQKMys-poFZNDzGcfDepLnmIOU5CQ", "types" : [ "airport", "transit_station", "establishment" ], "vicinity" : "Liverpool Road, Eccles, Manchester" }, { "geometry" : { "location" : { "lat" : 53.183635, "lng" : -2.97679 } }, "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/airport-71.png", "id" : "0ed0528b4179965a98245cef6cc7affe01fb31aa", "name" : "Hawarden Airport", "reference" : "CnRvAAAAAWAVHELGv1BZM3_1nLb372rAokLjDh4JIrkR--Bk-nd-lU1ZYdzPGka9D1b5oNL1_yg3J1bXZNoaurKFQ4DZdGq4c5qenKt6V5YGUT-8XFcHxIN-D788iijcCBr0n_nvMCjKofHN3GR4JKlm3wYrxBIQEybuky1Nsv97a0KEULQkzRoUXTFeJ4WyBLKgcLkxWa63XMzQFuE", "types" : [ "airport", "transit_station", "establishment" ], "vicinity" : "Aviation Park, Flint Road, Chester, Saltney Ferry" }, { "geometry" : { "location" : { "lat" : 53.749949, "lng" : -2.892395 } }, "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/airport-71.png", "id" : "babcbeab7778f7d3a4957d9518d4cd19d11b302a", "name" : "Warton Aerodrome", "reference" : "CnRvAAAAzswi8WuRk7nNdRENfOKO8R6UjQuR77_uAaWQcb6c-c1o-HITVvu-39HYmFR2IKtuvsf6nZ3OfT7MEiLb5CtSMwdJbAEm0qT05WN14kTCQpU-gdJNAfC2oqyvXMfLtZAKq3vANp_c2FosEW23Rx3ThRIQ8Imvo7Ytfq-FcVqnkNAA_xoUeFul6NT0Umif-0r07esf6dcvTL0", "types" : [ "airport", "transit_station", "establishment" ], "vicinity" : "Preston Lancashire PR4 1AX" }, { "geometry" : { "location" : { "lat" : 53.86797, "lng" : -1.659131 } }, "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/airport-71.png", "id" : "bc0b4e5477c533cce252d22992e27ed3fb2fbca4", "name" : "Leeds Bradford International Airport", "opening_hours" : { "open_now" : true }, "photos" : [ { "height" : 1296, "html_attributions" : [ "From a Google User" ], "photo_reference" : "CpQBiQAAAF62pVMvZXLGYJufgF3PhW0F-qq_4kKhG_LnijydebpcFFuKOVrN9b0F2GbmlE4dhpyD-vyp2rG9uwHUBEnZ72lOBv_Y-AwVCvTrRHu7l21kkiBz5Ub-khHKLI_IqYlh6MlYP7H3fxqf34NkOigK5PIzqmQoeo-l5wZpoPtfrKcWHLa9p6SStB8exn19j756ARIQ3EZ7dR3otU9dxaIli-iFwRoUyqi71WimATxknWLK8isgqVahuO0", "width" : 1944 } ], "rating" : 3.1, "reference" : "CpQBggAAANj1kfQ5WrE64BFJ2DvU-GGhuQyEYgAF2ZlHXYcNxEjnALYZszN-y4pziuxFrTxzxzScJo5R1-_OWbXZunG9IaYHgoLhzFiaw_Nt1a2S4KPSKhg8-gHvL0HWEyj2dp7wZVrNm3X1tr82ee6gZhbcE7deo6CH8fA_RlQAs3tzzXAPoQxsfGInbcmkDkRrlnJSvRIQ7iGLnxql2c1nWDooJUTaExoUgy4GqdLhy9qjzDRMAJqVq8Ao8EY", "types" : [ "airport", "transit_station", "establishment" ], "vicinity" : "Leeds" }, { "geometry" : { "location" : { "lat" : 53.302947, "lng" : -2.942836 } }, "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/airport-71.png", "id" : "f2cf644bb8dbce172b086605e4780ffaea4bb153", "name" : "Hooton Park Trust", "reference" : "CnRvAAAAzMkYiAP0N68Z735kuQBSy8FNgKll9QSkVMEp0-6INt7ZH5_K97gSMKFHCtBWC1LIj0tRV5maAWV8d-K50yTElE_TECJOhUt3IBFMhinNE4NPwHRBZSBzKzpzLPyh4Pfm-4fp6ejzNljZh4B3wjYk8RIQneIXicLTArAsAv-MdM9u3RoUA2I6smd-VDv9qxLraVoP3vcxiJI", "types" : [ "airport", "transit_station", "storage", "establishment" ], "vicinity" : "The Hangars, S Rd, Hooton, Ellesmere Port, Ellesmere Port" }, { "geometry" : { "location" : { "lat" : 53.773333, "lng" : -2.569444 } }, "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/airport-71.png", "id" : "d88735a8f58aec3026d19bfda53ef39ec47781af", "name" : "Samlesbury Aerodrome", "reference" : "CoQBcgAAAE6GEMos0ocarYcidPxzC0t8xPsHLkFs8lOLIyicWs7_AuJhjuNkFCSjrg7RuD_kpeqRI4h69ymMqsMD-JcRsJ57q6ZfqQoB7UpDG0N0dULOPx7WatQn_dMImPZw1-5ozEfTmGSG4mfI3XENofhQh-afQrL5Dq_ljPz9RRBtriUPEhDoTNI1A1dRIekLDF2J855nGhRqVMD_wUhA_ml36N8GLc2qNMT4nw", "types" : [ "airport", "transit_station", "establishment" ], "vicinity" : "" }, { "geometry" : { "location" : { "lat" : 53.621111, "lng" : -1.831667 } }, "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/airport-71.png", "id" : "d91dfe6d463dbee8b48cd3f160add26898e52b13", "name" : "Crosland Moor Airfield", "reference" : "CoQBdQAAAAEyehqv3oo1eybH8FqcugLn58RcAt9l12tTPylttEj3tHHHHG-N5sh5-1GaTzp6we9hPSm4Jcf0Sa_8nFtVMNl5vbtV1Zt-kJkgCKXbmJonlXIvjCPvAfOdFtNKdDGvre4kb-oJCihNQklYWI4pA4z-XdJpp147EDppvqhN0hNAEhAz24k8-_o07-CAtH_6i6CqGhQJE-gr5UwpaO1YFnvZbVt7RdDAkQ", "types" : [ "airport", "transit_station", "establishment" ], "vicinity" : "" }, { "geometry" : { "location" : { "lat" : 53.129444, "lng" : -2.895 } }, "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/airport-71.png", "id" : "af3ed8258f146ba0b52a3a70311c0778fe65c42c", "name" : "RAF Poulton", "reference" : "CnRpAAAAjX43YRMJA6tcr47evoND5loCAQcgouHPyd5PR54oHvfCLCmONzmlLwbrPcdFsARtPdhnylgGEdOBtzIQrxAbYcL6g7-AyF-Z5kAKhlH1EI8MEo-71dD8fdvmAs5RnSm3HK7pVAy5xr6EsKFqhai3zxIQznzrdK7ld7CMFGDgCErz-xoUSGbZu9FhGzv_58Dqcsh1sE3At4o", "types" : [ "airport", "transit_station", "establishment" ], "vicinity" : "United Kingdom" }, { "geometry" : { "location" : { "lat" : 53.336966, "lng" : -2.149667 } }, "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/airport-71.png", "id" : "3f51060f5d8ce861066c44ac1ec9258704b5dec0", "name" : "Woodford Aerodrome", "photos" : [ { "height" : 962, "html_attributions" : [ "From a Google User" ], "photo_reference" : "CnRwAAAAS9Szdk9cRZUJvKPH4GWTWJ2cqStFcXpbfBOuXmABq_FhfzhaOSKGZNs_45KecA-tZVGNsMqjm6sDvyLWykeGgpFCpOm22OzDihm47Bje8XXWQksZ_jSo0E4EODdNDIYZTM_ERUlDWGoYO3zsiGREzBIQIsmYDK5iPCKEdWjhNC7nDxoUZIPTRzQzUslbeuqsDFUH3hrye_4", "width" : 3262 } ], "reference" : "CnRwAAAAciVXDRbUXCGxHfu8nXoqsSFmK_z07XyG0V9XinGpiwVZJjSGzWm8SdD7-e3xkXLZQqjbaGGmnJPR0e4SzemhY0_XvzUVH0JDjJMbzZR6F7dSbvg3PRwV303zQ93vxJvfbsI3ddTFCjveyejanjvMMBIQekgutRtCW2-Xscz5tIi3pxoUUNxYjvo6sxogRaET7-oR6ie49oA", "types" : [ "airport", "transit_station", "establishment" ], "vicinity" : "Woodford" }, { "geometry" : { "location" : { "lat" : 53.549632, "lng" : -2.396076 } }, "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/airport-71.png", "id" : "159197c5b33751eaf688fc7c850a90509e31b96d", "name" : "Village Cars", "reference" : "CnRrAAAANx-JLsIwUdTaxBj2LKvTB3Y_Fs2kzozi_InMIs-sYVBoCJW7pw4SgnoZhDMiVEsBzUhk-tQtFpdHkZLv9ojKCeEhpOd_uOt11UTDLzK7YJKOys03NlJtxXm91S3MuEd9fZJ6seWKSrsDO85-euNRgBIQP8224SBJuleyXZtJfUjfIRoUE0MSuzUxRHOXIJr5pTzEqub8xXY", "types" : [ "airport", "transit_station", "establishment" ], "vicinity" : "Bank Street, Farnworth, Bolton" }, { "geometry" : { "location" : { "lat" : 53.133333, "lng" : -2.933333 } }, "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/airport-71.png", "id" : "1dbf94dc4bc875e51fe78a49d4f667d4d26d56ec", "name" : "Chester Harwarden", "reference" : "CnRwAAAAQ1WpZ66ijT886HWUE5c9ioIdzwS_uHHiuUBvu5motIeiB2Sx7VjPbepJGRFmd8WXpxxmZreMBL13YUTr9WJ35xSxEGtswkYdQWalfbGZkCuTpzl1dzQDVpxW23UoIN004XF8iz3H3_8yVvJiVgxG-xIQHMLmaTMrEAIBnwKwVYRMyBoUD9ea5nEOLYNKc89mNhMmXgIjZyE", "types" : [ "airport", "transit_station", "establishment" ], "vicinity" : "United Kingdom" }, { "geometry" : { "location" : { "lat" : 53.801344, "lng" : -1.707575 } }, "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/airport-71.png", "id" : "79018e9a1093bc0a49dd33f2f508bd6840795ef8", "name" : "Leeds & Bradford", "reference" : "CnRuAAAAUZOF8pkQEsX8sjW_JysUjRgT7wYlKocYIROvCGTDbcZsSn1Ynwjgci1cXfQLeuC9cxIQLAi3H7s8x1H4DXZ-JWhIpN7nv3WIPHiEw4RGV_gHPoK15xf3KnNVgNbXDTTUcBXppiWnUWEpYm_3mDi27xIQbKVSpDMdeYQ57AMRYXmPORoUO5HhhSQElcaw6HMj2E_YIQ6jL0c", "types" : [ "airport", "transit_station", "establishment" ], "vicinity" : "1049 Leeds Road, Bradford" }, { "geometry" : { "location" : { "lat" : 53.603097, "lng" : -2.175364 } }, "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/airport-71.png", "id" : "fed5bdd6051e661dd7904b9a17d9e53966fff661", "name" : "Castle Private Hire", "photos" : [ { "height" : 640, "html_attributions" : [], "photo_reference" : "CoQBeAAAAA5n5nahe2JH_Xlayx9nXRqGV9QcTYEO4xMG-kJJcA9KpNM5Diz6Kr4xOEJWP7fUIYLdC5QJNcg8S1I63W3x-o63_U4fbt0ZAJjVa5OKL-zsQfzyCV1k9L5e57ifB1XZ4KWmK_GyuC5DS1vtDdaOdU3WaL2c_yGox538Pj2EYxAPEhD7hG_Wtc8uihiuKKzfDXopGhQ0riraMoVdT6l0iaxf1w4zWKVg6g", "width" : 480 } ], "reference" : "CoQBcQAAAANNqBWD5Jkz8pA-8RaBlASHnmuR0SX5acSjxDQBE5fEg1duTSciGwpdcynh-IXldjduPwlw-FpoesoGaexpY5N1tPIob3fq3jKUoZG4nkrY8oCFjZFDblZFPpoPGHPXqKZ5h7zaZYZkNOfM5QKNfSudtO5qrKarAfVQZ3GLCKmeEhAZVUw0eJtyL6CZ9m09XfX0GhTOii-MyMY14yjqTnPfv3cMnlBFlQ", "types" : [ "parking", "airport", "transit_station", "establishment" ], "vicinity" : "Manchester Road, Rochdale" }, { "geometry" : { "location" : { "lat" : 53.652832, "lng" : -2.619733 } }, "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/airport-71.png", "id" : "2d2aa6b1729a10f272b68a20963d536ddcd9ebb8", "name" : "Aby Taxis Chorley", "opening_hours" : { "open_now" : true }, "photos" : [ { "height" : 1429, "html_attributions" : [], "photo_reference" : "CnRnAAAAghnf2J1DUKozKMY2Yg5Eo1iwuv0bjra4r6lgVd_Eik8umR-CCD9HCKR2uS9oZT2H8b5bPAXQQP5iIBZP8dHxviU_3rKd_OMpsqcT3yu1hRl1j12O2dl8TXWbpkCtM-7cRhKoT61UkeKoLM-9PlU0mxIQlxiEC9uBNf0AY3dZSh3lvxoUDOECqEDmRNwsMav1Kx8k7aENSWQ", "width" : 2048 } ], "reference" : "CnRwAAAAKZezb_351bcavFaP6C69EtFwilhW1Zx_g578C_ObzJ5Z3Lg2cjJ7op6j-eD8rf-X-WT8kJg9YSDVtWGgsTh3wWTUY9JgortGcuAD-e9GKcgFWWNTkLmu950Ki6jXDBZ2AQ-3TIwNxRyNuRibwQWs-xIQnrEBBTviizZ84tYpPtXV4xoUbtEkd46TMElryZuYBUtq6q7Tq_E", "types" : [ "airport", "transit_station", "establishment" ], "vicinity" : "Chorley" }, { "geometry" : { "location" : { "lat" : 53.469934, "lng" : -2.387571 } }, "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/airport-71.png", "id" : "7bbdf02980e41b91845ea6018f90d679b4327ac8", "name" : "Helicopter Pleasure Flights", "opening_hours" : { "open_now" : false }, "reference" : "CoQBeQAAAIhkD9jvSNlh9EHmOMbnibzDG8eGTgb4ZocZLsQ5Kw0TTnNFw921KW9Dsb1VWz_a87ExFfkCjzD1-J5br-e2HIQtaikQAXZZOhyNlRMFB7eu4C1ndRFZbhOkBSr49spwcfaRAtf42N_lZ6Oj5ZpcOHLChst_Qk5JH94GCe7gDV4EEhD9brRLAZe5utOvB2E36YyBGhRen5ItLtUCVJ5g-wHgjCCTmSO4jA", "types" : [ "airport", "transit_station", "establishment" ], "vicinity" : "Barton Aerodrome, Manchester" }, { "geometry" : { "location" : { "lat" : 53.366105, "lng" : -2.081946 } }, "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/airport-71.png", "id" : "8b9f39d5e10ddfd0652b01562970ec96276482dc", "name" : "Fine Choice Travel", "reference" : "CnRwAAAAVu8F7ibhBGQCTF_o04Dkb-2f9yIVbYfgKAN0i6fEq5dzcQk_uHuLFetn1g_d6Bmih-9XgjC3y95iK_acJZR8RARXez4NWta1U4AODjAXRI-OkgjimrKjyZ4iOFtErdTrGwJI3XFZo7gjlqaU0Ud9thIQVKVdMvcZBAbyhlrzuvnQthoUFU6muEfB_WsrFt3FxQtGFRan-H4", "types" : [ "airport", "transit_station", "establishment" ], "vicinity" : "Buxton Road, High Lane, Stockport" }, { "geometry" : { "location" : { "lat" : 53.549632, "lng" : -2.396076 } }, "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/airport-71.png", "id" : "9f505cabdadb7197ffb84b818acdc3ac3fce45cc", "name" : "S & D Priavte Hire", "reference" : "CnRwAAAA57D6FFH01Gxgk7BqGYjfUfSRcaAwMRHCwDV5CvtAQeO75PQCCU5w-Duk8wlKKnAlRBj3twp6Nk5ku82FjTPJqoREtFTq5Pflns7qgmL93OGqLWX9CX20rVGsbMjCEfnsssffV6BHbCSAwXL56Ur57xIQbuFgTNy6Ysa1RM7fB9LMdBoU1PP_HQGM2S2HiDy97xb3erTDCXA", "types" : [ "airport", "transit_station", "establishment" ], "vicinity" : "Bank Street, Farnworth, Bolton" }, { "geometry" : { "location" : { "lat" : 53.543852, "lng" : -2.092759 } }, "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/airport-71.png", "id" : "3769101d2c781c74a23a184c2e931f546b83ed52", "name" : "Delta Obstruction Lights", "photos" : [ { "height" : 259, "html_attributions" : [], "photo_reference" : "CpQBhQAAAMm3QQydjgXQ4cd996TJZ_KTIPYBVpKR2K6nVbvZyi7bdzEYZecpeEs4FlRx796E_2yZKRYr4trVevDJHg11sgAVvqn7xgygZ1xGy0oFDiZTj8ikMJ_7TMpWcJEjDOmgkv2Wqh1YXy502jD5tjkNClraff4heeMA3CH8_URQ-QaR_tcClWKJxvMw6Tf98a5a8hIQj9xluQBkkLIKdQGJ3FsVaBoUH2pgm1XpBrehHstpqcuiSMiTe6E", "width" : 347 } ], "reference" : "CoQBdgAAAP7JN5C5kKKScx7b6bWhs_g9tH5CcvOZRcKssI4oO-kX2Yr9cpqQ-5DuKeYJMT7yO2T8aGkKbg3HsMuI3KH14QD2qWiWosnVab7mA6keu0q_RIBmCcQkcYWiKx-rNYipeHFCEE6av2tbVfL4PQ47hrVbIeCWyvTHfeakCeUKotKfEhAt41gGOlRImOYEp-aQjBOfGhQTP0AMqWPawIhX5UBOJPE3fVgutA", "types" : [ "airport", "transit_station", "establishment" ], "vicinity" : "Delta House, Wrigley Street, Oldham" } ], "status" : "OK" } 

Here is the same query, but I am trying to rank them by distance, so I take rankby = distance, and for this I have to remove the radius parameter (as the API says).

https://maps.googleapis.com/maps/api/place/nearbysearch/json?key=YOUR_PLACES_API_KEY_HERE&location=53.48,-2.24&sensor=true&rankby=distance&language=en&types=airport

This means that I have to get the same results as above, but with results estimated by distance. As you can see below, there must be something really wrong in the API, I'm sure that I'm not doing anything wrong, I'm really sorry that I'm wrong.

 { "debug_info" : [], "html_attributions" : [], "results" : [ { "geometry" : { "location" : { "lat" : 53.479251, "lng" : -2.247926 } }, "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/airport-71.png", "id" : "5b6645fe6106f298ea4668af5c64aaa1b5f80fec", "name" : "Woodford", "photos" : [ { "height" : 511, "html_attributions" : [ "\u003ca href=\"https://plus.google.com/112380730971739255491\"\u003emadiha hammad\u003c/a\u003e" ], "photo_reference" : "CnRoAAAAVF8nRYcq0RxpyvxBSwXzVeZ6TNDhvcks4ohzofGBNN7Ty3EMQZ_Btl3pmaZjpKcGeEO78QJXEVFrh5pfuN_q7cNw1S74tbPq1wCH5b5zkxWIThIis_cuTXLsz7goPRT4GgUqfXvDnweesi6pofi0rRIQ6InuLRZas62Q4W8EO1Vl2RoUjxBe5uOgi7V5XpF6MceHVCg7Ot0", "width" : 348 } ], "reference" : "CnRnAAAA9WeWDs3Ua3ZhCMNY1MuYvBSuYNtLLE3aXySf_HUAiBynuwwKYMTGRIkIYeKUTWqO7LGCPNgF8Lh0aDkhFEhzkSvVvdtRQM6KnO0xEYC44wljANW4nYPV_2pJ_3tuLedgwP8AECT3dsnMlfhaVxpXIhIQ_rRFlMrjmL7YOFlMr3myURoU-5h4gwg5FnbUAYaFLLobyE2cKZA", "types" : [ "airport", "transit_station", "establishment" ], "vicinity" : "Manchester" } ], "status" : "OK" } ", { "debug_info" : [], "html_attributions" : [], "results" : [ { "geometry" : { "location" : { "lat" : 53.479251, "lng" : -2.247926 } }, "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/airport-71.png", "id" : "5b6645fe6106f298ea4668af5c64aaa1b5f80fec", "name" : "Woodford", "photos" : [ { "height" : 511, "html_attributions" : [ "\u003ca href=\"https://plus.google.com/112380730971739255491\"\u003emadiha hammad\u003c/a\u003e" ], "photo_reference" : "CnRoAAAAVF8nRYcq0RxpyvxBSwXzVeZ6TNDhvcks4ohzofGBNN7Ty3EMQZ_Btl3pmaZjpKcGeEO78QJXEVFrh5pfuN_q7cNw1S74tbPq1wCH5b5zkxWIThIis_cuTXLsz7goPRT4GgUqfXvDnweesi6pofi0rRIQ6InuLRZas62Q4W8EO1Vl2RoUjxBe5uOgi7V5XpF6MceHVCg7Ot0", "width" : 348 } ], "reference" : "CnRnAAAA9WeWDs3Ua3ZhCMNY1MuYvBSuYNtLLE3aXySf_HUAiBynuwwKYMTGRIkIYeKUTWqO7LGCPNgF8Lh0aDkhFEhzkSvVvdtRQM6KnO0xEYC44wljANW4nYPV_2pJ_3tuLedgwP8AECT3dsnMlfhaVxpXIhIQ_rRFlMrjmL7YOFlMr3myURoU-5h4gwg5FnbUAYaFLLobyE2cKZA", "types" : [ "airport", "transit_station", "establishment" ], "vicinity" : "Manchester" } ], "status" : "OK" } 
0
source share

Source: https://habr.com/ru/post/1262808/


All Articles