ericnewton76 / gmaps-api-net

C# google maps api interface for interacting with the backend web services for Google Maps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to do a reverse geocode request

lucamorelli opened this issue · comments

Hi, how can I use this library to do a reverse geocode request? If I try to assign the coordinates to the viewport property of the request receive an error

What exactly do you mean? Doesnt this code do reverse geocoding?

var request = new GeocodeRequest();
request.Location = new LatLng(30,-70);
var service = new GeocodeService();
var result = service.GetResponse(request);

@ericnewton76 is this GoecodeRequest available?

@rickduarte did you find a solution for this? I'm not seeing a request class that has a "Location" property anywhere.

@rickduarte @pkmccaffrey There was a misstype, @ericnewton76 probably meant

var request = new GeocodeRequest();

request.Address = new LatLng(30,-70);

var service = new GeocodeService();
var result = service.GetResponse(request);
commented

I've verified that reverse geocoding does work with the latest code suggestion from @nkovacic above.