153 lines
5.5 KiB
C#
153 lines
5.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using SuperMap.RealEstate.CoreFrameWork;
|
|
using SuperMap.RealEstate.ServiceModel;
|
|
using SuperMap.RealEstate.Utility;
|
|
using SuperMap.RealEstate.Web.UI;
|
|
using SuperMap.RealEstate.Web.UI.WebControls;
|
|
using SuperMap.RealEstate.Web.Utility;
|
|
using Business = SuperMap.RealEstate.HighWay.Storage.Business;
|
|
using HZQR.Common;
|
|
using SuperMap.RealEstate.CoreFrameWork.Dictionary.Business;
|
|
|
|
namespace SuperMap.RealEstate.HighWay.Modules.MapShow
|
|
{
|
|
public partial class Default : BasePage
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
this.Master_SizeBox.SideBar.Width = "300";
|
|
this.Master_SizeBox.SideBar.Background = "#fff";
|
|
if (IsPostBack) return;
|
|
|
|
}
|
|
|
|
|
|
public string GetTypeString
|
|
{
|
|
get
|
|
{
|
|
string PartString = string.Empty;
|
|
foreach (Business.SERVERPARTSTATICTYPE _SERVERPARTSTATICTYPE in (new Business.SERVERPARTSTATICTYPE(this.Transaction)).FillCollection("where ismap = 1 order by TYPE_INDEX"))
|
|
{
|
|
PartString += PartString == "" ? _SERVERPARTSTATICTYPE.TYPE_NAME + "|" + _SERVERPARTSTATICTYPE.SERVERPARTSTATICTYPE_ID_Encrypt + "|" + _SERVERPARTSTATICTYPE.MAP_ICON : "," + _SERVERPARTSTATICTYPE.TYPE_NAME + "|" + _SERVERPARTSTATICTYPE.SERVERPARTSTATICTYPE_ID_Encrypt + "|" + _SERVERPARTSTATICTYPE.MAP_ICON;
|
|
}
|
|
return PartString;
|
|
}
|
|
}
|
|
|
|
public string GetBaiduPointString()
|
|
{
|
|
DataTable _DataTable = new DataTable();
|
|
_DataTable.Columns.Add("MAPINFO");
|
|
_DataTable.Columns.Add("MAP_ADDRESS");
|
|
_DataTable.Columns.Add("MAP_TEL");
|
|
_DataTable.Columns.Add("MAP_OBJECTCODE");
|
|
_DataTable.Columns.Add("MAPX");
|
|
_DataTable.Columns.Add("MAPY");
|
|
try
|
|
{
|
|
//获得服务区数据
|
|
string PartString = string.Empty;
|
|
//获得服务区信息
|
|
foreach (string _str in PassportInfo.CityAuthority.Split(','))
|
|
{
|
|
PartString += PartString == string.Empty ? "'" + _str + "'" : ",'" + _str + "'";
|
|
}
|
|
foreach (FieldEnum _FieldEnum in (new FieldEnum(this.Transaction)).FillCollection(
|
|
"where FieldEnum_Value in(" + PartString + ")"))
|
|
{
|
|
Storage.Business.SERVERPART _SERVERPART = new Storage.Business.SERVERPART(this.Transaction);
|
|
_SERVERPART.AddSearchParameter("FIELDENUM_ID", _FieldEnum.FieldEnum_ID);
|
|
if (_SERVERPART.Search())
|
|
{
|
|
DataRow _DataRow = _DataTable.NewRow();
|
|
_DataRow["MAPINFO"] = _SERVERPART.SERVERPART_NAME + " " + _SERVERPART.SERVERPART_INFO;
|
|
_DataRow["MAP_ADDRESS"] = _SERVERPART.SERVERPART_ADDRESS;
|
|
_DataRow["MAP_TEL"] = _SERVERPART.SERVERPART_TEL;
|
|
_DataRow["MAP_OBJECTCODE"] = _SERVERPART.SERVERPART_ID_Encrypt;
|
|
//去除掉西充
|
|
if (_SERVERPART.SERVERPART_X == null || _SERVERPART.SERVERPART_CODE == "511600")
|
|
continue;
|
|
if (_SERVERPART.SERVERPART_NAME.Contains("西充"))
|
|
continue;
|
|
_DataRow["MAPX"] = _SERVERPART.SERVERPART_X;
|
|
_DataRow["MAPY"] = _SERVERPART.SERVERPART_Y;
|
|
_DataTable.Rows.Add(_DataRow);
|
|
}
|
|
}
|
|
|
|
string PointString = string.Empty;
|
|
PointString = BaiDuMapHelper.GetBaiduPointString(PointString, _DataTable);
|
|
return PointString;
|
|
}
|
|
catch
|
|
{
|
|
return "";
|
|
}
|
|
}
|
|
|
|
public string GetPointX
|
|
{
|
|
get
|
|
{
|
|
try
|
|
{
|
|
return "120.170291";
|
|
//if (this.CurrObject.SERVERPART_X == null)
|
|
//{
|
|
// return "120.170291";
|
|
//}
|
|
//else
|
|
//{
|
|
// return this.CurrObject.SERVERPART_X.ToString();
|
|
//}
|
|
}
|
|
catch
|
|
{
|
|
return "120.170291";
|
|
}
|
|
}
|
|
}
|
|
|
|
public string GetPointY
|
|
{
|
|
get
|
|
{
|
|
try
|
|
{
|
|
return "30.306109";
|
|
//if (this.CurrObject.SERVERPART_Y == null)
|
|
//{
|
|
// return "30.306109";
|
|
//}
|
|
//else
|
|
//{
|
|
// return this.CurrObject.SERVERPART_Y.ToString();
|
|
//}
|
|
}
|
|
catch
|
|
{
|
|
return "30.306109";
|
|
}
|
|
}
|
|
}
|
|
|
|
public string GetServerPartString()
|
|
{
|
|
string PartString = string.Empty;
|
|
//获得服务区信息
|
|
foreach (string _str in PassportInfo.CityAuthority.Split(','))
|
|
{
|
|
PartString += PartString == string.Empty ? "'" + _str + "'" : "|'" + _str + "'";
|
|
}
|
|
return PartString;
|
|
}
|
|
}
|
|
}
|