地理编码功能返回500代码和codestatus Servererror [英] Geocode function returns 500 code and codestatus Servererror

查看:112
本文介绍了地理编码功能返回500代码和codestatus Servererror的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的项目中使用googlemaps.subgurim.net谷歌地图。地理编码功能有时在服务器系统中不起作用,这里我将纬度和经度转换为人类可读的地址。有时候geocode staus返回500和服务器错误,这次这段代码无法工作。当

geocode返回500代码和服务器错误,时间lat,lng地址未来...





I am using googlemaps.subgurim.net google map in my project. Geocode funtion was some times not working in server system,here i am converting latitude and longitude to human readable address.some times geocode staus returns 500 and server error,this time this code not working.when
geocode returns 500 code and server error that time lat,lng address was not coming...


string sMapKey = ConfigurationManager.AppSettings["googlemaps.subgurim.net"];
                    GeoCode objAddress = new GeoCode();
                    objAddress = GMap.geoCodeRequest(new GLatLng(Convert.ToDouble(status.Rows[0][0]), Convert.ToDouble(status.Rows[0][1])), sMapKey);
StringBuilder sb = new StringBuilder();
                    if (objAddress.valid)
                    {
                        sb.Append(objAddress.Placemark.address.ToString());
                        string address = sb.ToString();
                        lblPlace.Text = address;
                    }

推荐答案





500是内部服务器错误。基本上这意味着服务器在处理您的请求时遇到内部错误。

也许您应该切换到官方Google服务器或使用Bing Maps API来拥有一个更稳定可靠的服务器来处理您的消息。 br />


欢呼,

Marco Bertschi
Hi,

500 is an internal server error. Basically this means the server encountered an internal error while processing your request.
Maybe you should switch to the official Google server or use Bing Maps API to have a more stable and reliable server which processes your message.

cheers,
Marco Bertschi


这篇关于地理编码功能返回500代码和codestatus Servererror的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆