I'm using ASP.NET MVC 3 and Google Maps v3. I'd like to do geocoding in an action. That is passing a valid address to Google and getting the latitude and longitude back. All online samples on geocoding that I've seen have dealt with client-side geocoding. How would you do this in an action using C#?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
I am not sure if I understand you correctly but this is the way I do it (if you are interested)
using the extension methods here & Json.Net
L.B's solution worked for me. However I ran into some runtime binding issues and had to cast the results before I could use them
I ran into issues due to the new Google API requirement to use a valid API Key. To get things working I modified the code to append the key to the address and changing the url to
https
: