.net - SimpleGeo - Obtaining the Longitude and Latitude from response -


i have following response in json format, but, can't seem figure out how obtain logitude , latitude it

i tried

dim result = jsonconvert.deserializeobject(of dictionary(of string, object))(response.content) 

but when try obtain an item key "address"...i nothing

here json response

{"query":{"latitude":37.779278,"longitude":-122.416582,"address":"san francisco, ca"},"timestamp":1311197030.697,"features":[{"handle":"sg_4or6cqyuxzveotm8nclk80_37.780722_-122.417364","name":"06075012400","license":"http://creativecommons.org/publicdomain/mark/1.0/","bounds":[-122.421050,37.775147,-122.413365,37.784657],"href":"http://api.simplegeo.com/1.0/features/sg_4or6cqyuxzveotm8nclk80_37.780722_-122.417364.json","abbr":null,"classifiers":[{"category":"us census","type":"region","subcategory":"tract"}]},{"handle":"sg_6qya2evo227ktsivpoqx28_37.782005_-122.420177","name":"civic center","license":"not redistribution","bounds":[-122.425482,37.773229,-122.409979,37.790629],"href":"http://api.simplegeo.com/1.0/features/sg_6qya2evo227ktsivpoqx28_37.782005_-122.420177.json","abbr":null,"classifiers":[{"category":"neighborhood","type":"region","subcategory":null}]},{"handle":"sg_2tnihbitsdujulyhbveygx_37.779398_-122.419353","name":"94102","license":"http://creativecommons.org/publicdomain/mark/1.0/","bounds":[-122.429920,37.769441,-122.404583,37.789226],"href":"http://api.simplegeo.com/1.0/features/sg_2tnihbitsdujulyhbveygx_37.779398_-122.419353.json","abbr":null,"classifiers":[{"category":"postal code","type":"region","subcategory":null}]},{"handle":"sg_4gzxfrgof9yjfataiqfpdc_37.793367_-122.397153","name":"assembly district 13","license":"http://creativecommons.org/publicdomain/mark/1.0/","bounds":[-122.546386,37.708230,-122.281780,37.929824],"href":"http://api.simplegeo.com/1.0/features/sg_4gzxfrgof9yjfataiqfpdc_37.793367_-122.397153.json","abbr":null,"classifiers":[{"category":"legislative district","type":"region","subcategory":"provincial (lower)"}]},{"handle":"sg_2wbeybsraqlahw1quqxtv1_37.787198_-122.429550","name":"congressional district 8","license":"http://creativecommons.org/publicdomain/mark/1.0/","bounds":[-122.612285,37.708131,-122.281780,37.929824],"href":"http://api.simplegeo.com/1.0/features/sg_2wbeybsraqlahw1quqxtv1_37.787198_-122.429550.json","abbr":null,"classifiers":[{"category":"legislative district","type":"region","subcategory":"national"}]},{"handle":"sg_7taywdlplaizudt7mvwxmz_37.759717_-122.693971","name":"san francisco","license":"http://creativecommons.org/publicdomain/mark/1.0/","bounds":[-123.173825,37.639830,-122.281780,37.929824],"href":"http://api.simplegeo.com/1.0/features/sg_7taywdlplaizudt7mvwxmz_37.759717_-122.693971.json","abbr":null,"classifiers":[{"category":"administrative","type":"region","subcategory":"county"}]},{"handle":"sg_1mnfkhr5axh7lwgmzl8uq7_37.759717_-122.693971","name":"san francisco","license":"http://creativecommons.org/publicdomain/mark/1.0/","bounds":[-123.173825,37.639830,-122.281780,37.929824],"href":"http://api.simplegeo.com/1.0/features/sg_1mnfkhr5axh7lwgmzl8uq7_37.759717_-122.693971.json","abbr":null,"classifiers":[{"category":"municipal","type":"region","subcategory":"city"}]},{"handle":"sg_4wyrih6tqid1mil2cfya5d_37.759717_-122.693971","name":"san francisco unified school district","license":"http://creativecommons.org/publicdomain/mark/1.0/","bounds":[-123.173825,37.639830,-122.281780,37.929824],"href":"http://api.simplegeo.com/1.0/features/sg_4wyrih6tqid1mil2cfya5d_37.759717_-122.693971.json","abbr":null,"classifiers":[{"category":"school district","type":"region","subcategory":"unified"}]},{"handle":"sg_4n4ze6xodafr0gp1wbozrn_37.551206_-122.127401","name":"san francisco","license":"http://creativecommons.org/publicdomain/mark/1.0/","bounds":[-122.516667,37.191667,-121.733333,38.041667],"href":"http://api.simplegeo.com/1.0/features/sg_4n4ze6xodafr0gp1wbozrn_37.551206_-122.127401.json","abbr":null,"classifiers":[{"category":"urban area","type":"region","subcategory":null}]},{"handle":"sg_1wm1ykoa9hlv5vi8ibhvw7_38.107525_-122.693633","name":"state senate district 3","license":"http://creativecommons.org/publicdomain/mark/1.0/","bounds":[-123.134523,37.708230,-122.281780,38.532067],"href":"http://api.simplegeo.com/1.0/features/sg_1wm1ykoa9hlv5vi8ibhvw7_38.107525_-122.693633.json","abbr":null,"classifiers":[{"category":"legislative district","type":"region","subcategory":"provincial (upper)"}]},{"handle":"sg_2mysapilvqg3moxrsvehyr_37.215297_-119.663837","name":"california","license":"http://creativecommons.org/publicdomain/mark/1.0/","bounds":[-124.482003,32.528832,-114.131211,42.009517],"href":"http://api.simplegeo.com/1.0/features/sg_2mysapilvqg3moxrsvehyr_37.215297_-119.663837.json","abbr":"ca","classifiers":[{"category":"subnational","type":"region","subcategory":"state"}]},{"handle":"sg_3tlt0i5couwipovobescox_41.316130_-119.116571","name":"america/los_angeles","license":"creativecommons.org/publicdomain/zero/1.0/","bounds":[-124.733253,32.534622,-114.039345,49.002892],"href":"http://api.simplegeo.com/1.0/features/sg_3tlt0i5couwipovobescox_41.316130_-119.116571.json","abbr":null,"classifiers":[{"category":"time zone","type":"region","subcategory":null}]},{"handle":"sg_3uwsaedxvbzk1zer9nqkdp_45.687160_-112.493107","name":"united states of america","license":"http://creativecommons.org/publicdomain/mark/1.0/","bounds":[-179.142471,18.930138,179.781150,71.412180],"href":"http://api.simplegeo.com/1.0/features/sg_3uwsaedxvbzk1zer9nqkdp_45.687160_-112.493107.json","abbr":null,"classifiers":[{"category":"national","type":"region","subcategory":null}]}],"weather":{"wind_speed":"6.9 meters per second","temperature":"78f","dewpoint":"59f","cloud_cover":"0%","wind_direction":"325 degrees","forecast":{"tonight":{"conditions":"mostly cloudy","precipitation":"0%","temperature":{"max":"58f","min":"55f"}},"tomorrow":{"conditions":"clear","precipitation":"0%","temperature":{"max":"70f","min":"56f"}},"today":{"conditions":"clear","precipitation":"0%","temperature":{"max":"73f","min":"59f"}}},"conditions":"clear"},"demographics":{"population_density":7489},"intersections":[{"distance":38.43225250350512,"geometry":{"type":"point","coordinates":[-122.4167858,37.779583799999997]},"properties":{"highways":[{"osm_way_id":"33789567","type":"residential","name":"fulton street"},{"osm_way_id":"26988030","type":"tertiary","name":"larkin street"}],"attribution":"(c) openstreetmap (http://openstreetmap.org/) , contributors","license":"http://creativecommons.org/licenses/by-sa/2.0/"},"type":"feature","id":"65287204"},{"distance":69.25254468826954,"geometry":{"type":"point","coordinates":[-122.4165794,37.778655200000003]},"properties":{"highways":[{"osm_way_id":"26988030","type":"tertiary","name":"larkin street"},{"osm_way_id":"8920461","type":"unclassified","name":"grove street"}],"attribution":"(c) openstreetmap (http://openstreetmap.org/) , contributors","license":"http://creativecommons.org/licenses/by-sa/2.0/"},"type":"feature","id":"65354417"},{"distance":139.2095933887024,"geometry":{"type":"point","coordinates":[-122.41696140000001,37.780493499999999]},"properties":{"highways":[{"osm_way_id":"27167270","type":"residential","name":"mcallister street"},{"osm_way_id":"26988030","type":"tertiary","name":"larkin street"}],"attribution":"(c) openstreetmap (http://openstreetmap.org/) , contributors","license":"http://creativecommons.org/licenses/by-sa/2.0/"},"type":"feature","id":"65352337"},{"distance":139.9292506517826,"geometry":{"type":"point","coordinates":[-122.415127,37.779789000000001]},"properties":{"highways":[{"osm_way_id":"8915763","type":"residential","name":"fulton street"},{"osm_way_id":"26988009","type":"tertiary","name":"hyde street"}],"attribution":"(c) openstreetmap (http://openstreetmap.org/) , contributors","license":"http://creativecommons.org/licenses/by-sa/2.0/"},"type":"feature","id":"65287201"},{"distance":152.92687955288244,"geometry":{"type":"point","coordinates":[-122.4149213,37.778867400000003]},"properties":{"highways":[{"osm_way_id":"26988009","type":"tertiary","name":"hyde street"},{"osm_way_id":"8920461","type":"unclassified","name":"grove street"}],"attribution":"(c) openstreetmap (http://openstreetmap.org/) , contributors","license":"http://creativecommons.org/licenses/by-sa/2.0/"},"type":"feature","id":"65360267"}],"address":{"geometry":{"coordinates":[-122.41670097091016,37.77925384607872],"type":"point"},"properties":{"address":"164 larkin st","distance":"0.01","postcode":"94109","city":"san francisco","county":"san francisco","province":"ca","country":"us"},"type":"feature"}}

in example expect there key called "query" returns dictionary. have keys longitude , latitude.

dim querydict = result.item("query") dim lng = querydict.item("longitude") dim lat = querydict.item("latitude") 

excuse syntax, haven't done .net/vb ages, have no idea if that's right.

it might if visualise json you've got. try pasting in tool , clicking render button: http://chris.photobooks.com/json/default.htm


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -