UNPKG

go-jsbox-location

Version:
1,180 lines (1,176 loc) 91.1 kB
module.exports = function() { return [ { "request": { "method": "GET", "url": "http://maps.googleapis.com/maps/api/geocode/json", "params": { address:'agx' } }, "response": { "code": 200, "data": { "results" : [], "status" : "ZERO_RESULTS" } } }, { "request": { "method": "GET", "url": "http://maps.googleapis.com/maps/api/geocode/json", "params": { address:'agy' } }, "response": { "code": 200, "data": { "results" : [], "status" : "ZERO_RESULTS" } } }, { "request": { "method": "GET", "url": "http://maps.googleapis.com/maps/api/geocode/json", "params": { address:'no_data' } }, "response": { "code": 200, // data attribute is missing } }, { "request": { "method": "GET", "url": "http://maps.googleapis.com/maps/api/geocode/json", "params": { address:'Friend Street' } }, "response": { "code": 200, "data": { "results" : [ { "address_components" : [ { "long_name" : "Friend Street", "short_name" : "Friend St", "types" : [ "route" ] }, { "long_name" : "Amesbury", "short_name" : "Amesbury", "types" : [ "locality", "political" ] }, { "long_name" : "Essex County", "short_name" : "Essex County", "types" : [ "administrative_area_level_2", "political" ] }, { "long_name" : "Massachusetts", "short_name" : "MA", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "United States", "short_name" : "US", "types" : [ "country", "political" ] }, { "long_name" : "01913", "short_name" : "01913", "types" : [ "postal_code" ] } ], "formatted_address" : "Friend Street, Amesbury, MA 01913, USA", "geometry" : { "bounds" : { "northeast" : { "lat" : 42.857408, "lng" : -70.9308506 }, "southwest" : { "lat" : 42.8532, "lng" : -70.94641539999999 } }, "location" : { "lat" : 42.8550001, "lng" : -70.9383138 }, "location_type" : "GEOMETRIC_CENTER", "viewport" : { "northeast" : { "lat" : 42.857408, "lng" : -70.9308506 }, "southwest" : { "lat" : 42.8532, "lng" : -70.94641539999999 } } }, "types" : [ "route" ] }, { "address_components" : [ { "long_name" : "Friend Street", "short_name" : "Friend St", "types" : [ "route" ] }, { "long_name" : "Adams", "short_name" : "Adams", "types" : [ "locality", "political" ] }, { "long_name" : "Berkshire County", "short_name" : "Berkshire County", "types" : [ "administrative_area_level_2", "political" ] }, { "long_name" : "Massachusetts", "short_name" : "MA", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "United States", "short_name" : "US", "types" : [ "country", "political" ] }, { "long_name" : "01220", "short_name" : "01220", "types" : [ "postal_code" ] } ], "formatted_address" : "Friend Street, Adams, MA 01220, USA", "geometry" : { "bounds" : { "northeast" : { "lat" : 42.63718799999999, "lng" : -73.1129541 }, "southwest" : { "lat" : 42.6279006, "lng" : -73.12540349999999 } }, "location" : { "lat" : 42.632345, "lng" : -73.117998 }, "location_type" : "GEOMETRIC_CENTER", "viewport" : { "northeast" : { "lat" : 42.63718799999999, "lng" : -73.1129541 }, "southwest" : { "lat" : 42.6279006, "lng" : -73.12540349999999 } } }, "types" : [ "route" ] }, { "address_components" : [ { "long_name" : "Friend Street", "short_name" : "Friend St", "types" : [ "route" ] }, { "long_name" : "Berkley", "short_name" : "Berkley", "types" : [ "locality", "political" ] }, { "long_name" : "Bristol County", "short_name" : "Bristol County", "types" : [ "administrative_area_level_2", "political" ] }, { "long_name" : "Massachusetts", "short_name" : "MA", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "United States", "short_name" : "US", "types" : [ "country", "political" ] }, { "long_name" : "02779", "short_name" : "02779", "types" : [ "postal_code" ] } ], "formatted_address" : "Friend Street, Berkley, MA 02779, USA", "geometry" : { "bounds" : { "northeast" : { "lat" : 41.8146076, "lng" : -71.0828413 }, "southwest" : { "lat" : 41.811129, "lng" : -71.0966797 } }, "location" : { "lat" : 41.8135507, "lng" : -71.089743 }, "location_type" : "GEOMETRIC_CENTER", "viewport" : { "northeast" : { "lat" : 41.8146076, "lng" : -71.0828413 }, "southwest" : { "lat" : 41.811129, "lng" : -71.0966797 } } }, "types" : [ "route" ] }, { "address_components" : [ { "long_name" : "Friend Street", "short_name" : "Friend St", "types" : [ "route" ] }, { "long_name" : "Downtown", "short_name" : "Downtown", "types" : [ "neighborhood", "political" ] }, { "long_name" : "Boston", "short_name" : "Boston", "types" : [ "locality", "political" ] }, { "long_name" : "Suffolk County", "short_name" : "Suffolk County", "types" : [ "administrative_area_level_2", "political" ] }, { "long_name" : "Massachusetts", "short_name" : "MA", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "United States", "short_name" : "US", "types" : [ "country", "political" ] }, { "long_name" : "02114", "short_name" : "02114", "types" : [ "postal_code" ] } ], "formatted_address" : "Friend Street, Boston, MA 02114, USA", "geometry" : { "bounds" : { "northeast" : { "lat" : 42.3652221, "lng" : -71.059566 }, "southwest" : { "lat" : 42.3631797, "lng" : -71.0618336 } }, "location" : { "lat" : 42.36398579999999, "lng" : -71.06047839999999 }, "location_type" : "GEOMETRIC_CENTER", "viewport" : { "northeast" : { "lat" : 42.3655498802915, "lng" : -71.0593508197085 }, "southwest" : { "lat" : 42.3628519197085, "lng" : -71.06204878029151 } } }, "types" : [ "route" ] }, { "address_components" : [ { "long_name" : "Friend Street", "short_name" : "Friend St", "types" : [ "route" ] }, { "long_name" : "Ashland", "short_name" : "Ashland", "types" : [ "locality", "political" ] }, { "long_name" : "Englewood", "short_name" : "Englewood", "types" : [ "administrative_area_level_3", "political" ] }, { "long_name" : "Clark County", "short_name" : "Clark County", "types" : [ "administrative_area_level_2", "political" ] }, { "long_name" : "Kansas", "short_name" : "KS", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "United States", "short_name" : "US", "types" : [ "country", "political" ] }, { "long_name" : "67831", "short_name" : "67831", "types" : [ "postal_code" ] } ], "formatted_address" : "Friend Street, Ashland, KS 67831, USA", "geometry" : { "bounds" : { "northeast" : { "lat" : 37.042462, "lng" : -99.979399 }, "southwest" : { "lat" : 37.0422719, "lng" : -99.994907 } }, "location" : { "lat" : 37.0423899, "lng" : -99.98710509999999 }, "location_type" : "GEOMETRIC_CENTER", "viewport" : { "northeast" : { "lat" : 37.0437159302915, "lng" : -99.979399 }, "southwest" : { "lat" : 37.0410179697085, "lng" : -99.994907 } } }, "types" : [ "route" ] }, { "address_components" : [ { "long_name" : "Friend Street", "short_name" : "Friend St", "types" : [ "route" ] }, { "long_name" : "Newberry", "short_name" : "Newberry", "types" : [ "locality", "political" ] }, { "long_name" : "Newberry County", "short_name" : "Newberry County", "types" : [ "administrative_area_level_2", "political" ] }, { "long_name" : "South Carolina", "short_name" : "SC", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "United States", "short_name" : "US", "types" : [ "country", "political" ] }, { "long_name" : "29108", "short_name" : "29108", "types" : [ "postal_code" ] } ], "formatted_address" : "Friend Street, Newberry, SC 29108, USA", "geometry" : { "bounds" : { "northeast" : { "lat" : 34.2756823, "lng" : -81.61442959999999 }, "southwest" : { "lat" : 34.2726956, "lng" : -81.6221228 } }, "location" : { "lat" : 34.2740711, "lng" : -81.6185488 }, "location_type" : "GEOMETRIC_CENTER", "viewport" : { "northeast" : { "lat" : 34.2756823, "lng" : -81.61442959999999 }, "southwest" : { "lat" : 34.2726956, "lng" : -81.6221228 } } }, "types" : [ "route" ] }, { "address_components" : [ { "long_name" : "Friend Street", "short_name" : "Friend St", "types" : [ "route" ] }, { "long_name" : "Cottonwood Falls", "short_name" : "Cottonwood Falls", "types" : [ "locality", "political" ] }, { "long_name" : "Falls", "short_name" : "Falls", "types" : [ "administrative_area_level_3", "political" ] }, { "long_name" : "Chase County", "short_name" : "Chase County", "types" : [ "administrative_area_level_2", "political" ] }, { "long_name" : "Kansas", "short_name" : "KS", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "United States", "short_name" : "US", "types" : [ "country", "political" ] }, { "long_name" : "66845", "short_name" : "66845", "types" : [ "postal_code" ] } ], "formatted_address" : "Friend Street, Cottonwood Falls, KS 66845, USA", "geometry" : { "bounds" : { "northeast" : { "lat" : 38.3721102, "lng" : -96.53895079999999 }, "southwest" : { "lat" : 38.3718466, "lng" : -96.54681869999999 } }, "location" : { "lat" : 38.371972, "lng" : -96.542706 }, "location_type" : "GEOMETRIC_CENTER", "viewport" : { "northeast" : { "lat" : 38.37332738029151, "lng" : -96.53895079999999 }, "southwest" : { "lat" : 38.37062941970851, "lng" : -96.54681869999999 } } }, "types" : [ "route" ] }, { "address_components" : [ { "long_name" : "Friend Street", "short_name" : "Friend St", "types" : [ "route" ] }, { "long_name" : "Gloucester", "short_name" : "Gloucester", "types" : [ "locality", "political" ] }, { "long_name" : "Essex County", "short_name" : "Essex County", "types" : [ "administrative_area_level_2", "political" ] }, { "long_name" : "Massachusetts", "short_name" : "MA", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "United States", "short_name" : "US", "types" : [ "country", "political" ] }, { "long_name" : "01930", "short_name" : "01930", "types" : [ "postal_code" ] } ], "formatted_address" : "Friend Street, Gloucester, MA 01930, USA", "geometry" : { "bounds" : { "northeast" : { "lat" : 42.6201099, "lng" : -70.651583 }, "southwest" : { "lat" : 42.616184, "lng" : -70.656471 } }, "location" : { "lat" : 42.6180743, "lng" : -70.6539937 }, "location_type" : "GEOMETRIC_CENTER", "viewport" : { "northeast" : { "lat" : 42.6201099, "lng" : -70.651583 }, "southwest" : { "lat" : 42.616184, "lng" : -70.656471 } } }, "types" : [ "route" ] }, { "address_components" : [ { "long_name" : "Friend Street", "short_name" : "Friend St", "types" : [ "route" ] }, { "long_name" : "Pittston", "short_name" : "Pittston", "types" : [ "locality", "political" ] }, { "long_name" : "Jenkins", "short_name" : "Jenkins", "types" : [ "administrative_area_level_3", "political" ] }, { "long_name" : "Luzerne County", "short_name" : "Luzerne County", "types" : [ "administrative_area_level_2", "political" ] }, { "long_name" : "Pennsylvania", "short_name" : "PA", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "United States", "short_name" : "US", "types" : [ "country", "political" ] }, { "long_name" : "18640", "short_name" : "18640", "types" : [ "postal_code" ] } ], "formatted_address" : "Friend Street, Pittston, PA 18640, USA", "geometry" : { "bounds" : { "northeast" : { "lat" : 41.3112973, "lng" : -75.81023499999999 }, "southwest" : { "lat" : 41.309068, "lng" : -75.815286 } }, "location" : { "lat" : 41.3098043, "lng" : -75.81292739999999 }, "location_type" : "GEOMETRIC_CENTER", "viewport" : { "northeast" : { "lat" : 41.3115316302915, "lng" : -75.81023499999999 }, "southwest" : { "lat" : 41.3088336697085, "lng" : -75.815286 } } }, "types" : [ "route" ] }, { "address_components" : [ { "long_name" : "Friend Street", "short_name" : "Friend St", "types" : [ "route" ] }, { "long_name" : "Soldier", "short_name" : "Soldier", "types" : [ "locality", "political" ] }, { "long_name" : "Soldier", "short_name" : "Soldier", "types" : [ "administrative_area_level_3", "political" ] }, { "long_name" : "Jackson County", "short_name" : "Jackson County", "types" : [ "administrative_area_level_2", "political" ] }, { "long_name" : "Kansas", "short_name" : "KS", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "United States", "short_name" : "US", "types" : [ "country", "political" ] }, { "long_name" : "66540", "short_name" : "66540", "types" : [ "postal_code" ] } ], "formatted_address" : "Friend Street, Soldier, KS 66540, USA", "geometry" : { "bounds" : { "northeast" : { "lat" : 39.5391041, "lng" : -95.9635323 }, "southwest" : { "lat" : 39.5390402, "lng" : -95.96936649999999 } }, "location" : { "lat" : 39.5390666, "lng" : -95.96570269999999 }, "location_type" : "GEOMETRIC_CENTER", "viewport" : { "northeast" : { "lat" : 39.54042113029149, "lng" : -95.9635323 }, "southwest" : { "lat" : 39.53772316970849, "lng" : -95.96936649999999 } } }, "types" : [ "route" ] }, { "address_components" : [ { "long_name" : "Friend Street", "short_name" : "Friend St", "types" : [ "route" ] }, { "long_name" : "Worthington", "short_name" : "Worthington", "types" : [ "locality", "political" ] }, { "long_name" : "Jefferson", "short_name" : "Jefferson", "types" : [ "administrative_area_level_3", "political" ] }, { "long_name" : "Greene County", "short_name" : "Greene County", "types" : [ "administrative_area_level_2", "political" ] }, { "long_name" : "Indiana", "short_name" : "IN", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "United States", "short_name" : "US", "types" : [ "country", "political" ] }, { "long_name" : "47471", "short_name" : "47471", "types" : [ "postal_code" ] } ], "formatted_address" : "Friend Street, Worthington, IN 47471, USA", "geometry" : { "bounds" : { "northeast" : { "lat" : 39.1164176, "lng" : -86.97477310000001 }, "southwest" : { "lat" : 39.1156946, "lng" : -86.97917939999999 } }, "location" : { "lat" : 39.1156964, "lng" : -86.9771406 }, "location_type" : "GEOMETRIC_CENTER", "viewport" : { "northeast" : { "lat" : 39.1174050802915, "lng" : -86.97477310000001 }, "southwest" : { "lat" : 39.1147071197085, "lng" : -86.97917939999999 } } }, "types" : [ "route" ] }, { "address_components" : [ { "long_name" : "Friend Street", "short_name" : "Friend St", "types" : [ "route" ] }, { "long_name" : "Ludlow Falls", "short_name" : "Ludlow Falls", "types" : [ "locality", "political" ] }, { "long_name" : "Union", "short_name" : "Union", "types" : [ "administrative_area_level_3", "political" ] }, { "long_name" : "Miami County", "short_name" : "Miami County", "types" : [ "administrative_area_level_2", "political" ] }, { "long_name" : "Ohio", "short_name" : "OH", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "United States", "short_name" : "US", "types" : [ "country", "political" ] }, { "long_name" : "45339", "short_name" : "45339", "types" : [ "postal_code" ] } ], "formatted_address" : "Friend Street, Ludlow Falls, OH 45339, USA", "geometry" : { "bounds" : { "northeast" : { "lat" : 40.0001919, "lng" : -84.3383023 }, "southwest" : { "lat" : 39.9991404, "lng" : -84.342552 } }, "location" : { "lat" : 39.99972959999999, "lng" : -84.3402258 }, "location_type" : "GEOMETRIC_CENTER", "viewport" : { "northeast" : { "lat" : 40.0010151302915, "lng" : -84.3383023 }, "southwest" : { "lat" : 39.9983171697085, "lng" : -84.342552 } } }, "types" : [ "route" ] }, { "address_components" : [ { "long_name" : "Friend Street", "short_name" : "Friend St", "types" : [ "route" ] }, { "long_name" : "Marianna", "short_name" : "Marianna", "types" : [ "locality", "political" ] }, { "long_name" : "Jackson County", "short_name" : "Jackson County", "types" : [ "administrative_area_level_2", "political" ] }, { "long_name" : "Florida", "short_name" : "FL", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "United States", "short_name" : "US", "types" : [ "country", "political" ] }, { "long_name" : "32448", "short_name" : "32448", "types" : [ "postal_code" ] } ], "formatted_address" : "Friend Street, Marianna, FL 32448, USA", "geometry" : { "bounds" : { "northeast" : { "lat" : 30.7772775, "lng" : -85.24570299999999 }, "southwest" : { "lat" : 30.772682, "lng" : -85.246239 } }, "location" : { "lat" : 30.7753978, "lng" : -85.24608769999999 }, "location_type" : "GEOMETRIC_CENTER", "viewport" : { "northeast" : { "lat" : 30.7772775, "lng" : -85.2446220197085 }, "southwest" : { "lat" : 30.772682, "lng" : -85.24731998029151 } } }, "types" : [ "route" ] }, { "address_components" : [ { "long_name" : "Friend Street", "short_name" : "Friend St", "types" : [ "route" ] }, { "long_name" : "Lodgepole", "short_name" : "Lodgepole", "types" : [ "locality", "political" ] }, { "long_name" : "Lodgepole", "short_name" : "Lodgepole", "types" : [ "administrative_area_level_3", "political" ] }, { "long_name" : "Cheyenne County", "short_name" : "Cheyenne County", "types" : [ "administrative_area_level_2", "political" ] }, { "long_name" : "Nebraska", "short_name" : "NE", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "United States", "short_name" : "US", "types" : [ "country", "political" ] }, { "long_name" : "69149", "short_name" : "69149", "types" : [ "postal_code" ] } ], "formatted_address" : "Friend Street, Lodgepole, NE 69149, USA", "geometry" : { "bounds" : { "northeast" : { "lat" : 41.15826, "lng" : -102.7647541 }, "southwest" : { "lat" : 41.155111, "lng" : -102.7647935 } }, "location" : { "lat" : 41.1563343, "lng" : -102.7647811 }, "location_type" : "GEOMETRIC_CENTER", "viewport" : { "northeast" : { "lat" : 41.15826, "lng" : -102.7634248197085 }, "southwest" : { "lat" : 41.155111, "lng" : -102.7661227802915 } } }, "types" : [ "route" ] }, { "address_components" : [ { "long_name" : "Friend Street", "short_name" : "Friend St", "types" : [ "route" ] }, { "long_name" : "Penn", "short_name" : "Penn", "types" : [ "neighborhood", "political" ] }, { "long_name" : "Coulee", "short_name" : "Coulee", "types" : [ "administrative_area_level_3", "political" ] }, { "long_name" : "Ramsey County", "short_name" : "Ramsey County", "types" : [ "administrative_area_level_2", "political" ] }, { "long_name" : "North Dakota", "short_name" : "ND", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "United States", "short_name" : "US", "types" : [ "country", "political" ] }, { "long_name" : "58362", "short_name" : "58362", "types" : [ "postal_code" ] } ], "formatted_address" : "Friend Street, Penn, ND 58362, USA", "geometry" : { "bounds" : { "northeast" : { "lat" : 48.2237575, "lng" : -99.0865575 }, "southwest" : { "lat" : 48.2198366, "lng" : -99.08918079999999 } }, "location" : { "lat" : 48.2221769, "lng" : -99.08830139999999 }, "location_type" : "GEOMETRIC_CENTER", "viewport" : { "northeast" : { "lat" : 48.2237575, "lng" : -99.08652016970848 }, "southwest" : { "lat" : 48.2198366, "lng" : -99.0892181302915 } } }, "types" : [ "route" ] }, { "address_components" : [ { "long_name" : "Friend Street", "short_name" : "Friend St", "types" : [ "route" ] }, { "long_name" : "Hingham", "short_name" : "Hingham", "types" : [ "locality", "political" ] }, { "long_name" : "Plymouth County", "short_name" : "Plymouth County", "types" : [ "administrative_area_level_2", "political" ] }, { "long_name" : "Massachusetts", "short_name" : "MA", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "United States", "short_name" : "US", "types" : [ "country", "political" ] }, { "long_name" : "02043", "short_name" : "02043", "types" : [ "postal_code" ] } ], "formatted_address" : "Friend Street, Hingham, MA 02043, USA", "geometry" : { "bounds" : { "northeast" : { "lat" : 42.2164603, "lng" : -70.8846417 }, "southwest" : { "lat" : 42.2149993, "lng" : -70.8874761 } }, "location" : { "lat" : 42.2155905, "lng" : -70.8863492 }, "location_type" : "GEOMETRIC_CENTER", "viewport" : { "northeast" : { "lat" : 42.21707878029149, "lng" : -70.8846417 }, "southwest" : { "lat" : 42.2143808197085, "lng" : -70.8874761 } } }, "types" : [ "route" ] }, { "address_components" : [ { "long_name" : "Friend Street", "short_name" : "Friend St", "types" : [ "route" ] }, { "long_name" : "Liberty", "short_name" : "Liberty", "types" : [ "locality", "political" ] }, { "long_name" : "Liberty County", "short_name" : "Liberty County", "types" : [ "administrative_area_level_2", "political" ] }, { "long_name" : "Texas", "short_name" : "TX", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "United States", "short_name" : "US", "types" : [ "country", "political" ] }, { "long_name" : "77575", "short_name" : "77575", "types" : [ "postal_code" ] } ], "formatted_address" : "Friend Street, Liberty, TX 77575, USA", "geometry" : { "bounds" : { "northeast" : { "lat" : 30.0588303, "lng" : -94.7509336 }, "southwest" : { "lat" : 30.0573217, "lng" : -94.7526003 } }, "location" : { "lat" : 30.0579494, "lng" : -94.75216689999999 }, "location_type" : "GEOMETRIC_CENTER", "viewport" : { "northeast" : { "lat" : 30.0594249802915, "lng" : -94.75041796970849 }, "southwest" : { "lat" : 30.0567270197085, "lng" : -94.7531159302915 } } }, "types" : [ "route" ] }, {