/// <summary> /// 执行地图查询. /// </summary> private void DoMapQuery() { BaiduMapService service = new BaiduMapService(); BaiduGeocoderResult result = service.Geocoding(this.txtAddress.Text); if (result.result != null && result.result.location != null) { this.lon = result.result.location.lng; this.lat = result.result.location.lat; } }