Google 地理编码推荐
我正在考虑利用 Google Maps API 进行一些地理编码。我想实现客户端地理编码,以消除请求限制的可能性。
我需要对结果集执行一些相当复杂的逻辑,并且我更喜欢在 C# 中执行此操作,因为它是 ASP.NET MVC 应用程序。然而,该逻辑的一部分可能是发出后续跟进请求,而这又需要 JavaScript。
因此,我的第一个想法是在我的应用程序中创建一个服务来传递 JSON 结果和某些返回类型来触发后续请求。这似乎有点复杂,想从社区了解这是否是最好的方法,以及是否有任何库/第三方工具可以帮助处理这种情况。
I am looking into utilizing Google Maps API to do some geocoding. I want to implement client side geocoding, to remove the possibility of request limitation.
I need to do some fairly complex logic on the result set, and I would prefer to do that in C# as it is a ASP.NET MVC application. However part of that logic is possibly makeing subsequent follow up requests and that again would require JavaScript.
So, my first thought is to make a service in my application to pass JSON results to and certain return types to trigger the subsequent request. That seems a little convoluted and want to know from the community if this seems like the best approach and if there are any libraries/third party tools that can help handle this situation.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我有一个应用程序做了类似的事情,通过使用标准化事件(在这个应用程序中,不是W3标准或任何东西)来稍微解耦复杂性
这样我就没有顺序代码写,即我可以添加或删除行为(简单或复杂)而不改变任何其他内容。 jQuery Events 是我使用的所有内容,在您决定如何模式之后,实际上没有什么太大的意义事物。
如果您对此感兴趣并且希望我扩展或澄清其中的一部分,请告诉我。
I've an app that does something similar, with the complexity somewhat decoupled by using standardized events (within this app, not a W3 standard or anything)
This way there's no sequential code I have to write, i.e., I can add or remove behaviors (simple or complex) without changing anything else. jQuery Events are all I use, really nothing much to it after you decide how you'll pattern things.
Let me know if that's interesting to you and you want me to expand or clarify a part of it.
您可能想尝试一下这个 API:
http://code.google.com/apis/maps/documentation/geocoding/
它更像 REST - 不需要 Javascript。与 C# 配合使用可能会更好
You may want to try this API:
http://code.google.com/apis/maps/documentation/geocoding/
It's far more REST like - no Javascript required. May work better with C#
最后我发现最好的解决方案是按照我在问题中所述进行。将 JSON 对象传递给控制器,执行工作,然后返回。工作得很好。
In the end I found the best solution was to do as I stated in my question. Pass the JSON object to controller, do work, then return. Worked pretty well.