();
foreach (JObject place in places)
{
if (place["location"] != null && place["location"]["lng"] != null && (string)place["location"]["lng"] != "")
{
LatLngPoint location = new LatLngPoint(double.Parse((string)place["location"]["lng"]), double.Parse((string)place["location"]["lat"]));
BPOI poi = new BPOI { DataSource = place, Index = index, Selected = false, Location = location };
_list.Add(poi);
BPlaceItem item = new BPlaceItem();
item.Index = index++;
item.POI = poi;
item.SetDestinationPlace += new SetDestinationPlaceEventHandler(item_SetDestinationPlace);
item.SetSourcePlace += new SetSourcePlaceEventHandler(item_SetSourcePlace);
item.PlaceSelectedChanged += new PlaceSelectedChangedEventHandler(item_PlaceSelectedChanged);
item.Height = 104;
flpPlaces.Controls.Add(item);
}
}
if (BMapControl != null)
{
BMapControl.AddPlaces(_list);
}
}
///
/// 选中POI
///
internal void SelectPlace(BPOI poi)
{
foreach (Control c in flpPlaces.Controls)
{
if (c is BPlaceItem)
{
BPlaceItem p = c as BPlaceItem;
if (p.POI == poi)
{
p.Selected = true;
flpPlaces.ScrollControlIntoView(c);
}
else
{
p.Selected = false;
}
}
}
}
///
/// 点击快速搜索面板上的按钮
///
///
private void bQuickSearch_QuickSearch(string searchName)
{
_wait.Visible = true;
((Action)delegate()
{
PlaceService ps = new PlaceService();
JObject places = ps.SearchInCity(searchName, CurrentCity);
if (places != null)
{
this.Invoke((Action)delegate()
{
_wait.Visible = false;
flpPlaces.Controls.Remove(bQuickSearch);
AddPlaces(places["results"]); //具体json格式参见api文档
});
}
}).BeginInvoke(null, null);
}
///
/// 选中位置改变
///
///
void item_PlaceSelectedChanged(BPOI poi)
{
//BMapControl
foreach (Control c in flpPlaces.Controls)
{
if (c is BPlaceItem && (c as BPlaceItem).POI != poi)
{
(c as BPlaceItem).Selected = false;
}
}
if (BMapControl != null)
{
BMapControl.SelectBPOI(poi);
}
}
///
/// 设置起点
///
///
void item_SetSourcePlace(string sourceName)
{
//BDirecttionBoard
if (BDirectionBoard != null)
{
BDirectionBoard.SourcePlace = sourceName;
}
}
///
/// 设置终点
///
///
void item_SetDestinationPlace(string destinationName)
{
//BDirectionBoard
if (BDirectionBoard != null)
{
BDirectionBoard.DestinationPlace = destinationName;
}
}
}
}
================================================
FILE: BMap.NET.WindowsForm/BPlacesBoard.resx
================================================
text/microsoft-resx
2.0
System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
================================================
FILE: BMap.NET.WindowsForm/BPlacesSuggestionControl.Designer.cs
================================================
namespace BMap.NET.WindowsForm
{
partial class BPlacesSuggestionControl
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.flpPlaces = new System.Windows.Forms.FlowLayoutPanel();
this.SuspendLayout();
//
// flpPlaces
//
this.flpPlaces.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.flpPlaces.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.flpPlaces.Location = new System.Drawing.Point(0, 50);
this.flpPlaces.Margin = new System.Windows.Forms.Padding(0);
this.flpPlaces.Name = "flpPlaces";
this.flpPlaces.Size = new System.Drawing.Size(298, 253);
this.flpPlaces.TabIndex = 1;
this.flpPlaces.WrapContents = false;
//
// BPlacesSuggestionControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.flpPlaces);
this.Cursor = System.Windows.Forms.Cursors.Hand;
this.Name = "BPlacesSuggestionControl";
this.Size = new System.Drawing.Size(298, 303);
this.Click += new System.EventHandler(this.BPlacesSuggestionControl_Click);
this.Paint += new System.Windows.Forms.PaintEventHandler(this.BPlacesSuggestionControl_Paint);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.FlowLayoutPanel flpPlaces;
}
}
================================================
FILE: BMap.NET.WindowsForm/BPlacesSuggestionControl.cs
================================================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Newtonsoft.Json.Linq;
namespace BMap.NET.WindowsForm
{
///
/// 导航路线起点\终点位置建议控件
///
partial class BPlacesSuggestionControl : UserControl
{
public event EndPointSelectedEventHandler EndPointSelected;
///
/// 类型(起点或终点)
///
public PointType Type
{
get;
set;
}
private JToken _content;
///
/// 位置项
///
public JToken Content
{
get
{
return _content;
}
set
{
_content = value;
// 解析 具体json格式参见api文档
if (_content != null)
{
int index=0;
foreach (JObject place in _content)
{
BPlacesSuggestionItem item = new BPlacesSuggestionItem();
item.Type = Type;
item.Index = index++;
item.DataSource = place;
item.Width = flpPlaces.Width;
flpPlaces.Controls.Add(item);
item.Margin = new System.Windows.Forms.Padding(0);
item.EndPointSelected += new EndPointSelectedEventHandler(item_EndPointSelected);
}
foreach (Control c in flpPlaces.Controls)
{
_places_height += c.Height;
}
Selected = false;
}
}
}
private int _places_height;
private string _selected_place;
private bool _selected;
///
/// 是否选中(展开收缩)
///
public bool Selected
{
get
{
return _selected;
}
set
{
_selected = value;
if (_selected)
{
Height = 50 + _places_height;
}
else
{
Height = 50;
}
}
}
///
/// 模糊位置
///
public string KeyWord
{
get;
set;
}
///
/// 构造方法
///
public BPlacesSuggestionControl()
{
InitializeComponent();
}
#region 事件处理
///
/// 重绘
///
///
///
private void BPlacesSuggestionControl_Paint(object sender, PaintEventArgs e)
{
using (SolidBrush sb = new SolidBrush(Color.FromArgb(50, Color.Wheat)))
{
e.Graphics.FillRectangle(sb, new Rectangle(0, 0, Width - 1, 50 - 1));
}
e.Graphics.DrawRectangle(Pens.OrangeRed, new Rectangle(0, 0, Width - 1, 50 - 1));
string info = _selected_place == null ? KeyWord : _selected_place;
using (Font f = new Font("微软雅黑", 10, FontStyle.Bold))
{
e.Graphics.DrawString((Type == PointType.RouteEnd ? "终点:" : "起点:") + info, f, Brushes.OrangeRed, new PointF(20, 15));
}
}
///
/// 选中位置
///
///
///
void item_EndPointSelected(string placeName, PointType type)
{
_selected_place = placeName;
if (EndPointSelected != null)
{
EndPointSelected(placeName, type);
}
Invalidate();
}
///
/// 选中展开
///
///
///
private void BPlacesSuggestionControl_Click(object sender, EventArgs e)
{
Selected = !Selected;
}
#endregion
}
///
/// 表示处理选中起点/终点这一事件的方法
///
///
///
delegate void EndPointSelectedEventHandler(string placeName,PointType type);
}
================================================
FILE: BMap.NET.WindowsForm/BPlacesSuggestionControl.resx
================================================
text/microsoft-resx
2.0
System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
================================================
FILE: BMap.NET.WindowsForm/BPlacesSuggestionItem.Designer.cs
================================================
namespace BMap.NET.WindowsForm
{
partial class BPlacesSuggestionItem
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.lblName = new System.Windows.Forms.Label();
this.lblAddress = new System.Windows.Forms.Label();
this.lblSelect = new System.Windows.Forms.Label();
this.lblIndex = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// lblName
//
this.lblName.Cursor = System.Windows.Forms.Cursors.Hand;
this.lblName.ForeColor = System.Drawing.Color.Blue;
this.lblName.Location = new System.Drawing.Point(32, 6);
this.lblName.Name = "lblName";
this.lblName.Size = new System.Drawing.Size(165, 26);
this.lblName.TabIndex = 2;
this.lblName.Text = "这里是名称";
this.lblName.MouseEnter += new System.EventHandler(this.label1_MouseEnter);
this.lblName.MouseLeave += new System.EventHandler(this.label1_MouseLeave);
//
// lblAddress
//
this.lblAddress.Cursor = System.Windows.Forms.Cursors.Hand;
this.lblAddress.ForeColor = System.Drawing.Color.Gray;
this.lblAddress.Location = new System.Drawing.Point(32, 36);
this.lblAddress.Name = "lblAddress";
this.lblAddress.Size = new System.Drawing.Size(164, 26);
this.lblAddress.TabIndex = 3;
this.lblAddress.Text = "这里是名称\r\n撒发射点发阿斯蒂芬";
this.lblAddress.MouseEnter += new System.EventHandler(this.label1_MouseEnter);
this.lblAddress.MouseLeave += new System.EventHandler(this.label1_MouseLeave);
//
// lblSelect
//
this.lblSelect.BackColor = System.Drawing.Color.PeachPuff;
this.lblSelect.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lblSelect.Cursor = System.Windows.Forms.Cursors.Hand;
this.lblSelect.ForeColor = System.Drawing.Color.Peru;
this.lblSelect.Location = new System.Drawing.Point(208, 23);
this.lblSelect.Name = "lblSelect";
this.lblSelect.Size = new System.Drawing.Size(63, 23);
this.lblSelect.TabIndex = 4;
this.lblSelect.Text = "设为起点";
this.lblSelect.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.lblSelect.Click += new System.EventHandler(this.lblSelect_Click);
this.lblSelect.MouseEnter += new System.EventHandler(this.label1_MouseEnter);
this.lblSelect.MouseLeave += new System.EventHandler(this.label1_MouseLeave);
//
// lblIndex
//
this.lblIndex.AutoSize = true;
this.lblIndex.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblIndex.Location = new System.Drawing.Point(3, 19);
this.lblIndex.Name = "lblIndex";
this.lblIndex.Size = new System.Drawing.Size(20, 22);
this.lblIndex.TabIndex = 5;
this.lblIndex.Text = "1";
//
// BPlacesSuggestionItem
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.Controls.Add(this.lblIndex);
this.Controls.Add(this.lblSelect);
this.Controls.Add(this.lblAddress);
this.Controls.Add(this.lblName);
this.Cursor = System.Windows.Forms.Cursors.Hand;
this.Name = "BPlacesSuggestionItem";
this.Size = new System.Drawing.Size(284, 67);
this.Paint += new System.Windows.Forms.PaintEventHandler(this.BPlacesSuggestionItem_Paint);
this.MouseEnter += new System.EventHandler(this.label1_MouseEnter);
this.MouseLeave += new System.EventHandler(this.label1_MouseLeave);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label lblName;
private System.Windows.Forms.Label lblAddress;
private System.Windows.Forms.Label lblSelect;
private System.Windows.Forms.Label lblIndex;
}
}
================================================
FILE: BMap.NET.WindowsForm/BPlacesSuggestionItem.cs
================================================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Newtonsoft.Json.Linq;
namespace BMap.NET.WindowsForm
{
///
/// 导航路线起点/终点位置建议项
///
partial class BPlacesSuggestionItem : UserControl
{
public event EndPointSelectedEventHandler EndPointSelected;
private JObject _dataSource;
///
/// 位置数据源
///
public JObject DataSource
{
get
{
return _dataSource;
}
set
{
_dataSource = value;
if (_dataSource != null) //解析 具体json格式参见api文档
{
lblName.Text = (string)_dataSource["name"];
lblAddress.Text = (string)_dataSource["address"];
if (Type == PointType.RouteEnd)
{
lblSelect.Text = "设为终点";
}
else
{
lblSelect.Text = "设为起点";
}
lblIndex.Text = Index.ToString();
}
}
}
///
/// 序号
///
public int Index
{
get;
set;
}
///
/// 位置类型
///
public PointType Type
{
get;
set;
}
///
/// 构造方法
///
public BPlacesSuggestionItem()
{
InitializeComponent();
}
///
/// 鼠标进入
///
///
///
private void label1_MouseEnter(object sender, EventArgs e)
{
BackColor = Color.FromArgb(235, 241, 251);
}
///
/// 鼠标离开
///
///
///
private void label1_MouseLeave(object sender, EventArgs e)
{
BackColor = Color.White;
}
///
/// 选择
///
///
///
private void lblSelect_Click(object sender, EventArgs e)
{
if (EndPointSelected != null)
{
EndPointSelected(lblName.Text, Type);
}
}
///
/// 重绘
///
///
///
private void BPlacesSuggestionItem_Paint(object sender, PaintEventArgs e)
{
}
}
}
================================================
FILE: BMap.NET.WindowsForm/BPlacesSuggestionItem.resx
================================================
text/microsoft-resx
2.0
System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
================================================
FILE: BMap.NET.WindowsForm/BPointTipControl.Designer.cs
================================================
namespace BMap.NET.WindowsForm
{
partial class BPointTipControl
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BPointTipControl));
this.picClose = new System.Windows.Forms.PictureBox();
this.lblName = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.lnknearby_bus_station = new System.Windows.Forms.LinkLabel();
this.lnknearby_hospital = new System.Windows.Forms.LinkLabel();
this.lnknearby_bank = new System.Windows.Forms.LinkLabel();
this.lnknearby_eatting = new System.Windows.Forms.LinkLabel();
this.lnknearby_hotel = new System.Windows.Forms.LinkLabel();
this.btnsearch = new System.Windows.Forms.Button();
this.txtNearby = new System.Windows.Forms.TextBox();
this.lblPlace = new System.Windows.Forms.Label();
this.btndriving = new System.Windows.Forms.Button();
this.btntransit = new System.Windows.Forms.Button();
this.bPlaceBox = new BMap.NET.WindowsForm.BPlaceBox();
((System.ComponentModel.ISupportInitialize)(this.picClose)).BeginInit();
this.SuspendLayout();
//
// picClose
//
this.picClose.Cursor = System.Windows.Forms.Cursors.Hand;
this.picClose.Image = ((System.Drawing.Image)(resources.GetObject("picClose.Image")));
this.picClose.Location = new System.Drawing.Point(334, 9);
this.picClose.Name = "picClose";
this.picClose.Size = new System.Drawing.Size(13, 14);
this.picClose.TabIndex = 7;
this.picClose.TabStop = false;
this.picClose.Click += new System.EventHandler(this.picClose_Click);
//
// lblName
//
this.lblName.AutoSize = true;
this.lblName.Font = new System.Drawing.Font("Microsoft YaHei", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblName.Location = new System.Drawing.Point(8, 7);
this.lblName.Name = "lblName";
this.lblName.Size = new System.Drawing.Size(79, 19);
this.lblName.TabIndex = 6;
this.lblName.Text = "位置点位置";
//
// label1
//
this.label1.BackColor = System.Drawing.Color.LightGray;
this.label1.Location = new System.Drawing.Point(1, 32);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(358, 1);
this.label1.TabIndex = 5;
this.label1.Text = "label1";
//
// lnknearby_bus_station
//
this.lnknearby_bus_station.AutoSize = true;
this.lnknearby_bus_station.Location = new System.Drawing.Point(309, 108);
this.lnknearby_bus_station.Name = "lnknearby_bus_station";
this.lnknearby_bus_station.Size = new System.Drawing.Size(41, 12);
this.lnknearby_bus_station.TabIndex = 44;
this.lnknearby_bus_station.TabStop = true;
this.lnknearby_bus_station.Text = "公交站";
this.lnknearby_bus_station.Visible = false;
this.lnknearby_bus_station.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnk_LinkClicked);
//
// lnknearby_hospital
//
this.lnknearby_hospital.AutoSize = true;
this.lnknearby_hospital.Location = new System.Drawing.Point(274, 108);
this.lnknearby_hospital.Name = "lnknearby_hospital";
this.lnknearby_hospital.Size = new System.Drawing.Size(29, 12);
this.lnknearby_hospital.TabIndex = 43;
this.lnknearby_hospital.TabStop = true;
this.lnknearby_hospital.Text = "医院";
this.lnknearby_hospital.Visible = false;
this.lnknearby_hospital.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnk_LinkClicked);
//
// lnknearby_bank
//
this.lnknearby_bank.AutoSize = true;
this.lnknearby_bank.Location = new System.Drawing.Point(239, 108);
this.lnknearby_bank.Name = "lnknearby_bank";
this.lnknearby_bank.Size = new System.Drawing.Size(29, 12);
this.lnknearby_bank.TabIndex = 42;
this.lnknearby_bank.TabStop = true;
this.lnknearby_bank.Text = "银行";
this.lnknearby_bank.Visible = false;
this.lnknearby_bank.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnk_LinkClicked);
//
// lnknearby_eatting
//
this.lnknearby_eatting.AutoSize = true;
this.lnknearby_eatting.Location = new System.Drawing.Point(204, 108);
this.lnknearby_eatting.Name = "lnknearby_eatting";
this.lnknearby_eatting.Size = new System.Drawing.Size(29, 12);
this.lnknearby_eatting.TabIndex = 41;
this.lnknearby_eatting.TabStop = true;
this.lnknearby_eatting.Text = "餐馆";
this.lnknearby_eatting.Visible = false;
this.lnknearby_eatting.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnk_LinkClicked);
//
// lnknearby_hotel
//
this.lnknearby_hotel.AutoSize = true;
this.lnknearby_hotel.Location = new System.Drawing.Point(169, 108);
this.lnknearby_hotel.Name = "lnknearby_hotel";
this.lnknearby_hotel.Size = new System.Drawing.Size(29, 12);
this.lnknearby_hotel.TabIndex = 40;
this.lnknearby_hotel.TabStop = true;
this.lnknearby_hotel.Text = "酒店";
this.lnknearby_hotel.Visible = false;
this.lnknearby_hotel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnk_LinkClicked);
//
// btnsearch
//
this.btnsearch.Location = new System.Drawing.Point(116, 103);
this.btnsearch.Name = "btnsearch";
this.btnsearch.Size = new System.Drawing.Size(43, 23);
this.btnsearch.TabIndex = 39;
this.btnsearch.Text = "搜索";
this.btnsearch.UseVisualStyleBackColor = true;
this.btnsearch.Visible = false;
this.btnsearch.Click += new System.EventHandler(this.btnsearch_Click);
//
// txtNearby
//
this.txtNearby.Location = new System.Drawing.Point(10, 104);
this.txtNearby.Name = "txtNearby";
this.txtNearby.Size = new System.Drawing.Size(100, 21);
this.txtNearby.TabIndex = 38;
this.txtNearby.Visible = false;
//
// lblPlace
//
this.lblPlace.AutoSize = true;
this.lblPlace.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblPlace.ForeColor = System.Drawing.Color.Gray;
this.lblPlace.Location = new System.Drawing.Point(8, 78);
this.lblPlace.Name = "lblPlace";
this.lblPlace.Size = new System.Drawing.Size(32, 17);
this.lblPlace.TabIndex = 37;
this.lblPlace.Text = "起点";
//
// btndriving
//
this.btndriving.Cursor = System.Windows.Forms.Cursors.Hand;
this.btndriving.Location = new System.Drawing.Point(300, 75);
this.btndriving.Name = "btndriving";
this.btndriving.Size = new System.Drawing.Size(52, 23);
this.btndriving.TabIndex = 36;
this.btndriving.Text = "驾车";
this.btndriving.UseVisualStyleBackColor = true;
this.btndriving.Click += new System.EventHandler(this.btndriving_Click);
//
// btntransit
//
this.btntransit.Cursor = System.Windows.Forms.Cursors.Hand;
this.btntransit.Location = new System.Drawing.Point(241, 75);
this.btntransit.Name = "btntransit";
this.btntransit.Size = new System.Drawing.Size(54, 23);
this.btntransit.TabIndex = 35;
this.btntransit.Text = "公交";
this.btntransit.UseVisualStyleBackColor = true;
this.btntransit.Click += new System.EventHandler(this.btntransit_Click);
//
// bPlaceBox
//
this.bPlaceBox.BPlacesBoard = null;
this.bPlaceBox.CurrentCity = "天津";
this.bPlaceBox.Enter2Search = false;
this.bPlaceBox.InputFont = new System.Drawing.Font("Microsoft YaHei", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.bPlaceBox.Location = new System.Drawing.Point(42, 76);
this.bPlaceBox.Name = "bPlaceBox";
this.bPlaceBox.QueryText = "";
this.bPlaceBox.Size = new System.Drawing.Size(193, 21);
this.bPlaceBox.TabIndex = 34;
//
// BPointTipControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.Controls.Add(this.lnknearby_bus_station);
this.Controls.Add(this.lnknearby_hospital);
this.Controls.Add(this.lnknearby_bank);
this.Controls.Add(this.lnknearby_eatting);
this.Controls.Add(this.lnknearby_hotel);
this.Controls.Add(this.btnsearch);
this.Controls.Add(this.txtNearby);
this.Controls.Add(this.lblPlace);
this.Controls.Add(this.btndriving);
this.Controls.Add(this.btntransit);
this.Controls.Add(this.bPlaceBox);
this.Controls.Add(this.picClose);
this.Controls.Add(this.lblName);
this.Controls.Add(this.label1);
this.Name = "BPointTipControl";
this.Size = new System.Drawing.Size(360, 152);
this.Load += new System.EventHandler(this.BPointTipControl_Load);
this.Paint += new System.Windows.Forms.PaintEventHandler(this.BPointTipControl_Paint);
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.BPointTipControl_MouseDown);
this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.BPointTipControl_MouseMove);
((System.ComponentModel.ISupportInitialize)(this.picClose)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.PictureBox picClose;
private System.Windows.Forms.Label lblName;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.LinkLabel lnknearby_bus_station;
private System.Windows.Forms.LinkLabel lnknearby_hospital;
private System.Windows.Forms.LinkLabel lnknearby_bank;
private System.Windows.Forms.LinkLabel lnknearby_eatting;
private System.Windows.Forms.LinkLabel lnknearby_hotel;
private System.Windows.Forms.Button btnsearch;
private System.Windows.Forms.TextBox txtNearby;
private System.Windows.Forms.Label lblPlace;
private System.Windows.Forms.Button btndriving;
private System.Windows.Forms.Button btntransit;
private BPlaceBox bPlaceBox;
}
}
================================================
FILE: BMap.NET.WindowsForm/BPointTipControl.cs
================================================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
using BMap.NET.WindowsForm.BMapElements;
namespace BMap.NET.WindowsForm
{
///
/// 位置点信息显示控件
///
partial class BPointTipControl : UserControl
{
public event SearchNearbyStartedEventHandler SearchNearbyStarted;
public event DirectionStartedEventHandler DirecttionStarted;
private int _tab_index;
private BPoint _bpoint;
///
/// 与之关联的BPoint数据
///
public BPoint BPoint
{
get
{
return _bpoint;
}
set
{
_bpoint = value;
lblName.Text = _bpoint.Address;
}
}
///
/// 当前建议搜索城市
///
public string CurrentCity
{
get
{
return bPlaceBox.CurrentCity;
}
set
{
bPlaceBox.CurrentCity = value;
}
}
///
/// 构造方法
///
public BPointTipControl()
{
InitializeComponent();
SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true);
}
///
/// 公交导航
///
///
///
private void btntransit_Click(object sender, EventArgs e)
{
if (DirecttionStarted != null)
{
if (_tab_index == 0) //到这里去
{
DirecttionStarted(bPlaceBox.QueryText, _bpoint.Address, RouteType.Transit);
}
else //从这里出发
{
DirecttionStarted(_bpoint.Address, bPlaceBox.QueryText, RouteType.Transit);
}
}
}
///
/// 驾车导航
///
///
///
private void btndriving_Click(object sender, EventArgs e)
{
if (DirecttionStarted != null && bPlaceBox.QueryText != "")
{
if (_tab_index == 0) //到这里去
{
DirecttionStarted(bPlaceBox.QueryText, _bpoint.Address, RouteType.Driving);
}
else //从这里出发
{
DirecttionStarted(_bpoint.Address, bPlaceBox.QueryText, RouteType.Driving);
}
}
}
///
/// 周边搜索
///
///
///
private void btnsearch_Click(object sender, EventArgs e)
{
if (SearchNearbyStarted != null && txtNearby.Text != "")
{
SearchNearbyStarted(txtNearby.Text, _bpoint.Location);
}
}
///
/// 加载
///
///
///
private void BPointTipControl_Load(object sender, EventArgs e)
{
//显示形状
GraphicsPath gp = new GraphicsPath();
gp.AddLine(new Point(0, 0), new Point(Width, 0));
gp.AddLine(new Point(Width, 0), new Point(Width, Height - 40));
gp.AddLine(new Point(Width / 3 + 20, Height - 40), new Point(Width, Height - 40));
gp.AddLine(new Point(Width / 3 + 20, Height - 40), new Point(Width / 3 - 40, Height));
gp.AddLine(new Point(Width / 3 - 40, Height), new Point(Width / 3 - 20, Height - 40));
gp.AddLine(new Point(Width / 3 - 20, Height - 40), new Point(0, Height - 40));
this.Region = new Region(gp);
}
///
/// 关闭
///
///
///
private void picClose_Click(object sender, EventArgs e)
{
Visible = false;
}
///
/// 快速周边搜索
///
///
///
private void lnk_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
if (SearchNearbyStarted != null)
{
SearchNearbyStarted((sender as LinkLabel).Text, _bpoint.Location);
}
}
///
/// 绘制
///
///
///
private void BPointTipControl_Paint(object sender, PaintEventArgs e)
{
e.Graphics.SmoothingMode = SmoothingMode.HighQuality;
//边框
GraphicsPath gp = new GraphicsPath();
gp.AddLine(new Point(0, 0), new Point(Width - 1, 0));
gp.AddLine(new Point(Width - 1, 0), new Point(Width - 1, Height - 40 - 1));
gp.AddLine(new Point(Width / 3 + 20 - 1, Height - 40 - 1), new Point(Width - 1, Height - 40 - 1));
gp.AddLine(new Point(Width / 3 + 20 - 1, Height - 40 - 1), new Point(Width / 3 - 40, Height - 1));
gp.AddLine(new Point(Width / 3 - 40, Height - 1), new Point(Width / 3 - 20 + 1, Height - 40 - 1));
gp.AddLine(new Point(Width / 3 - 20 + 1, Height - 40 - 1), new Point(0, Height - 40 - 1));
gp.AddLine(new Point(0, 0), new Point(0, Height - 40 - 1));
e.Graphics.DrawPath(Pens.Gray, gp);
using (Pen p = new Pen(Color.FromArgb(150, Color.LightGray)))
{
e.Graphics.DrawLine(p, new Point(0, 42), new Point(Width, 42));
e.Graphics.DrawLine(p, new Point(Width / 3, 42 + 26), new Point(Width / 3, 42));
e.Graphics.DrawLine(p, new Point(Width * 2 / 3, 42 + 26), new Point(Width * 2 / 3, 42));
e.Graphics.DrawImage(Properties.BMap.ico_destination, new Point(10, 42 + 5));
e.Graphics.DrawImage(Properties.BMap.ico_source, new Point(Width / 3 + 10, 42 + 5));
e.Graphics.DrawImage(Properties.BMap.ico_search_in_bound, new Rectangle(Width * 2 / 3 + 10, 42 + 5, 18, 18));
using (Font f = new Font("微软雅黑", 9))
{
if (_tab_index == 0) //到这里去
{
e.Graphics.DrawLine(p, new Point(Width / 3, 42 + 26), new Point(Width, 42 + 26));
e.Graphics.DrawString("到这里去", f, Brushes.Gray, new PointF(25, 42 + 5));
e.Graphics.DrawString("从这里出发", f, Brushes.Blue, new PointF(Width / 3 + 25, 42 + 5));
e.Graphics.DrawString("周边搜索", f, Brushes.Blue, new PointF(Width * 2 / 3 + 25, 42 + 5));
}
else if (_tab_index == 1) //从这里出发
{
e.Graphics.DrawLine(p, new Point(0, 42 + 26), new Point(Width / 3, 42 + 26));
e.Graphics.DrawLine(p, new Point(Width * 2 / 3, 42 + 26), new Point(Width, 42 + 26));
e.Graphics.DrawString("到这里去", f, Brushes.Blue, new PointF(25, 42 + 5));
e.Graphics.DrawString("从这里出发", f, Brushes.Gray, new PointF(Width / 3 + 25, 42 + 5));
e.Graphics.DrawString("周边搜索", f, Brushes.Blue, new PointF(Width * 2 / 3 + 25, 42 + 5));
}
else //周边搜索
{
e.Graphics.DrawLine(p, new Point(0, 42 + 26), new Point(Width * 2 / 3, 42 + 26));
e.Graphics.DrawString("到这里去", f, Brushes.Blue, new PointF(25, 42 + 5));
e.Graphics.DrawString("从这里出发", f, Brushes.Blue, new PointF(Width / 3 + 25, 42 + 5));
e.Graphics.DrawString("周边搜索", f, Brushes.Gray, new PointF(Width * 2 / 3 + 25, 42 + 5));
}
}
}
}
///
/// 鼠标移动
///
///
///
private void BPointTipControl_MouseMove(object sender, MouseEventArgs e)
{
if (new Rectangle(0, 42, Width, 26).Contains(e.Location))
{
Cursor = Cursors.Hand;
}
else
{
Cursor = Cursors.Arrow;
}
}
///
/// 点击选项卡
///
///
///
private void BPointTipControl_MouseDown(object sender, MouseEventArgs e)
{
Point p = PointToClient(Cursor.Position);
if (new Rectangle(0, 42, Width / 3, 26).Contains(p)) //到这里去
{
_tab_index = 0;
lblPlace.Text = "起点";
lblPlace.Visible = true;
bPlaceBox.Visible = true;
btndriving.Visible = true;
btntransit.Visible = true;
txtNearby.Visible = false;
btnsearch.Visible = false;
lnknearby_bank.Visible = false;
lnknearby_bus_station.Visible = false;
lnknearby_eatting.Visible = false;
lnknearby_hospital.Visible = false;
lnknearby_hotel.Visible = false;
}
if (new Rectangle(Width / 3, 42, Width / 3, 26).Contains(p)) //从这里出发
{
_tab_index = 1;
lblPlace.Text = "终点";
lblPlace.Visible = true;
bPlaceBox.Visible = true;
btndriving.Visible = true;
btntransit.Visible = true;
txtNearby.Visible = false;
btnsearch.Visible = false;
lnknearby_bank.Visible = false;
lnknearby_bus_station.Visible = false;
lnknearby_eatting.Visible = false;
lnknearby_hospital.Visible = false;
lnknearby_hotel.Visible = false;
}
if (new Rectangle(Width * 2 / 3, 42, Width / 3, 26).Contains(p)) //周边搜索
{
_tab_index = 2;
lblPlace.Visible = false;
bPlaceBox.Visible = false;
btndriving.Visible = false;
btntransit.Visible = false;
txtNearby.Visible = true;
btnsearch.Visible = true;
lnknearby_bank.Visible = true;
lnknearby_bus_station.Visible = true;
lnknearby_eatting.Visible = true;
lnknearby_hospital.Visible = true;
lnknearby_hotel.Visible = true;
lnknearby_bank.Location = new Point(lnknearby_bank.Location.X, 84);
lnknearby_bus_station.Location = new Point(lnknearby_bus_station.Location.X, 84);
lnknearby_eatting.Location = new Point(lnknearby_eatting.Location.X, 84);
lnknearby_hospital.Location = new Point(lnknearby_hospital.Location.X, 84);
lnknearby_hotel.Location = new Point(lnknearby_hotel.Location.X, 84);
btnsearch.Location = new Point(btnsearch.Location.X, 78);
txtNearby.Location = new Point(txtNearby.Location.X, 78);
}
Invalidate();
}
}
///
/// 表示处理开始导航这一事件的方法
///
///
///
///
delegate void DirectionStartedEventHandler(string source,string destination,RouteType type);
///
/// 标出处理周边搜索这一事件的方法
///
///
///
delegate void SearchNearbyStartedEventHandler(string query,LatLngPoint center);
}
================================================
FILE: BMap.NET.WindowsForm/BPointTipControl.resx
================================================
text/microsoft-resx
2.0
System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
R0lGODlhDQANAIEBAAkkPP///wAAAAAAACH/C05FVFNDQVBFMi4wAwEBAAAh+QQBAAABACwAAAAADQAN
AAAIMQADBABAsGBBgQMNKgSQcKFDhg0FLkQIsaFBhBIfUtSI0SHFjRcjWnx4kSRBkBMDBAQAOw==
================================================
FILE: BMap.NET.WindowsForm/BQuickSearchBoardcs.Designer.cs
================================================
namespace BMap.NET.WindowsForm
{
partial class BQuickSearchBoardcs
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BQuickSearchBoardcs));
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.pictureBox3 = new System.Windows.Forms.PictureBox();
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
this.linkLabel2 = new System.Windows.Forms.LinkLabel();
this.linkLabel3 = new System.Windows.Forms.LinkLabel();
this.label1 = new System.Windows.Forms.Label();
this.pictureBox4 = new System.Windows.Forms.PictureBox();
this.pictureBox5 = new System.Windows.Forms.PictureBox();
this.pictureBox6 = new System.Windows.Forms.PictureBox();
this.linkLabel4 = new System.Windows.Forms.LinkLabel();
this.linkLabel5 = new System.Windows.Forms.LinkLabel();
this.linkLabel6 = new System.Windows.Forms.LinkLabel();
this.linkLabel7 = new System.Windows.Forms.LinkLabel();
this.linkLabel8 = new System.Windows.Forms.LinkLabel();
this.linkLabel9 = new System.Windows.Forms.LinkLabel();
this.linkLabel10 = new System.Windows.Forms.LinkLabel();
this.linkLabel11 = new System.Windows.Forms.LinkLabel();
this.linkLabel12 = new System.Windows.Forms.LinkLabel();
this.linkLabel13 = new System.Windows.Forms.LinkLabel();
this.linkLabel14 = new System.Windows.Forms.LinkLabel();
this.linkLabel15 = new System.Windows.Forms.LinkLabel();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).BeginInit();
this.SuspendLayout();
//
// pictureBox1
//
this.pictureBox1.Cursor = System.Windows.Forms.Cursors.Hand;
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(15, 19);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(54, 54);
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
this.pictureBox1.Tag = "美食";
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
//
// pictureBox2
//
this.pictureBox2.Cursor = System.Windows.Forms.Cursors.Hand;
this.pictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image")));
this.pictureBox2.Location = new System.Drawing.Point(104, 19);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(54, 54);
this.pictureBox2.TabIndex = 1;
this.pictureBox2.TabStop = false;
this.pictureBox2.Tag = "酒店";
this.pictureBox2.Click += new System.EventHandler(this.pictureBox1_Click);
//
// pictureBox3
//
this.pictureBox3.Cursor = System.Windows.Forms.Cursors.Hand;
this.pictureBox3.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox3.Image")));
this.pictureBox3.Location = new System.Drawing.Point(194, 19);
this.pictureBox3.Name = "pictureBox3";
this.pictureBox3.Size = new System.Drawing.Size(54, 54);
this.pictureBox3.TabIndex = 2;
this.pictureBox3.TabStop = false;
this.pictureBox3.Tag = "电影院";
this.pictureBox3.Click += new System.EventHandler(this.pictureBox1_Click);
//
// linkLabel1
//
this.linkLabel1.AutoSize = true;
this.linkLabel1.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel1.ForeColor = System.Drawing.Color.Black;
this.linkLabel1.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline;
this.linkLabel1.LinkColor = System.Drawing.Color.Black;
this.linkLabel1.Location = new System.Drawing.Point(21, 76);
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.Size = new System.Drawing.Size(44, 17);
this.linkLabel1.TabIndex = 3;
this.linkLabel1.TabStop = true;
this.linkLabel1.Tag = "美食";
this.linkLabel1.Text = "找美食";
this.linkLabel1.VisitedLinkColor = System.Drawing.Color.Black;
this.linkLabel1.Click += new System.EventHandler(this.linkLabel1_Click);
//
// linkLabel2
//
this.linkLabel2.AutoSize = true;
this.linkLabel2.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel2.ForeColor = System.Drawing.Color.Black;
this.linkLabel2.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline;
this.linkLabel2.LinkColor = System.Drawing.Color.Black;
this.linkLabel2.Location = new System.Drawing.Point(110, 76);
this.linkLabel2.Name = "linkLabel2";
this.linkLabel2.Size = new System.Drawing.Size(44, 17);
this.linkLabel2.TabIndex = 4;
this.linkLabel2.TabStop = true;
this.linkLabel2.Tag = "酒店";
this.linkLabel2.Text = "订酒店";
this.linkLabel2.VisitedLinkColor = System.Drawing.Color.Black;
this.linkLabel2.Click += new System.EventHandler(this.linkLabel1_Click);
//
// linkLabel3
//
this.linkLabel3.AutoSize = true;
this.linkLabel3.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel3.ForeColor = System.Drawing.Color.Black;
this.linkLabel3.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline;
this.linkLabel3.LinkColor = System.Drawing.Color.Black;
this.linkLabel3.Location = new System.Drawing.Point(201, 76);
this.linkLabel3.Name = "linkLabel3";
this.linkLabel3.Size = new System.Drawing.Size(44, 17);
this.linkLabel3.TabIndex = 5;
this.linkLabel3.TabStop = true;
this.linkLabel3.Tag = "电影院";
this.linkLabel3.Text = "看电影";
this.linkLabel3.VisitedLinkColor = System.Drawing.Color.Black;
this.linkLabel3.Click += new System.EventHandler(this.linkLabel1_Click);
//
// label1
//
this.label1.BackColor = System.Drawing.Color.LightGray;
this.label1.Location = new System.Drawing.Point(1, 103);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(260, 1);
this.label1.TabIndex = 6;
this.label1.Text = "label1";
//
// pictureBox4
//
this.pictureBox4.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox4.Image")));
this.pictureBox4.Location = new System.Drawing.Point(9, 120);
this.pictureBox4.Name = "pictureBox4";
this.pictureBox4.Size = new System.Drawing.Size(64, 30);
this.pictureBox4.TabIndex = 7;
this.pictureBox4.TabStop = false;
//
// pictureBox5
//
this.pictureBox5.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox5.Image")));
this.pictureBox5.Location = new System.Drawing.Point(9, 167);
this.pictureBox5.Name = "pictureBox5";
this.pictureBox5.Size = new System.Drawing.Size(64, 30);
this.pictureBox5.TabIndex = 8;
this.pictureBox5.TabStop = false;
//
// pictureBox6
//
this.pictureBox6.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox6.Image")));
this.pictureBox6.Location = new System.Drawing.Point(9, 214);
this.pictureBox6.Name = "pictureBox6";
this.pictureBox6.Size = new System.Drawing.Size(64, 30);
this.pictureBox6.TabIndex = 9;
this.pictureBox6.TabStop = false;
//
// linkLabel4
//
this.linkLabel4.AutoSize = true;
this.linkLabel4.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel4.ForeColor = System.Drawing.Color.Black;
this.linkLabel4.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline;
this.linkLabel4.LinkColor = System.Drawing.Color.Black;
this.linkLabel4.Location = new System.Drawing.Point(78, 126);
this.linkLabel4.Name = "linkLabel4";
this.linkLabel4.Size = new System.Drawing.Size(44, 17);
this.linkLabel4.TabIndex = 10;
this.linkLabel4.TabStop = true;
this.linkLabel4.Text = "公交站";
this.linkLabel4.VisitedLinkColor = System.Drawing.Color.Black;
this.linkLabel4.Click += new System.EventHandler(this.linkLabel4_Click);
//
// linkLabel5
//
this.linkLabel5.AutoSize = true;
this.linkLabel5.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel5.ForeColor = System.Drawing.Color.Black;
this.linkLabel5.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline;
this.linkLabel5.LinkColor = System.Drawing.Color.Black;
this.linkLabel5.Location = new System.Drawing.Point(123, 126);
this.linkLabel5.Name = "linkLabel5";
this.linkLabel5.Size = new System.Drawing.Size(44, 17);
this.linkLabel5.TabIndex = 11;
this.linkLabel5.TabStop = true;
this.linkLabel5.Text = "地铁站";
this.linkLabel5.VisitedLinkColor = System.Drawing.Color.Black;
this.linkLabel5.Click += new System.EventHandler(this.linkLabel4_Click);
//
// linkLabel6
//
this.linkLabel6.AutoSize = true;
this.linkLabel6.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel6.ForeColor = System.Drawing.Color.Black;
this.linkLabel6.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline;
this.linkLabel6.LinkColor = System.Drawing.Color.Black;
this.linkLabel6.Location = new System.Drawing.Point(165, 126);
this.linkLabel6.Name = "linkLabel6";
this.linkLabel6.Size = new System.Drawing.Size(44, 17);
this.linkLabel6.TabIndex = 12;
this.linkLabel6.TabStop = true;
this.linkLabel6.Text = "加油站";
this.linkLabel6.VisitedLinkColor = System.Drawing.Color.Black;
this.linkLabel6.Click += new System.EventHandler(this.linkLabel4_Click);
//
// linkLabel7
//
this.linkLabel7.AutoSize = true;
this.linkLabel7.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel7.ForeColor = System.Drawing.Color.Black;
this.linkLabel7.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline;
this.linkLabel7.LinkColor = System.Drawing.Color.Black;
this.linkLabel7.Location = new System.Drawing.Point(209, 126);
this.linkLabel7.Name = "linkLabel7";
this.linkLabel7.Size = new System.Drawing.Size(44, 17);
this.linkLabel7.TabIndex = 13;
this.linkLabel7.TabStop = true;
this.linkLabel7.Text = "停车场";
this.linkLabel7.VisitedLinkColor = System.Drawing.Color.Black;
this.linkLabel7.Click += new System.EventHandler(this.linkLabel4_Click);
//
// linkLabel8
//
this.linkLabel8.AutoSize = true;
this.linkLabel8.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel8.ForeColor = System.Drawing.Color.Black;
this.linkLabel8.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline;
this.linkLabel8.LinkColor = System.Drawing.Color.Black;
this.linkLabel8.Location = new System.Drawing.Point(78, 173);
this.linkLabel8.Name = "linkLabel8";
this.linkLabel8.Size = new System.Drawing.Size(32, 17);
this.linkLabel8.TabIndex = 14;
this.linkLabel8.TabStop = true;
this.linkLabel8.Text = "景点";
this.linkLabel8.VisitedLinkColor = System.Drawing.Color.Black;
this.linkLabel8.Click += new System.EventHandler(this.linkLabel4_Click);
//
// linkLabel9
//
this.linkLabel9.AutoSize = true;
this.linkLabel9.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel9.ForeColor = System.Drawing.Color.Black;
this.linkLabel9.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline;
this.linkLabel9.LinkColor = System.Drawing.Color.Black;
this.linkLabel9.Location = new System.Drawing.Point(123, 173);
this.linkLabel9.Name = "linkLabel9";
this.linkLabel9.Size = new System.Drawing.Size(31, 17);
this.linkLabel9.TabIndex = 15;
this.linkLabel9.TabStop = true;
this.linkLabel9.Text = "KTV";
this.linkLabel9.VisitedLinkColor = System.Drawing.Color.Black;
this.linkLabel9.Click += new System.EventHandler(this.linkLabel4_Click);
//
// linkLabel10
//
this.linkLabel10.AutoSize = true;
this.linkLabel10.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel10.ForeColor = System.Drawing.Color.Black;
this.linkLabel10.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline;
this.linkLabel10.LinkColor = System.Drawing.Color.Black;
this.linkLabel10.Location = new System.Drawing.Point(165, 173);
this.linkLabel10.Name = "linkLabel10";
this.linkLabel10.Size = new System.Drawing.Size(32, 17);
this.linkLabel10.TabIndex = 16;
this.linkLabel10.TabStop = true;
this.linkLabel10.Text = "丽人";
this.linkLabel10.VisitedLinkColor = System.Drawing.Color.Black;
this.linkLabel10.Click += new System.EventHandler(this.linkLabel4_Click);
//
// linkLabel11
//
this.linkLabel11.AutoSize = true;
this.linkLabel11.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel11.ForeColor = System.Drawing.Color.Black;
this.linkLabel11.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline;
this.linkLabel11.LinkColor = System.Drawing.Color.Black;
this.linkLabel11.Location = new System.Drawing.Point(209, 173);
this.linkLabel11.Name = "linkLabel11";
this.linkLabel11.Size = new System.Drawing.Size(32, 17);
this.linkLabel11.TabIndex = 17;
this.linkLabel11.TabStop = true;
this.linkLabel11.Text = "洗浴";
this.linkLabel11.VisitedLinkColor = System.Drawing.Color.Black;
this.linkLabel11.Click += new System.EventHandler(this.linkLabel4_Click);
//
// linkLabel12
//
this.linkLabel12.AutoSize = true;
this.linkLabel12.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel12.ForeColor = System.Drawing.Color.Black;
this.linkLabel12.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline;
this.linkLabel12.LinkColor = System.Drawing.Color.Black;
this.linkLabel12.Location = new System.Drawing.Point(209, 221);
this.linkLabel12.Name = "linkLabel12";
this.linkLabel12.Size = new System.Drawing.Size(35, 17);
this.linkLabel12.TabIndex = 21;
this.linkLabel12.TabStop = true;
this.linkLabel12.Text = "ATM";
this.linkLabel12.VisitedLinkColor = System.Drawing.Color.Black;
this.linkLabel12.Click += new System.EventHandler(this.linkLabel4_Click);
//
// linkLabel13
//
this.linkLabel13.AutoSize = true;
this.linkLabel13.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel13.ForeColor = System.Drawing.Color.Black;
this.linkLabel13.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline;
this.linkLabel13.LinkColor = System.Drawing.Color.Black;
this.linkLabel13.Location = new System.Drawing.Point(165, 221);
this.linkLabel13.Name = "linkLabel13";
this.linkLabel13.Size = new System.Drawing.Size(32, 17);
this.linkLabel13.TabIndex = 20;
this.linkLabel13.TabStop = true;
this.linkLabel13.Text = "药店";
this.linkLabel13.VisitedLinkColor = System.Drawing.Color.Black;
this.linkLabel13.Click += new System.EventHandler(this.linkLabel4_Click);
//
// linkLabel14
//
this.linkLabel14.AutoSize = true;
this.linkLabel14.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel14.ForeColor = System.Drawing.Color.Black;
this.linkLabel14.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline;
this.linkLabel14.LinkColor = System.Drawing.Color.Black;
this.linkLabel14.Location = new System.Drawing.Point(123, 221);
this.linkLabel14.Name = "linkLabel14";
this.linkLabel14.Size = new System.Drawing.Size(32, 17);
this.linkLabel14.TabIndex = 19;
this.linkLabel14.TabStop = true;
this.linkLabel14.Text = "超市";
this.linkLabel14.VisitedLinkColor = System.Drawing.Color.Black;
this.linkLabel14.Click += new System.EventHandler(this.linkLabel4_Click);
//
// linkLabel15
//
this.linkLabel15.AutoSize = true;
this.linkLabel15.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel15.ForeColor = System.Drawing.Color.Black;
this.linkLabel15.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline;
this.linkLabel15.LinkColor = System.Drawing.Color.Black;
this.linkLabel15.Location = new System.Drawing.Point(78, 221);
this.linkLabel15.Name = "linkLabel15";
this.linkLabel15.Size = new System.Drawing.Size(32, 17);
this.linkLabel15.TabIndex = 18;
this.linkLabel15.TabStop = true;
this.linkLabel15.Text = "银行";
this.linkLabel15.VisitedLinkColor = System.Drawing.Color.Black;
this.linkLabel15.Click += new System.EventHandler(this.linkLabel4_Click);
//
// label2
//
this.label2.BackColor = System.Drawing.Color.WhiteSmoke;
this.label2.Location = new System.Drawing.Point(9, 158);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(240, 1);
this.label2.TabIndex = 22;
this.label2.Text = "label2";
//
// label3
//
this.label3.BackColor = System.Drawing.Color.WhiteSmoke;
this.label3.Location = new System.Drawing.Point(11, 205);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(240, 1);
this.label3.TabIndex = 23;
this.label3.Text = "label3";
//
// label4
//
this.label4.BackColor = System.Drawing.Color.WhiteSmoke;
this.label4.Location = new System.Drawing.Point(11, 256);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(240, 1);
this.label4.TabIndex = 24;
this.label4.Text = "label4";
//
// BQuickSearchBoardcs
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.linkLabel12);
this.Controls.Add(this.linkLabel13);
this.Controls.Add(this.linkLabel14);
this.Controls.Add(this.linkLabel15);
this.Controls.Add(this.linkLabel11);
this.Controls.Add(this.linkLabel10);
this.Controls.Add(this.linkLabel9);
this.Controls.Add(this.linkLabel8);
this.Controls.Add(this.linkLabel7);
this.Controls.Add(this.linkLabel6);
this.Controls.Add(this.linkLabel5);
this.Controls.Add(this.linkLabel4);
this.Controls.Add(this.pictureBox6);
this.Controls.Add(this.pictureBox5);
this.Controls.Add(this.pictureBox4);
this.Controls.Add(this.label1);
this.Controls.Add(this.linkLabel3);
this.Controls.Add(this.linkLabel2);
this.Controls.Add(this.linkLabel1);
this.Controls.Add(this.pictureBox3);
this.Controls.Add(this.pictureBox2);
this.Controls.Add(this.pictureBox1);
this.Name = "BQuickSearchBoardcs";
this.Size = new System.Drawing.Size(263, 402);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.PictureBox pictureBox3;
private System.Windows.Forms.LinkLabel linkLabel1;
private System.Windows.Forms.LinkLabel linkLabel2;
private System.Windows.Forms.LinkLabel linkLabel3;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.PictureBox pictureBox4;
private System.Windows.Forms.PictureBox pictureBox5;
private System.Windows.Forms.PictureBox pictureBox6;
private System.Windows.Forms.LinkLabel linkLabel4;
private System.Windows.Forms.LinkLabel linkLabel5;
private System.Windows.Forms.LinkLabel linkLabel6;
private System.Windows.Forms.LinkLabel linkLabel7;
private System.Windows.Forms.LinkLabel linkLabel8;
private System.Windows.Forms.LinkLabel linkLabel9;
private System.Windows.Forms.LinkLabel linkLabel10;
private System.Windows.Forms.LinkLabel linkLabel11;
private System.Windows.Forms.LinkLabel linkLabel12;
private System.Windows.Forms.LinkLabel linkLabel13;
private System.Windows.Forms.LinkLabel linkLabel14;
private System.Windows.Forms.LinkLabel linkLabel15;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
}
}
================================================
FILE: BMap.NET.WindowsForm/BQuickSearchBoardcs.cs
================================================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace BMap.NET.WindowsForm
{
///
/// 快速搜索面板
///
partial class BQuickSearchBoardcs : UserControl
{
public event QuickSearchEventHandler QuickSearch;
public BQuickSearchBoardcs()
{
InitializeComponent();
}
///
/// 点击搜索
///
///
///
private void pictureBox1_Click(object sender, EventArgs e)
{
if (QuickSearch != null)
{
QuickSearch((sender as PictureBox).Tag.ToString());
}
}
///
/// 点击搜索
///
///
///
private void linkLabel4_Click(object sender, EventArgs e)
{
if (QuickSearch != null)
{
QuickSearch((sender as LinkLabel).Text);
}
}
///
/// 点击搜索
///
///
///
private void linkLabel1_Click(object sender, EventArgs e)
{
if (QuickSearch != null)
{
QuickSearch((sender as LinkLabel).Tag.ToString());
}
}
}
}
================================================
FILE: BMap.NET.WindowsForm/BQuickSearchBoardcs.resx
================================================
text/microsoft-resx
2.0
System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
iVBORw0KGgoAAAANSUhEUgAAADYAAAA2CAIAAAADJ/2KAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsIAAA7CARUoSoAAAAAGYktHRAD/AP8A/6C9p5MAAAVgSURBVGhD7ZnZTxtXFIf7
N2IbUhEFqS99aBqJVO1LVTVUSlLAC1AqlFZBUEoSIkAkTdQkfShLG5K2hEolwW0IahVswMsMY8cebI9n
+rtzndH0eJY72ER9wPoeWGbu+XzOuYvHb1U143/OiWI7OFFsBy0pVtTD8ov14tJ0Yf5zefycNNojDXUx
RnsOxs8V5i4Xl77FBbiM3BiIoynq5a0nyu24lDglRUNSLCzHOREb7C/4F7sgcUq5FcMtuLFpKH8CK5aS
j+TJD16bReRE5AAMdTqTYBfgMu4qT5zH7WRAXwIoqrk95eZnLBIy5G3WTMOViSozfRiKDO6BqGLp2c/S
cDfLXFA5O6Yoy+hwNwYkIdwQUiyuXOfJO7qcndfpxLAkkCP+ioUfvjb9WkheM7xBoyEM7juHfBSLy9eY
XxvlbLCiI5eLUyQowUux/PSnRv6aRm8XPJeljRUS2o6rIiadNHK6bf3nBu/L4W41t0sELFwV2foSO2Y/
jjnHsRIRAQtnxVLy8fG1YDO8KUubq0SD46ioY/8QKXE+HtkbDO30dwRidzCUI/1tlht7j+PsdlDExi+Y
QviV/3pkGLoR4KVXXj6DJRmKJ7L8fI3IAAdFbPmCXQhFdevXRmjRl15JJZsVGx25ECUygCri4ISDieBC
wwutbv1WWJ3PTH9cPyyhjtXM3/KDK/bKElihYw7jswUo0VVRVaJEFcWrDLKx8P54L5zU7SfFxwt6rSLf
G9OK+dLTZfzgRuabjzLRMBkKuNWaKuJ8Kr7WpAdCNXm3UUDhF5Kd6u8gQzHMWuMUTJSoIo7KbC6Tm11A
FvO3YpqSre5vq89/0bXaq98f1NUiJgR+cGb9vvT9l45ZBAitzF4kSlQRB3pxRUB6EenhvbgfDbuBN0YG
sWChr75PlKii9MWZQJuym6KHhwdsxoz2ECWqmPc7N0iJCDKBLrRwVLRfYOGwaP8XhM4nOolSYEX4Fdfu
Vne3LGCmvZJr+ZSh1/Er5jXrTtsFFof/bOyOvSsn6JgWQoq+hcbCpte1xuQM/srfjnskEqH9C+07XVID
HZqSQTDpzvD+5Ifi1OQ93JW99gkWfDKmhdB0Kcxd8lZk+3LyIYId/DiJOYHWFCE9+o6h60ZdSw+dlpvG
tEBo/0XHd+lGmaTvElBE8+0MhD3iWaB9C6uzuEXdXnfYnS3wZkSWbpENMBXt1A72EVJZnEJ48l8CMr33
1Xt69ZBVeabPqxGhKLIBihwjMrFwbu4yQmLe5Of7YemWS1yJEtcktkmW/1xFk5AL7LC5InKMACKHMbN2
8wiM9lKWppFX2KDnuCuWFZxlUFNMDp7vWu5leviMx0ThVRY6jAGRWkNipz+krFxnk8AwMMeV5WlM21T8
7dRgBIufdHcEncfeg2FUdjaRS+/9xq3KwEFR8IMBLJHL7I0L2E64SvNLr5TxNpBj700FgRBOnugV/WAA
SslV30RykJudgVBu9iJOMZjjmBbYXbAEqi/W5PtX0iM9ONR4bCccnsLS5kOiwXFWBMrNPt+OtECSkFHs
wtijsf3w7Rj2vnIM3oU3PiUCFq6K+OyNT+C+5W4V66N+Nk0ELFwVQWljhZXbu41agy007IHJMgltx0sR
FBenBJvyCPAWbOmxE+d4H97dG2v14Z2JzjZuZtmmvuT9h/wtTfv6ARFFBuvL9j5I/mOJhHBDVBFgjisz
F3g6A4uacjx5WF885m8zARQ5WNXlifOIxDIa+EuNXvGn8BaBFU3Mr4YWBoW/GurCxW/uqyE7ODghMA6h
yuwlHOjxuQdnGYAfDq6exR+xoOCCSpmerwLRkuKb4USxHZwoto5m/AtKhcVDzR1sfwAAAABJRU5ErkJg
gg==
iVBORw0KGgoAAAANSUhEUgAAADYAAAA2CAIAAAADJ/2KAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsIAAA7CARUoSoAAAAAGYktHRAD/AP8A/6C9p5MAAAUuSURBVGhD7ZnbbxtFFMb5
02hIY7eAKGoBCQESiVQq8YJAasstIAo8IYF4pLQ09toO5ZI0FIk0jmxAalxn60t8WzvxFZrWidO0TeI4
zibhm1174xzvrndtB/khq+9hvJczvz1zzpmZ9VNVca/HdYTYDR0hdkMUcWt7F6pUd4zocbnqy5cuz6aH
p2JDY4HTLv+zdh+ExuBYACdxaSZfwm3kQX0RpHa8uCXuzRRWPvcKz3H+ARtvsQcsXNjCzVkdEUX4yU7a
A7gBt13yCngEDxJTRmQa8c/s8rmJ0IBt1sKFGI0zZnUmTjiFE64klVPAJXYDI2aPvDUR8maXicGWMoGY
Xy2/fysqwYWtDomMoaQMKMlYHTE8iMcvTEZhihjXkVFEd7r4glP2XKzuM8LRUpJfGWgIpmCQdKElQ4hX
7+YGbH4WbSY8pyXmUZiCQZglHamqNeK3MwsIecRTu85rluzOCMzCOOmuWS0Qr9zNSnzR7vHJkikR2fx3
sxnSKZEe4vRCEcNR9x/poxuq+dI/taAXl5qISDopP+a0/DfgEIzI4tT1vVNAF+gop53jmogoDSx/1fID
HVu5+AfT+U+9hZY6+1u63x4nFhokZ0/o/GSUAChSR0R9RgFj9UXNf322ePD++p7hAy+DtyJGGpRER+jO
k1kiGLJUEDFNYf5AmdUKwaevRXd3a91vbu882RJVJdZvcswt99sxGtTOvthwh89OhFRnSBVETKY6LoSA
KPf9Q7CI9jENnXTElzaqhhDrjrxdKBEYSAXxkgfvJEchMVSTgnjRXRtBFp31tLDU23222FxxwxhiSo7I
zzwJAgNRxLWKiIUJKzQaLoQIYt9I7PxU7pWfk8c5Ac57dzL7+tj8cS5hClFyZARdP6mIBIkiSqPMY3nS
ZGJfBxA54Yu//kU7/XATrO/8kUW7VN4+NhIziQhHYqx5ABAkivg9n8UiT2eUoUZEeO7rmUW0i+tVYOEM
2utbItxpHjFhsQcv83SyoYjD7rhOLssiXvzyb+bFzGoFXsQoo7262Y4X5bz+yB0nSBRxaDzIZhTtQIRI
LPbbYh9O51/7NSXH4gV3bvDGApgaEVFKIQQoMXVQSXQ9OB4kSBTxRZe0qDGDCEeCBkxIZJY9rB3HvKcg
3l+r8ovrs/fWvvEttphpHJHTozxBooiWER9b19CHD4ggwmfx5TInjebLPyWBdTP1ECgKonKglOMGpTw1
CYjRk/Y7BKlTRCPp8qgi3hBWKuIO2ngf7YWFMUSzA60gPljTRLweKz1ji3tzj9FuhWhgoNtIlzfH52NL
ZVt4CQP90vVk+MEGfNY40EgXILrTj9DWRzSULqaLjoF0MYposOiYLd1gIlcVmUU0WrpNT4DdRDQ2Abax
jCBXFZlENLyMgPQXYwg4gojVl6oURFdEQszoIbJRNrgYg3SWtMiJN8bm35MmYhxXAkW0dYSJG7dhEfSx
p4DCifZXt++du9m8m4ELzSxptTYG8N+rv6R2lD1BB8ewp3AgQsxuDCDV7ZXVmTo1KsjO6OTAduft3zMW
h2K55kIT2ytZF2+pbFKxVMEUgljsUAiYfT4pCrEnJgCKNBGx1T/l0tvqd0edbPWhXv9gIuvq4X92ap5O
iFogQr3+8U5Wr38CldXrH5JlIcdRiVDAUGbRkxmPMs9JcIf5OV6Rt4M/NTB/HO6fGoowTWEe792/hhqF
ldudf1awCv5kOjE0HjrzI/8854fOjPLYYOAkLvkKK7iNPGhKHSH+PzpC7IaOEDuXuPcfNGWnyX+qdSUA
AAAASUVORK5CYII=
iVBORw0KGgoAAAANSUhEUgAAADYAAAA2CAIAAAADJ/2KAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsIAAA7CARUoSoAAAAAGYktHRAD/AP8A/6C9p5MAAAc2SURBVGhD7ZlpVxNJFIbn
H8+4Aeqo4zhnBgGJomwqCIiyhS2ssskOyk4SkE0gLGFxQAkBQiA9T6eYJhbp7gTinPlAn/dwOtVVdZ/c
uvdWdfjp8Ej5n+sSMRa6RIyFZMSDw+PI5fH4PjlW3teMWl905iY1pt+tTo23WuKt3PCx/GUnj6YcK3Tz
+QOIIdqNgSSkc3nRr0w5Vm0FfU9uVVjiYCp/HF8RVjyiA93oPDPhZqA8VQSKGtE5upSf2nxKlqDqSUJl
WImnGmuBpXlidEma0FRRIK67d8qyOrBkSnZWp6xxVmt258aaR5rcQJEi2gcXn/5apXouSrhQibFM8uxu
tWNwUTKhpwgQ/Up77bjmPMnqOaSCBt3Z2WCPJDrNEP1KY+lgDPmENMqWihFTShPEjrqg/2IHFypBiQnJ
qCQjROJP+E+aOoYSlM4hl2Q6VLqI62se8iPC9U29YU25Vpp0pVgo+WoJHy1x5VK3sxIrTvZsrOvmuC6i
Wl+C+StNKgmU5KvFZc87Bto/zU+515a23K6/5yZW+1smitJbH14penS9TBoiCRMYsj7vlAA0hUd0jiyZ
hiC2gWu3jXo9+4rO9W3L21jy8eEvRbhZGh4qlTLOOjm2LGEIhUP0K+wfxkuM817+Vfdl7dsJi6LgPBwJ
cVf9+EjPzKb768kDRVme38y4V2XgTgxhjr0nbHaHQWT/NXYhfK8tTQd7PswfHwfG+ucy71cTgrTDgbjB
c3yHT6MuJaBSer7t8dGYEqMzk24JBoVBZMs3iEKWLPtBzcH+IYb3dg/epLWQHGQG7WCBnpNYL1oQN2XZ
7aLzzrY37bbaKE0opCLGl9cU9kswSEbc9fo5mOB2aQpNcKwufsGk13OQ/UcNDhPtydeKXTPrqscUBecl
/vJWtNOhIPXdoe+I9unxJaBF+1lhNO12pXf/SEKSEaedboNVZqVqC/sER0lmm8ZHe5N1kEbX7PrG6jY3
HBa1FKFb3Zv+4CCFNNdLnZO15sz2PZKM2F47ZrDKBJwgmHUsh/oDiJ5GO+0dtWMkDTckcmjk4VSShnbq
kZ4jxVqrG/f3SDJiZU633irTTshjhuvN0xacQQtwmIQmN6nh6OhYPCX40oMpzFfiL93obCvo5VHgOPD4
pu6ORXtVbo+EJCO+SmrUG4+xd2UDmCFLqMlYTY0ro0R/nlxtrRyipfBxs2Ngfrh7hoxJuV7S1TD+edLd
WTdGmKrZk2Al/Rlufd6hu9bxFXmPmiQkGTH9XrUeIg4TiygWC806V/goru5Gu/Co+EslOnmgKJRJGoNB
ohbLtqrh0BgIFaYzfrNJSDKiJUE97ksjhTBs//gZG87BBe5T40oDgQAl+sWftf7Do63NHZJd9Ez8+e2R
/9jzdY+UZ+/Z9/p4BOLS3AbD+5qdEGvThgrThKOEFAUi8472zmID54GYdLWY6k01mRhaoJFcBoKxCKDt
Lx6WlS9D8LEJCcT15S16EgAGXjRHNFho5mV2bGysbGMP4uq8brxFCzUyL6UR7qwHtqd31BwqzXrvO/Dz
yHdwWJzRxlgoCWJa6os+GMSi+UIbpAvzEunYYH3hoJu6XrfKCyxNj26Uki5TYy6ecg11TfOIzOWRJV7d
D+msVYNXyQ26ewzpkvJOQpIRK/SLDiL+Dn2qb0hhlU8sTXD3EyUdB29vergpetaqZnHcSdjQub91gna2
QS1kz4rO5kXHuHSrqdqnhiMri3s0Z2gx0FD0QdTw+rf92mpyk363UuzUIvFFu6ST0l1vVrqnnUbHHJgy
f7eRvxibHF5kzxBOop3lIzNo5yIKM+6fxDSPOFYuBrdvYtGobuscdmRE02MEPnhfPSJQBjumRA0X7UQq
B++psaXCJ83CVTxKulJEXov+tvwePRcijKbdqvTuqR4IlYyIbPm9BmuNcJ5zcF5YpYyTxWqZZLNRgdQX
FzzHPTdsM6IWchmUQyRWueZ1BIcxZHqkhQDfaPsHWzP3vL4QnRRtRJpXveomEsh9tUdA6W1y8MVMECM/
0nI6z0ttwu3GlDip5nWvKHXaRRSKo2HoBSgbDNuMXkXEEOaieDFAE8MuY0cK4RVOEi0VQ7z4iRcA42u8
f44vJk2ChAsnoni9Cqo0spdURMVRt76bVk46FTmdLHFYqYfcuNM6pUnl4yU1O8qXVLTu3on8VR/RU2SJ
gaQhiMkZ+OxO1Xle9ZF9YEFdbv0CdHEFv5jVMWT0Q54RIvqxPzsFQ/BCPzup+sE/3jVZh8JmcajMENEP
+wm0zTZqyociQAxqfGAhhj8kM5U9lj8k/ytyvDSzXXNnVKCiv3BeWVYHU0mTGygKRCHnsIuXNCypHjVj
PSUL/lMjP7WZTUGa0FRRIyKfPzBlX6nO643iX0P5fWz9kUTeWZ0HUdPu7iGG22vGy1925SQ2ZNyzWYL/
YOMm92EDjeQZHTjgSQOj0oUQ/xtdIsZCl4gX15HyD/yHYWPwAW2CAAAAAElFTkSuQmCC
iVBORw0KGgoAAAANSUhEUgAAAEAAAAAeCAIAAAATj48OAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAGYktHRAD/AP8A/6C9p5MAAANxSURBVFhH7ZjLTxNRFMb9
N925ceXKhYk7Vy7cmBii0Z1hISxMjLogIUHBApa3hECBQt/Q92v6nE479UfvdDK9U+5MGtNiwpcTcs+9
5wznu/ec++iD/n+OewKzhjeBnmlozUy2EkoW92P5YDy/nSoeoNLJkGU0O6gIdHudUj1GxAXtsqmXjG7b
NHs9s9vpNlELtQhDGHR7uuUwC9xKoNbKMd/lRtI0u1aXCwxhgBnGVtfUMZ5ApZFKFnbbRs3SlcAMY1ws
fboYQ4DpTBb2jF7b0n0AY1xmsg4yAVKclPA5907gguP0y1omUKrHERpGtxXNbcbyW1Sqp0RzvzGm1oWv
HxRr0aWDF2wGlj4K/vvq8et0+Wg99HZ+7aFTFjce42vZSQSYP6JhEWhHshstvUKDmJyxukUE3dTLuKAq
FoFoENGWCNA+SnwVbaJfO3mzfvrO7JuiR4ERAlozXaxFRJtJtRtGT2evHCtkv9MSdz4iVDf8EGgb2srR
q+XDl9AQQ2qMEOB4sr+YKOyIBgdWqvhHIRgIS1xYh0wlJFQ3/BDYDn/8dTJH9JtnH/YjC2JUgRECzs2H
aJjgertAfE6hx93J/sMZJ1zYUsUX3CB6KaGdYqcQuMwGvu0827mYl2yEwNaykwjEckE77Yim3dHC6Z97
kQWnUKyI1Jko7Db1ymDRzNgwo9RQ1AC1+zn45PRqWag2nDY2VAR0o3GSWpJiHUvgIrNG8qgJEOv33ecU
ulAlAkQm5jWSDbDPfAo8si1teBOQUmgCAooU8klg4/T9fnTRaWnDm4BUxBMQUBSxTwJAsrThTcC5jU5G
gLCqzWvxBQnTIOA8yCYgIM612w4ywvqy/VTaT5yiJiA6z69XLH2IEQLAvkoM8qGSLh+fp384hR53Z64a
1o36ZSbg/yohQbECgdCcYAh/9/LKBOzLHARQW50qbW/paPwNp1dnf5kD4jody23RJlOZiUrjinPqqnQo
kkSIKNa8dsENYvB+4DqdHXxgqhhDABBQKLXUMRrx/M06EC6nL5njnHU6eWTapYILT03hPk2MJwB48pJL
ueoZyU0isQLS9UFrZXlSZqtn1PRw7/K+PP5z3EoAcCpZj/pahMLijOOcJmjxqCdohu7uo94Gdcl83/ys
clMYwXh+a/izSnr6JeuGN4E7jnsCs0W//xdmLHM1/XaxGgAAAABJRU5ErkJggg==
iVBORw0KGgoAAAANSUhEUgAAAEAAAAAeCAIAAAATj48OAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAGYktHRAD/AP8A/6C9p5MAAASlSURBVFhH7VdZb9tGEO6/
Tx8SNL0QF71yPNTuEaA5jBaNAzR+sWXJcuRDl5XYkayTohiJ5rmk+g1ntaYpmnZRQEqBfCAM7uysPN+c
y0+m/3N8JLBs3ICAEGI08ppNt9FwqhWnUnaP61hCOA0CqbM8ZBEIfd/v9Zxq1W+3Rb8vej0xGASaJrQB
XvxOG3ygEAohDywDVxIQxgjO9jsdmBuen0/DMHSc0LZCywpdl5amCTJ+tws1YRjy2MKRTkBomluviW6H
jHZdEGAOs23BEtqyLESGlDVN7i4WKQTgTrdeF90uUhxuhrlS3ut5hwfe0SEczxLkGBFDkRCHOlXFwjFH
IAgoc87OpjAO1s8gOh1ne0s9wXAoN0AjIolw4eDiyzpJwO/3vJMTGBSMx1IUwdsvxQl4lYrciEDp5Pto
TX6/L0VXIDDN0epPKt8mL/7Cw+8Kbq3KOu6bN/07t/uf3rr03LkNuVRNEoD7qxV4F8UqJTNkE6CaRjFo
Go5nB8He3zfWVlVaphIA7L2isbaGCpTrGULbHj16eCUBzn5K/bmTGSnEAAHQ8N6+zepIQsB6cJDLNAIw
DibCUF6Kka7/8D3+8vIaApQDp6cq9aEdGEboebycFfHRRRE7TmCMqKvSIsQLjnutVrSZAsQH1jgHBymJ
ET323t5/IoBuGOhDaiw42Wyys91cDlOMFeIQ7baT2yad3Da1rOjXMeAwp1khAdDTHz6ANco4vGA5uPsZ
piFLACbglMup2Q95FgHn8DC0zhEBPGy94oAahQI1/igg+N/Sen5y27SF0TaZUC9Kw2RjQ/v6K/3BfUUA
/h5+9y0ec3OTJUAiAubmK+3LL24aASIQjS24/MK46OGmhCHg12p4QQ0kFZBLtk3MUcdpMF++tPJ5ZRx+
8P2T38fPn42fPY33pTgB3L4oRJ/fHa6ssF+uIeDWavhdui/MR2DmeDCkF8uKK8gIWFag6/iv0Y+lIG7c
ZOOFVShwEVu53Hh9PaEDJyI49uvXVDbl8vCblcmff8C8LAJUxO029RMMhHfv2DiqgR6leAKi1bqogU4H
EjD3W82MIlbGWYW8sbqKWckEINHv/wih0sEkhfWQqCJGXhi//GwXd7MI4ALnlo/gfl7iDDzKLgeCwcCr
lDEBgtmVgVxOQyPK16gL4XhGG2XjkKjavXt+lzgzAdpqNFAh+Asd1AkCYr76G/J/14UwAexiEdkibYoh
URWKgwINYyGc/VLGIGPjjN9+RfKwRBEAIByvP8cg4iixMEEAbR1L7/SEl8BlAtFVwj0+VkFQuH4Sm6bX
OI43xHlwBOLeiRNgzOswkD/cTN8/fozck9J5AlEQdpEbCQ5uKUHgUq+EMi45TqnE3XaRmCOAqOm6XSjA
B1zNDBpbMQJqGAOwHsr2buHDuE5HwEC1C3mKA6byLKdF+wxxQC5dDOboyyY4N6GMI1K4WKQTACgOOzvU
VR2bojHrRYSo4ZDQcfxWi6xfhu8ZVxIA6KP+rGXnd1D1mCB0sUOrQevE+3iMzwZsEcOF530cWQQk8LWF
b4tazSkW7VzO3tqCy118yGsDda1fIm5A4MPGRwLLxXT6D9akp6+FjJWbAAAAAElFTkSuQmCC
iVBORw0KGgoAAAANSUhEUgAAAEAAAAAeCAIAAAATj48OAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAGYktHRAD/AP8A/6C9p5MAAATPSURBVFhH7Zh7U9paFMXv
9/8a9zFjr7W1tdb6arVTi1WQl6AiSEIgQAiBQICAXu4v7DQDweb2/uNjpmsyznnsE/baZ699Tvxt+szx
i8Bj478J3N39Y/eGjaZdrVlKxeTRqu2GYTPIlG/0eIgicHt717YcVTNbZn8wcMfjWzwGk8mdM3AZZAoD
zPwFj4EfEiDABNvqDPDYH1oCU1bHwQxjf+jBcT+BTndAnrjjid+PBGYYs8TvPyzuIdDrjyrV9uT/JAbG
LHmUfQgTIMtJCdf9qdjPg31g4cPrIUwAUfLQgEn+qpnN13lG7q3MAsN0yqol7arevSg03e+z6EHW3gvK
wOt3Z7+vfOWhkUgp0g6elVcnptUXY+rEzqdc+lyTbgQWCEj4pTgi3/OLBo1CqVWr27P5ab3ZO8vUktka
kcYsk6tjk87psGIWTQfLlwGBrb0sLt4oxsaHFATo+nPTKeOwEgJUjS+xQoiePPMkBQsEyH6j1ZM2YVY1
L9I4Xa54DSgl0lVc1xv2yJ1QVbVal3EEkMrWmKXNcl5CYxnRBC4KOoPD4ZjYHx5dvXwTX9tIJDNqUAKr
usVI7LQYKooLBJqGTYGXNrnR6XqixFE2gWXXpVbb8rwsKZ7EiXTustFqO/2+e1Ewvp4oTDmOy0u89UtY
TiEI4PH6pjf4598xSZh4Svn4+YIADYbjvYP87qdcrd7ZP8xjRq2TV81jgcB88fGcmyVG33Gvii3GZR/A
5bXR63s89bp9VTTgUyybbBQjxO/enwHROxAC25i/0ncPckR97zD/4vXJ1m4mmakQHd7jG82wQKCsepEW
4Fwmp9MgumiAeN+ovmf4yiD5Y5h90qlS7SiaJToRGYhZCMsEZDeC56/V40Kxsf3xHHffz9zt2v7Zglfc
ZY6Or+GDGQoJ/FwgwG/Pn7sEHv/IH9kWIh0IFNfJ+0y+brad4XAyHE0oVoxj8PME+Lu5k1Y1Ly7tjvNu
Ox06DTF+u5WKPiIXCGg1azxZqJg4ja/Svb5pabqnWsAm3CjtQrHVMLzZdmdAXtFAMNz5ZiZh3KsBRHnw
5ZLZ43gJ7YbMlp+1t/HQcflDEQPCT27wV7rOYEwN7dreetkZEQNOJ1LVru0VnwgRE0jCGdJAy+ytbyZp
v9pILC8M6AlYy5IoDSAd3uh3Zl5SSQMCwO6N4IA8oFG8Mctqm9QneaQ6gYgyWm90CS2pEhJxPKn88SJ2
llbFLAAiDrEiOUkzCpffn2GBgGTwXKI75AyFUroC4s3hRbwpOHTZBKm2IPogw0V+nmOkVDY2d9CoCgHa
q2/i2/vnK2vfEmlF1hIdqufq+ikpLWsB2sQAifv971ggAIKrBCBJUCoXipBP3CCo/dKmBAX3H86yiKtE
7KSYv9QpL6Qy6Z7NVTmtyB8+Kphl6+CD35nzKpTiyTJHgSz8sJ8VAUCypHhKm0eYgGwCl7nRaIJzXoms
WBwF/vQM5JWcA4BZuSk9lcscIIk50aj6sVOVe863REUqTIBlAtTZp3KdFlAxONROk1osrh4claj381kU
IsD+PK0PGoF8UhZKBjROzrT53AgIwKqqk2NP75NSgNOIkq0olVt9Z0T9oc4ALhHo1Ww/7Y/6AISZAIf/
rdJ8Dv9WeRb4ReBxMZ3+CwQqqEPzRWjfAAAAAElFTkSuQmCC
================================================
FILE: BMap.NET.WindowsForm/BQuickSearchControl.Designer.cs
================================================
namespace BMap.NET.WindowsForm
{
partial class BQuickSearchControl
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BQuickSearchControl));
this.label1 = new System.Windows.Forms.Label();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.pictureBox3 = new System.Windows.Forms.PictureBox();
this.pictureBox4 = new System.Windows.Forms.PictureBox();
this.pictureBox5 = new System.Windows.Forms.PictureBox();
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
this.linkLabel2 = new System.Windows.Forms.LinkLabel();
this.linkLabel3 = new System.Windows.Forms.LinkLabel();
this.linkLabel4 = new System.Windows.Forms.LinkLabel();
this.linkLabel5 = new System.Windows.Forms.LinkLabel();
this.linkLabel6 = new System.Windows.Forms.LinkLabel();
this.linkLabel7 = new System.Windows.Forms.LinkLabel();
this.linkLabel8 = new System.Windows.Forms.LinkLabel();
this.linkLabel9 = new System.Windows.Forms.LinkLabel();
this.linkLabel10 = new System.Windows.Forms.LinkLabel();
this.linkLabel11 = new System.Windows.Forms.LinkLabel();
this.linkLabel12 = new System.Windows.Forms.LinkLabel();
this.linkLabel13 = new System.Windows.Forms.LinkLabel();
this.linkLabel14 = new System.Windows.Forms.LinkLabel();
this.linkLabel15 = new System.Windows.Forms.LinkLabel();
this.linkLabel16 = new System.Windows.Forms.LinkLabel();
this.linkLabel17 = new System.Windows.Forms.LinkLabel();
this.linkLabel18 = new System.Windows.Forms.LinkLabel();
this.linkLabel19 = new System.Windows.Forms.LinkLabel();
this.linkLabel20 = new System.Windows.Forms.LinkLabel();
this.linkLabel21 = new System.Windows.Forms.LinkLabel();
this.linkLabel22 = new System.Windows.Forms.LinkLabel();
this.linkLabel23 = new System.Windows.Forms.LinkLabel();
this.linkLabel24 = new System.Windows.Forms.LinkLabel();
this.label2 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit();
this.SuspendLayout();
//
// label1
//
this.label1.BackColor = System.Drawing.Color.LightGray;
this.label1.Location = new System.Drawing.Point(13, 24);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(273, 1);
this.label1.TabIndex = 0;
//
// pictureBox1
//
this.pictureBox1.Cursor = System.Windows.Forms.Cursors.Hand;
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(273, 7);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(13, 13);
this.pictureBox1.TabIndex = 1;
this.pictureBox1.TabStop = false;
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
//
// pictureBox2
//
this.pictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image")));
this.pictureBox2.Location = new System.Drawing.Point(15, 36);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(20, 20);
this.pictureBox2.TabIndex = 2;
this.pictureBox2.TabStop = false;
//
// pictureBox3
//
this.pictureBox3.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox3.Image")));
this.pictureBox3.Location = new System.Drawing.Point(15, 67);
this.pictureBox3.Name = "pictureBox3";
this.pictureBox3.Size = new System.Drawing.Size(20, 20);
this.pictureBox3.TabIndex = 3;
this.pictureBox3.TabStop = false;
//
// pictureBox4
//
this.pictureBox4.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox4.Image")));
this.pictureBox4.Location = new System.Drawing.Point(15, 97);
this.pictureBox4.Name = "pictureBox4";
this.pictureBox4.Size = new System.Drawing.Size(20, 20);
this.pictureBox4.TabIndex = 4;
this.pictureBox4.TabStop = false;
//
// pictureBox5
//
this.pictureBox5.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox5.Image")));
this.pictureBox5.Location = new System.Drawing.Point(15, 149);
this.pictureBox5.Name = "pictureBox5";
this.pictureBox5.Size = new System.Drawing.Size(20, 20);
this.pictureBox5.TabIndex = 5;
this.pictureBox5.TabStop = false;
//
// linkLabel1
//
this.linkLabel1.AutoSize = true;
this.linkLabel1.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel1.Location = new System.Drawing.Point(41, 37);
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.Size = new System.Drawing.Size(56, 17);
this.linkLabel1.TabIndex = 6;
this.linkLabel1.TabStop = true;
this.linkLabel1.Text = "快捷酒店";
this.linkLabel1.VisitedLinkColor = System.Drawing.Color.Blue;
this.linkLabel1.Click += new System.EventHandler(this.linkLabel2_Click);
//
// linkLabel2
//
this.linkLabel2.AutoSize = true;
this.linkLabel2.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel2.Location = new System.Drawing.Point(100, 37);
this.linkLabel2.Name = "linkLabel2";
this.linkLabel2.Size = new System.Drawing.Size(56, 17);
this.linkLabel2.TabIndex = 7;
this.linkLabel2.TabStop = true;
this.linkLabel2.Text = "星级酒店";
this.linkLabel2.VisitedLinkColor = System.Drawing.Color.Blue;
this.linkLabel2.Click += new System.EventHandler(this.linkLabel2_Click);
//
// linkLabel3
//
this.linkLabel3.AutoSize = true;
this.linkLabel3.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel3.Location = new System.Drawing.Point(159, 37);
this.linkLabel3.Name = "linkLabel3";
this.linkLabel3.Size = new System.Drawing.Size(32, 17);
this.linkLabel3.TabIndex = 8;
this.linkLabel3.TabStop = true;
this.linkLabel3.Text = "旅馆";
this.linkLabel3.VisitedLinkColor = System.Drawing.Color.Blue;
this.linkLabel3.Click += new System.EventHandler(this.linkLabel2_Click);
//
// linkLabel4
//
this.linkLabel4.AutoSize = true;
this.linkLabel4.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel4.Location = new System.Drawing.Point(194, 37);
this.linkLabel4.Name = "linkLabel4";
this.linkLabel4.Size = new System.Drawing.Size(32, 17);
this.linkLabel4.TabIndex = 9;
this.linkLabel4.TabStop = true;
this.linkLabel4.Text = "如家";
this.linkLabel4.VisitedLinkColor = System.Drawing.Color.Blue;
this.linkLabel4.Click += new System.EventHandler(this.linkLabel2_Click);
//
// linkLabel5
//
this.linkLabel5.AutoSize = true;
this.linkLabel5.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel5.Location = new System.Drawing.Point(263, 37);
this.linkLabel5.Name = "linkLabel5";
this.linkLabel5.Size = new System.Drawing.Size(27, 17);
this.linkLabel5.TabIndex = 10;
this.linkLabel5.TabStop = true;
this.linkLabel5.Text = "7天";
this.linkLabel5.VisitedLinkColor = System.Drawing.Color.Blue;
this.linkLabel5.Click += new System.EventHandler(this.linkLabel2_Click);
//
// linkLabel6
//
this.linkLabel6.AutoSize = true;
this.linkLabel6.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel6.Location = new System.Drawing.Point(229, 37);
this.linkLabel6.Name = "linkLabel6";
this.linkLabel6.Size = new System.Drawing.Size(32, 17);
this.linkLabel6.TabIndex = 11;
this.linkLabel6.TabStop = true;
this.linkLabel6.Text = "汉庭";
this.linkLabel6.VisitedLinkColor = System.Drawing.Color.Blue;
this.linkLabel6.Click += new System.EventHandler(this.linkLabel2_Click);
//
// linkLabel7
//
this.linkLabel7.AutoSize = true;
this.linkLabel7.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel7.Location = new System.Drawing.Point(41, 69);
this.linkLabel7.Name = "linkLabel7";
this.linkLabel7.Size = new System.Drawing.Size(32, 17);
this.linkLabel7.TabIndex = 12;
this.linkLabel7.TabStop = true;
this.linkLabel7.Text = "餐馆";
this.linkLabel7.VisitedLinkColor = System.Drawing.Color.Blue;
this.linkLabel7.Click += new System.EventHandler(this.linkLabel2_Click);
//
// linkLabel8
//
this.linkLabel8.AutoSize = true;
this.linkLabel8.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel8.Location = new System.Drawing.Point(76, 69);
this.linkLabel8.Name = "linkLabel8";
this.linkLabel8.Size = new System.Drawing.Size(32, 17);
this.linkLabel8.TabIndex = 13;
this.linkLabel8.TabStop = true;
this.linkLabel8.Text = "快餐";
this.linkLabel8.VisitedLinkColor = System.Drawing.Color.Blue;
this.linkLabel8.Click += new System.EventHandler(this.linkLabel2_Click);
//
// linkLabel9
//
this.linkLabel9.AutoSize = true;
this.linkLabel9.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel9.Location = new System.Drawing.Point(111, 69);
this.linkLabel9.Name = "linkLabel9";
this.linkLabel9.Size = new System.Drawing.Size(44, 17);
this.linkLabel9.TabIndex = 14;
this.linkLabel9.TabStop = true;
this.linkLabel9.Text = "肯德基";
this.linkLabel9.VisitedLinkColor = System.Drawing.Color.Blue;
this.linkLabel9.Click += new System.EventHandler(this.linkLabel2_Click);
//
// linkLabel10
//
this.linkLabel10.AutoSize = true;
this.linkLabel10.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel10.Location = new System.Drawing.Point(158, 69);
this.linkLabel10.Name = "linkLabel10";
this.linkLabel10.Size = new System.Drawing.Size(44, 17);
this.linkLabel10.TabIndex = 15;
this.linkLabel10.TabStop = true;
this.linkLabel10.Text = "麦当劳";
this.linkLabel10.VisitedLinkColor = System.Drawing.Color.Blue;
this.linkLabel10.Click += new System.EventHandler(this.linkLabel2_Click);
//
// linkLabel11
//
this.linkLabel11.AutoSize = true;
this.linkLabel11.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel11.Location = new System.Drawing.Point(205, 69);
this.linkLabel11.Name = "linkLabel11";
this.linkLabel11.Size = new System.Drawing.Size(44, 17);
this.linkLabel11.TabIndex = 16;
this.linkLabel11.TabStop = true;
this.linkLabel11.Text = "咖啡厅";
this.linkLabel11.VisitedLinkColor = System.Drawing.Color.Blue;
this.linkLabel11.Click += new System.EventHandler(this.linkLabel2_Click);
//
// linkLabel12
//
this.linkLabel12.AutoSize = true;
this.linkLabel12.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel12.Location = new System.Drawing.Point(41, 99);
this.linkLabel12.Name = "linkLabel12";
this.linkLabel12.Size = new System.Drawing.Size(56, 17);
this.linkLabel12.TabIndex = 17;
this.linkLabel12.TabStop = true;
this.linkLabel12.Text = "公交车站";
this.linkLabel12.VisitedLinkColor = System.Drawing.Color.Blue;
this.linkLabel12.Click += new System.EventHandler(this.linkLabel2_Click);
//
// linkLabel13
//
this.linkLabel13.AutoSize = true;
this.linkLabel13.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel13.Location = new System.Drawing.Point(100, 99);
this.linkLabel13.Name = "linkLabel13";
this.linkLabel13.Size = new System.Drawing.Size(32, 17);
this.linkLabel13.TabIndex = 18;
this.linkLabel13.TabStop = true;
this.linkLabel13.Text = "银行";
this.linkLabel13.VisitedLinkColor = System.Drawing.Color.Blue;
this.linkLabel13.Click += new System.EventHandler(this.linkLabel2_Click);
//
// linkLabel14
//
this.linkLabel14.AutoSize = true;
this.linkLabel14.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel14.Location = new System.Drawing.Point(134, 99);
this.linkLabel14.Name = "linkLabel14";
this.linkLabel14.Size = new System.Drawing.Size(32, 17);
this.linkLabel14.TabIndex = 19;
this.linkLabel14.TabStop = true;
this.linkLabel14.Text = "医院";
this.linkLabel14.VisitedLinkColor = System.Drawing.Color.Blue;
this.linkLabel14.Click += new System.EventHandler(this.linkLabel2_Click);
//
// linkLabel15
//
this.linkLabel15.AutoSize = true;
this.linkLabel15.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel15.Location = new System.Drawing.Point(171, 99);
this.linkLabel15.Name = "linkLabel15";
this.linkLabel15.Size = new System.Drawing.Size(32, 17);
this.linkLabel15.TabIndex = 20;
this.linkLabel15.TabStop = true;
this.linkLabel15.Text = "超市";
this.linkLabel15.VisitedLinkColor = System.Drawing.Color.Blue;
this.linkLabel15.Click += new System.EventHandler(this.linkLabel2_Click);
//
// linkLabel16
//
this.linkLabel16.AutoSize = true;
this.linkLabel16.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel16.Location = new System.Drawing.Point(207, 99);
this.linkLabel16.Name = "linkLabel16";
this.linkLabel16.Size = new System.Drawing.Size(35, 17);
this.linkLabel16.TabIndex = 21;
this.linkLabel16.TabStop = true;
this.linkLabel16.Text = "ATM";
this.linkLabel16.VisitedLinkColor = System.Drawing.Color.Blue;
this.linkLabel16.Click += new System.EventHandler(this.linkLabel2_Click);
//
// linkLabel17
//
this.linkLabel17.AutoSize = true;
this.linkLabel17.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel17.Location = new System.Drawing.Point(246, 99);
this.linkLabel17.Name = "linkLabel17";
this.linkLabel17.Size = new System.Drawing.Size(44, 17);
this.linkLabel17.TabIndex = 22;
this.linkLabel17.TabStop = true;
this.linkLabel17.Text = "加油站";
this.linkLabel17.VisitedLinkColor = System.Drawing.Color.Blue;
this.linkLabel17.Click += new System.EventHandler(this.linkLabel2_Click);
//
// linkLabel18
//
this.linkLabel18.AutoSize = true;
this.linkLabel18.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel18.Location = new System.Drawing.Point(41, 122);
this.linkLabel18.Name = "linkLabel18";
this.linkLabel18.Size = new System.Drawing.Size(44, 17);
this.linkLabel18.TabIndex = 23;
this.linkLabel18.TabStop = true;
this.linkLabel18.Text = "停车场";
this.linkLabel18.VisitedLinkColor = System.Drawing.Color.Blue;
this.linkLabel18.Click += new System.EventHandler(this.linkLabel2_Click);
//
// linkLabel19
//
this.linkLabel19.AutoSize = true;
this.linkLabel19.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel19.Location = new System.Drawing.Point(88, 122);
this.linkLabel19.Name = "linkLabel19";
this.linkLabel19.Size = new System.Drawing.Size(56, 17);
this.linkLabel19.TabIndex = 24;
this.linkLabel19.TabStop = true;
this.linkLabel19.Text = "楼盘小区";
this.linkLabel19.VisitedLinkColor = System.Drawing.Color.Blue;
this.linkLabel19.Click += new System.EventHandler(this.linkLabel2_Click);
//
// linkLabel20
//
this.linkLabel20.AutoSize = true;
this.linkLabel20.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel20.Location = new System.Drawing.Point(41, 151);
this.linkLabel20.Name = "linkLabel20";
this.linkLabel20.Size = new System.Drawing.Size(31, 17);
this.linkLabel20.TabIndex = 25;
this.linkLabel20.TabStop = true;
this.linkLabel20.Text = "KTV";
this.linkLabel20.VisitedLinkColor = System.Drawing.Color.Blue;
this.linkLabel20.Click += new System.EventHandler(this.linkLabel2_Click);
//
// linkLabel21
//
this.linkLabel21.AutoSize = true;
this.linkLabel21.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel21.Location = new System.Drawing.Point(80, 151);
this.linkLabel21.Name = "linkLabel21";
this.linkLabel21.Size = new System.Drawing.Size(44, 17);
this.linkLabel21.TabIndex = 26;
this.linkLabel21.TabStop = true;
this.linkLabel21.Text = "电影院";
this.linkLabel21.VisitedLinkColor = System.Drawing.Color.Blue;
this.linkLabel21.Click += new System.EventHandler(this.linkLabel2_Click);
//
// linkLabel22
//
this.linkLabel22.AutoSize = true;
this.linkLabel22.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel22.Location = new System.Drawing.Point(128, 151);
this.linkLabel22.Name = "linkLabel22";
this.linkLabel22.Size = new System.Drawing.Size(32, 17);
this.linkLabel22.TabIndex = 27;
this.linkLabel22.TabStop = true;
this.linkLabel22.Text = "网吧";
this.linkLabel22.VisitedLinkColor = System.Drawing.Color.Blue;
this.linkLabel22.Click += new System.EventHandler(this.linkLabel2_Click);
//
// linkLabel23
//
this.linkLabel23.AutoSize = true;
this.linkLabel23.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel23.Location = new System.Drawing.Point(169, 151);
this.linkLabel23.Name = "linkLabel23";
this.linkLabel23.Size = new System.Drawing.Size(32, 17);
this.linkLabel23.TabIndex = 28;
this.linkLabel23.TabStop = true;
this.linkLabel23.Text = "酒吧";
this.linkLabel23.VisitedLinkColor = System.Drawing.Color.Blue;
this.linkLabel23.Click += new System.EventHandler(this.linkLabel2_Click);
//
// linkLabel24
//
this.linkLabel24.AutoSize = true;
this.linkLabel24.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel24.Location = new System.Drawing.Point(208, 151);
this.linkLabel24.Name = "linkLabel24";
this.linkLabel24.Size = new System.Drawing.Size(56, 17);
this.linkLabel24.TabIndex = 29;
this.linkLabel24.TabStop = true;
this.linkLabel24.Text = "健身中心";
this.linkLabel24.VisitedLinkColor = System.Drawing.Color.Blue;
this.linkLabel24.Click += new System.EventHandler(this.linkLabel2_Click);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(13, 7);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(89, 12);
this.label2.TabIndex = 30;
this.label2.Text = "在区域内搜索:";
//
// BQuickSearchControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.Controls.Add(this.label2);
this.Controls.Add(this.linkLabel24);
this.Controls.Add(this.linkLabel23);
this.Controls.Add(this.linkLabel22);
this.Controls.Add(this.linkLabel21);
this.Controls.Add(this.linkLabel20);
this.Controls.Add(this.linkLabel19);
this.Controls.Add(this.linkLabel18);
this.Controls.Add(this.linkLabel17);
this.Controls.Add(this.linkLabel16);
this.Controls.Add(this.linkLabel15);
this.Controls.Add(this.linkLabel14);
this.Controls.Add(this.linkLabel13);
this.Controls.Add(this.linkLabel12);
this.Controls.Add(this.linkLabel11);
this.Controls.Add(this.linkLabel10);
this.Controls.Add(this.linkLabel9);
this.Controls.Add(this.linkLabel8);
this.Controls.Add(this.linkLabel7);
this.Controls.Add(this.linkLabel6);
this.Controls.Add(this.linkLabel5);
this.Controls.Add(this.linkLabel4);
this.Controls.Add(this.linkLabel3);
this.Controls.Add(this.linkLabel2);
this.Controls.Add(this.linkLabel1);
this.Controls.Add(this.pictureBox5);
this.Controls.Add(this.pictureBox4);
this.Controls.Add(this.pictureBox3);
this.Controls.Add(this.pictureBox2);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.label1);
this.Name = "BQuickSearchControl";
this.Size = new System.Drawing.Size(298, 183);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.PictureBox pictureBox3;
private System.Windows.Forms.PictureBox pictureBox4;
private System.Windows.Forms.PictureBox pictureBox5;
private System.Windows.Forms.LinkLabel linkLabel1;
private System.Windows.Forms.LinkLabel linkLabel2;
private System.Windows.Forms.LinkLabel linkLabel3;
private System.Windows.Forms.LinkLabel linkLabel4;
private System.Windows.Forms.LinkLabel linkLabel5;
private System.Windows.Forms.LinkLabel linkLabel6;
private System.Windows.Forms.LinkLabel linkLabel7;
private System.Windows.Forms.LinkLabel linkLabel8;
private System.Windows.Forms.LinkLabel linkLabel9;
private System.Windows.Forms.LinkLabel linkLabel10;
private System.Windows.Forms.LinkLabel linkLabel11;
private System.Windows.Forms.LinkLabel linkLabel12;
private System.Windows.Forms.LinkLabel linkLabel13;
private System.Windows.Forms.LinkLabel linkLabel14;
private System.Windows.Forms.LinkLabel linkLabel15;
private System.Windows.Forms.LinkLabel linkLabel16;
private System.Windows.Forms.LinkLabel linkLabel17;
private System.Windows.Forms.LinkLabel linkLabel18;
private System.Windows.Forms.LinkLabel linkLabel19;
private System.Windows.Forms.LinkLabel linkLabel20;
private System.Windows.Forms.LinkLabel linkLabel21;
private System.Windows.Forms.LinkLabel linkLabel22;
private System.Windows.Forms.LinkLabel linkLabel23;
private System.Windows.Forms.LinkLabel linkLabel24;
private System.Windows.Forms.Label label2;
}
}
================================================
FILE: BMap.NET.WindowsForm/BQuickSearchControl.cs
================================================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace BMap.NET.WindowsForm
{
///
/// 快速搜索控件
///
partial class BQuickSearchControl : UserControl
{
public event QuickSearchEventHandler QuickSearch;
public BQuickSearchControl()
{
InitializeComponent();
}
///
/// 关闭
///
///
///
private void pictureBox1_Click(object sender, EventArgs e)
{
Visible = false;
}
///
/// 点击搜索
///
///
///
private void linkLabel2_Click(object sender, EventArgs e)
{
string search_name = (sender as LinkLabel).Text;
if (QuickSearch != null)
{
QuickSearch(search_name);
}
}
}
///
/// 表示处理快速搜索事件的方法
///
///
delegate void QuickSearchEventHandler(string searchName);
}
================================================
FILE: BMap.NET.WindowsForm/BQuickSearchControl.resx
================================================
text/microsoft-resx
2.0
System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
R0lGODlhDQANAIEBAAkkPP///wAAAAAAACH/C05FVFNDQVBFMi4wAwEBAAAh+QQBAAABACwAAAAADQAN
AAAIMQADBABAsGBBgQMNKgSQcKFDhg0FLkQIsaFBhBIfUtSI0SHFjRcjWnx4kSRBkBMDBAQAOw==
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsIAAA7CARUoSoAAAAAGYktHRAD/AP8A/6C9p5MAAABVSURBVDhPY/hFARg8mhev
O4iGoBLYAIpmNG1wBJXGAOiaoSwkQIJmrAgqjQFGbcbQhomgSsGA2pqhHDCA64EjqAQYUEkzmiI8CKoB
zWZSwZDU/OsXAMmiP+WOJOJ2AAAAAElFTkSuQmCC
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsIAAA7CARUoSoAAAAAGYktHRAD/AP8A/6C9p5MAAABNSURBVDhPY/hFARgOmhev
Owgh4QywMFQEzoWDwaMZDaGJQ7hwQD3NEICpji6a4eqQlWKKQADtNQMBpggQDB7NQIBVHbGaiQcDpfnX
LwCQu0sREcUJbQAAAABJRU5ErkJggg==
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsIAAA7CARUoSoAAAAAGYktHRAD/AP8A/6C9p5MAAABkSURBVDhPY/hFARgqmhev
OwhlgQFCM1CCGARVDQZU0gwEmNLIgCjN+BFUKRiQphmqDgaIdTaxmvEgqDoYoJ5m/ICAZmRLsCKoOhhA
aMalAgKwyqJrhnIwAFZZEvyMCYak5l+/AOQvPHUttmvbAAAAAElFTkSuQmCC
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsIAAA7CARUoSoAAAAAGYktHRAD/AP8A/6C9p5MAAABvSURBVDhP3dBBCoAwDERR
738N997Ba2VlyUxrjLE1iAh+srHpg+IkD/onnpe1DY9MPWwlhotaDpfhTrvEzrThWnsBO2CHN7Qc5roW
YFyyBifnPMa9IUMHbE2foR1nZSnGPBoVPJsfN/I/LNVXWGQDcJFR8VBy9yYAAAAASUVORK5CYII=
================================================
FILE: BMap.NET.WindowsForm/BScreenshotMenu.Designer.cs
================================================
namespace BMap.NET.WindowsForm
{
partial class BScreenshotMenu
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BScreenshotMenu));
this.label1 = new System.Windows.Forms.Label();
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
this.label2 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// label1
//
this.label1.Cursor = System.Windows.Forms.Cursors.Hand;
this.label1.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.label1.ImageIndex = 0;
this.label1.ImageList = this.imageList1;
this.label1.Location = new System.Drawing.Point(0, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(63, 25);
this.label1.TabIndex = 0;
this.label1.Text = "取消";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label1.Click += new System.EventHandler(this.label1_Click);
this.label1.MouseEnter += new System.EventHandler(this.label1_MouseEnter);
this.label1.MouseLeave += new System.EventHandler(this.label1_MouseLeave);
//
// imageList1
//
this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
this.imageList1.Images.SetKeyName(0, "ico_screenshotCancel.gif");
this.imageList1.Images.SetKeyName(1, "ico_screenshotOK.gif");
//
// label2
//
this.label2.Cursor = System.Windows.Forms.Cursors.Hand;
this.label2.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.label2.ImageIndex = 1;
this.label2.ImageList = this.imageList1;
this.label2.Location = new System.Drawing.Point(67, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(63, 25);
this.label2.TabIndex = 1;
this.label2.Text = "确定";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label2.Click += new System.EventHandler(this.label1_Click);
this.label2.MouseEnter += new System.EventHandler(this.label1_MouseEnter);
this.label2.MouseLeave += new System.EventHandler(this.label1_MouseLeave);
//
// BScreenshotMenu
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Name = "BScreenshotMenu";
this.Size = new System.Drawing.Size(132, 27);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ImageList imageList1;
private System.Windows.Forms.Label label2;
}
}
================================================
FILE: BMap.NET.WindowsForm/BScreenshotMenu.cs
================================================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace BMap.NET.WindowsForm
{
///
/// 截图菜单
///
partial class BScreenshotMenu : UserControl
{
public event ScreenshotDoneEventHandler ScreenshotDone;
public BScreenshotMenu()
{
InitializeComponent();
}
///
/// 鼠标进入变色
///
///
///
private void label1_MouseEnter(object sender, EventArgs e)
{
(sender as Label).BackColor = Color.Gray;
}
///
/// 鼠标移出变色
///
///
///
private void label1_MouseLeave(object sender, EventArgs e)
{
(sender as Label).BackColor = Color.White;
}
///
/// 鼠标点击
///
///
///
private void label1_Click(object sender, EventArgs e)
{
if ((sender as Label).Text == "确定")
{
if (ScreenshotDone != null)
{
ScreenshotDone(true);
}
}
else
{
if (ScreenshotDone != null)
{
ScreenshotDone(false);
}
}
}
}
///
/// 表示处理截图完成事件的方法
///
///
delegate void ScreenshotDoneEventHandler(bool saved);
}
================================================
FILE: BMap.NET.WindowsForm/BScreenshotMenu.resx
================================================
text/microsoft-resx
2.0
System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
17, 17
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABY
CwAAAk1TRnQBSQFMAgEBAgEAAQgBAAEIAQABGQEAARkBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABZAMAARkDAAEBAQABCAUAAcQBCRgAAYACAAGAAwACgAEAAYADAAGAAQABgAEAAoACAAPAAQABwAHc
AcABAAHwAcoBpgEAATMFAAEzAQABMwEAATMBAAIzAgADFgEAAxwBAAMiAQADKQEAA1UBAANNAQADQgEA
AzkBAAGAAXwB/wEAAlAB/wEAAZMBAAHWAQAB/wHsAcwBAAHGAdYB7wEAAdYC5wEAAZABqQGtAgAB/wEz
AwABZgMAAZkDAAHMAgABMwMAAjMCAAEzAWYCAAEzAZkCAAEzAcwCAAEzAf8CAAFmAwABZgEzAgACZgIA
AWYBmQIAAWYBzAIAAWYB/wIAAZkDAAGZATMCAAGZAWYCAAKZAgABmQHMAgABmQH/AgABzAMAAcwBMwIA
AcwBZgIAAcwBmQIAAswCAAHMAf8CAAH/AWYCAAH/AZkCAAH/AcwBAAEzAf8CAAH/AQABMwEAATMBAAFm
AQABMwEAAZkBAAEzAQABzAEAATMBAAH/AQAB/wEzAgADMwEAAjMBZgEAAjMBmQEAAjMBzAEAAjMB/wEA
ATMBZgIAATMBZgEzAQABMwJmAQABMwFmAZkBAAEzAWYBzAEAATMBZgH/AQABMwGZAgABMwGZATMBAAEz
AZkBZgEAATMCmQEAATMBmQHMAQABMwGZAf8BAAEzAcwCAAEzAcwBMwEAATMBzAFmAQABMwHMAZkBAAEz
AswBAAEzAcwB/wEAATMB/wEzAQABMwH/AWYBAAEzAf8BmQEAATMB/wHMAQABMwL/AQABZgMAAWYBAAEz
AQABZgEAAWYBAAFmAQABmQEAAWYBAAHMAQABZgEAAf8BAAFmATMCAAFmAjMBAAFmATMBZgEAAWYBMwGZ
AQABZgEzAcwBAAFmATMB/wEAAmYCAAJmATMBAANmAQACZgGZAQACZgHMAQABZgGZAgABZgGZATMBAAFm
AZkBZgEAAWYCmQEAAWYBmQHMAQABZgGZAf8BAAFmAcwCAAFmAcwBMwEAAWYBzAGZAQABZgLMAQABZgHM
Af8BAAFmAf8CAAFmAf8BMwEAAWYB/wGZAQABZgH/AcwBAAHMAQAB/wEAAf8BAAHMAQACmQIAAZkBMwGZ
AQABmQEAAZkBAAGZAQABzAEAAZkDAAGZAjMBAAGZAQABZgEAAZkBMwHMAQABmQEAAf8BAAGZAWYCAAGZ
AWYBMwEAAZkBMwFmAQABmQFmAZkBAAGZAWYBzAEAAZkBMwH/AQACmQEzAQACmQFmAQADmQEAApkBzAEA
ApkB/wEAAZkBzAIAAZkBzAEzAQABZgHMAWYBAAGZAcwBmQEAAZkCzAEAAZkBzAH/AQABmQH/AgABmQH/
ATMBAAGZAcwBZgEAAZkB/wGZAQABmQH/AcwBAAGZAv8BAAHMAwABmQEAATMBAAHMAQABZgEAAcwBAAGZ
AQABzAEAAcwBAAGZATMCAAHMAjMBAAHMATMBZgEAAcwBMwGZAQABzAEzAcwBAAHMATMB/wEAAcwBZgIA
AcwBZgEzAQABmQJmAQABzAFmAZkBAAHMAWYBzAEAAZkBZgH/AQABzAGZAgABzAGZATMBAAHMAZkBZgEA
AcwCmQEAAcwBmQHMAQABzAGZAf8BAALMAgACzAEzAQACzAFmAQACzAGZAQADzAEAAswB/wEAAcwB/wIA
AcwB/wEzAQABmQH/AWYBAAHMAf8BmQEAAcwB/wHMAQABzAL/AQABzAEAATMBAAH/AQABZgEAAf8BAAGZ
AQABzAEzAgAB/wIzAQAB/wEzAWYBAAH/ATMBmQEAAf8BMwHMAQAB/wEzAf8BAAH/AWYCAAH/AWYBMwEA
AcwCZgEAAf8BZgGZAQAB/wFmAcwBAAHMAWYB/wEAAf8BmQIAAf8BmQEzAQAB/wGZAWYBAAH/ApkBAAH/
AZkBzAEAAf8BmQH/AQAB/wHMAgAB/wHMATMBAAH/AcwBZgEAAf8BzAGZAQAB/wLMAQAB/wHMAf8BAAL/
ATMBAAHMAf8BZgEAAv8BmQEAAv8BzAEAAmYB/wEAAWYB/wFmAQABZgL/AQAB/wJmAQAB/wFmAf8BAAL/
AWYBAAEhAQABpQEAA18BAAN3AQADhgEAA5YBAAPLAQADsgEAA9cBAAPdAQAD4wEAA+oBAAPxAQAD+AEA
AfAB+wH/AQABpAKgAQADgAMAAf8CAAH/AwAC/wEAAf8DAAH/AQAB/wEAAv8CAAP/0AABHAoAARxXAAFu
AUUBbggAAW4BRQFLVQABSwFvAXUBTAFuBgABbgFGAXUBTAFLDgABngFQQwABSwF0AXUBJQHjAUwBbgQA
AW4BTAFNASYBTQFMAUsMAAGeAngBUAH/QAABHAFFAZQDJQHjAUwBSwIAAUsBTAFNAiUBRwF1AUUBHAoA
AZ4BlwGeAX0BeAFQAf9AAAFuAW8BdQMlAXUBTAJFAUwB4wIlAUcBdQFMAW4KAAGeAXgBngJbAX0BeAFQ
Af9AAAFuAW8BdQMlAXUCTAF1AyUBdQFMAW4KAAGeAXgBnwRbAX0BeAFQAf9AAAFuAW8BdQMlAnUDJQF1
AUwBbgoAAZ4BmAGfAlwEWwF9AXgBUAH/QAABSwFvAXUGJQF1AUwBSwoAAX0BmAGfAn0BXAKfA1sBngF4
AVAB/0AAAUUBbwF1ASYDJQF1AW8BRQoAAZcBCAGfA30BwgIIAZ8BXAJbAZ8BeAFQAf8/AAFFAW8BlAMm
ASUBdQFvAUUJAAFPAQgBwgGfAn0BwgEIAU8BLgEIAcIBXAJbAZ8BeAFPPgABSwFvAZoDRwMmAXUBbwFL
BwABUAGYAf8DnwHCAQgBeAEAAf8BLgEIAcIBXAJbAZ8BmAFPPAABbgF0AZoDRwKUAUcCJgF1AW8BbgcA
AVYBCAH1AZ8BGwEIAX0DAAH/AU8BCAHCA1wBnwGZAU86AAFuAXQBvQFNAUcBTQGaAm8BmgFHASYBRwF1
AW8BbgcAAZcBCAH/AZgBngYAAVABmQHCAX0CXAGfAQgBTzgAAW4BdAEaA00BmgFvAkUBbwGaA0cBdQFv
AW4HAAGXAXIBnggAAVYBmAEbAX0CXAGfAZkBTzYAARwBSwHDAXUCTQGaAXQBSwIAAUsBbwGaAU0BRwFN
ARoBbgEcBwABwgoAAZcBmAEbAn0B9AGYAVY3AAFuAZMBGgFNAZoBdAFuBAABbgF0AZoBTQGaAZMBSxQA
AZcBmAH0AfUBmQFWOQABbgGTARsBdAFuBgABbgF0AcMBkwFLFgABlwGYAZkBVjsAAUsCbggAAm4BSxgA
AZcBVj0AARwKAAEc/wB+AAFCAU0BPgcAAT4DAAEoAwABZAMAARkDAAEBAQABAQUAAZABARYAA/8BAAb/
AcAJAAb/AcAJAAH+Af8B3wP/AcAJAAH8AX8BjwP/AcAJAAH4AT8BBwH/AecB/wHACQAB8AEeAQMB/wHB
Af8BwAkAAeABDAEBAf8BgAH/AcAJAAHwAQABAwH/AQABfwHACQAB+AEAAQcB/gEAAT8BwAkAAfwBAAEP
AfwBAAEfAcAJAAH+AQABHwH4AQABDwHACQAB/wEAAT8B8AEAAQcBwAkAAf8BAAE/AeABAAEHAcAJAAH+
AQABHwHAARABAwHACQAB/AEAAQ8B4AE4AQEBwAkAAfgBAAEHAfABfgEAAcAJAAHwAQABAwH4Af8BAAFA
CQAB4AEMAQEB/QH/AYABQAkAAfABHgEDAv8CwAkAAfgBPwEHAv8B4QHACQAB/AF/AY8C/wHzAcAJAAH+
Af8B3wP/AcAJAAb/AcAJAAb/AcAJAAb/AcAJAAs=
================================================
FILE: BMap.NET.WindowsForm/BStepStartAndEndItem.Designer.cs
================================================
namespace BMap.NET.WindowsForm
{
partial class BStepStartAndEndItem
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.label1.Cursor = System.Windows.Forms.Cursors.Hand;
this.label1.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(30, 7);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(264, 23);
this.label1.TabIndex = 0;
this.label1.Text = "起点终点";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.label1.Click += new System.EventHandler(this.label1_Click);
//
// BStepStartAndEndItem
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.Controls.Add(this.label1);
this.Cursor = System.Windows.Forms.Cursors.Hand;
this.Name = "BStepStartAndEndItem";
this.Size = new System.Drawing.Size(298, 36);
this.Load += new System.EventHandler(this.BStepStartAndEndItem_Load);
this.Click += new System.EventHandler(this.label1_Click);
this.Paint += new System.Windows.Forms.PaintEventHandler(this.BStepStartAndEndItem_Paint);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label label1;
}
}
================================================
FILE: BMap.NET.WindowsForm/BStepStartAndEndItem.cs
================================================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BMap.NET.WindowsForm.BMapElements;
namespace BMap.NET.WindowsForm
{
///
/// 路线起点/终点控件
///
partial class BStepStartAndEndItem : UserControl
{
public event StepEndPointSelectedEventHandler StepEndPointSelected;
///
/// 起点/终点数据源
///
public BPoint EndPoint
{
get;
set;
}
///
/// 构造方法
///
public BStepStartAndEndItem()
{
InitializeComponent();
SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true);
UpdateStyles();
}
///
/// 重绘
///
///
///
private void BStepStartAndEndItem_Paint(object sender, PaintEventArgs e)
{
if (EndPoint != null)
{
Bitmap b = null;
if (EndPoint.Type == PointType.RouteStart)
{
b = Properties.BMap.ico_source;
}
if (EndPoint.Type == PointType.RouteEnd)
{
b = Properties.BMap.ico_destination;
}
e.Graphics.DrawImage(b, new Rectangle(5, (Height - b.Height) / 2, b.Width, b.Height));
}
}
///
/// 鼠标点击
///
///
///
private void label1_Click(object sender, EventArgs e)
{
if (StepEndPointSelected != null)
{
StepEndPointSelected(EndPoint);
}
}
///
/// 加载
///
///
///
private void BStepStartAndEndItem_Load(object sender, EventArgs e)
{
label1.Text = EndPoint.Address;
}
}
}
================================================
FILE: BMap.NET.WindowsForm/BStepStartAndEndItem.resx
================================================
text/microsoft-resx
2.0
System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
================================================
FILE: BMap.NET.WindowsForm/BTaxiTipControl.Designer.cs
================================================
namespace BMap.NET.WindowsForm
{
partial class BTaxiTipControl
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.lnkTaxiTip = new System.Windows.Forms.LinkLabel();
this.SuspendLayout();
//
// lnkTaxiTip
//
this.lnkTaxiTip.AutoSize = true;
this.lnkTaxiTip.BackColor = System.Drawing.Color.Linen;
this.lnkTaxiTip.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lnkTaxiTip.LinkColor = System.Drawing.Color.Gray;
this.lnkTaxiTip.Location = new System.Drawing.Point(85, 7);
this.lnkTaxiTip.Name = "lnkTaxiTip";
this.lnkTaxiTip.Size = new System.Drawing.Size(132, 17);
this.lnkTaxiTip.TabIndex = 0;
this.lnkTaxiTip.TabStop = true;
this.lnkTaxiTip.Text = "打车需23元,共32分钟";
this.lnkTaxiTip.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.lnkTaxiTip.VisitedLinkColor = System.Drawing.Color.Gray;
this.lnkTaxiTip.MouseEnter += new System.EventHandler(this.linkLabel1_MouseEnter);
this.lnkTaxiTip.MouseLeave += new System.EventHandler(this.linkLabel1_MouseLeave);
//
// BTaxiTipControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Linen;
this.Controls.Add(this.lnkTaxiTip);
this.Name = "BTaxiTipControl";
this.Size = new System.Drawing.Size(303, 50);
this.Paint += new System.Windows.Forms.PaintEventHandler(this.BTaxiTipControl_Paint);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.LinkLabel lnkTaxiTip;
}
}
================================================
FILE: BMap.NET.WindowsForm/BTaxiTipControl.cs
================================================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Newtonsoft.Json.Linq;
namespace BMap.NET.WindowsForm
{
///
/// 导航时,选择打车方案信息显示控件
///
partial class BTaxiTipControl : UserControl
{
private JToken _dataSource;
///
/// 打车数据源
///
public JToken DataSource
{
get
{
return _dataSource;
}
set
{
_dataSource = value;
if (_dataSource != null) //解析 具体json格式参见api文档
{
lnkTaxiTip.Text = "打车费用\n";
string info = "总距离:" + Math.Round(double.Parse((string)_dataSource["distance"]) / 1000, 1) + "公里" + " 总时间:" + Math.Round(double.Parse((string)_dataSource["duration"]) / 60, 0) + "分钟" + "\n";
foreach (JObject p in _dataSource["detail"])
{
info += ((string)p["desc"] + " " + (string)p["km_price"] + "元/km 起步价:" + (string)p["start_price"] + " 总费用:" + (string)p["total_price"] + "\n");
lnkTaxiTip.Text += ((string)p["desc"] + ":" + (string)p["total_price"]) + "元\n";
}
lnkTaxiTip.Text = lnkTaxiTip.Text.TrimEnd(new char[] { '|'});
Height = lnkTaxiTip.Height + 20;
lnkTaxiTip.Location = new Point((Width - lnkTaxiTip.Width) / 2, (Height - lnkTaxiTip.Height) / 2);
info += ("备注:\n" + (string)_dataSource["remark"]);
lbl_more_info.Text = info;
}
}
}
///
/// 打车更详细的信息
///
Label lbl_more_info = new Label();
///
/// 构造方法
///
public BTaxiTipControl()
{
InitializeComponent();
SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);
UpdateStyles();
lbl_more_info.BackColor = Color.White;
lbl_more_info.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
lbl_more_info.Padding = new Padding(5);
lbl_more_info.Visible = false;
lbl_more_info.AutoSize = true;
}
///
/// 绘制
///
///
///
private void BTaxiTipControl_Paint(object sender, PaintEventArgs e)
{
e.Graphics.DrawRectangle(Pens.LightGray, new Rectangle(0, 0, Width - 1, Height - 1));
}
///
/// 鼠标进入,显示详细
///
///
///
private void linkLabel1_MouseEnter(object sender, EventArgs e)
{
Control p = FindTheTopControl();
if (!p.Controls.Contains(lbl_more_info))
{
p.Controls.Add(lbl_more_info);
lbl_more_info.BringToFront();
}
Point location = p.PointToClient(this.PointToScreen(lnkTaxiTip.Location));
lbl_more_info.Location = new Point(location.X + 2, location.Y + lnkTaxiTip.Height);
lbl_more_info.Visible = true;
}
///
/// 鼠标移出
///
///
///
private void linkLabel1_MouseLeave(object sender, EventArgs e)
{
lbl_more_info.Visible = false;
}
///
/// 寻找最顶层控件
///
///
private Control FindTheTopControl()
{
Control parent = this.Parent;
while (parent.Parent != null)
{
parent = parent.Parent;
}
return parent;
}
}
}
================================================
FILE: BMap.NET.WindowsForm/BTaxiTipControl.resx
================================================
text/microsoft-resx
2.0
System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
================================================
FILE: BMap.NET.WindowsForm/BTransitRouteItem.Designer.cs
================================================
namespace BMap.NET.WindowsForm
{
partial class BTransitRouteItem
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.flpSteps = new System.Windows.Forms.FlowLayoutPanel();
this.SuspendLayout();
//
// flpSteps
//
this.flpSteps.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.flpSteps.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.flpSteps.Location = new System.Drawing.Point(0, 70);
this.flpSteps.Margin = new System.Windows.Forms.Padding(0);
this.flpSteps.Name = "flpSteps";
this.flpSteps.Size = new System.Drawing.Size(298, 275);
this.flpSteps.TabIndex = 0;
this.flpSteps.WrapContents = false;
//
// BTransitRouteItem
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.Controls.Add(this.flpSteps);
this.Cursor = System.Windows.Forms.Cursors.Hand;
this.Name = "BTransitRouteItem";
this.Size = new System.Drawing.Size(298, 345);
this.Click += new System.EventHandler(this.BTransitRouteItem_Click);
this.Paint += new System.Windows.Forms.PaintEventHandler(this.BTransitRouteItem_Paint);
this.MouseEnter += new System.EventHandler(this.BTransitRouteItem_MouseEnter);
this.MouseLeave += new System.EventHandler(this.BTransitRouteItem_MouseLeave);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.FlowLayoutPanel flpSteps;
}
}
================================================
FILE: BMap.NET.WindowsForm/BTransitRouteItem.cs
================================================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Newtonsoft.Json.Linq;
using BMap.NET.WindowsForm.BMapElements;
namespace BMap.NET.WindowsForm
{
///
/// 公交路线控件
///
partial class BTransitRouteItem : UserControl
{
///
/// 步骤选择时激发该事件
///
public event StepSelectedEventHandler StepSelected;
///
/// 路线选择时激发该事件
///
public event RouteSelectedEventHandler RouteSelected;
///
/// 路线起点终点选中时激发该事件
///
public event StepEndPointSelectedEventHandler StepEndPointSelected;
private BRoute _dataSource;
///
/// 路线数据源
///
public BRoute DataSource
{
get
{
return _dataSource;
}
set
{
_dataSource = value;
//
if (_dataSource != null) //解析 具体json格式参见api文档
{
JToken r = _dataSource.DataSource["scheme"][0];
_distance = double.Parse((string)r["distance"]);
_duration = double.Parse((string)r["duration"]);
if (Origin != null) //起点
{
flpSteps.Controls.Add(Origin);
Origin.StepEndPointSelected += new StepEndPointSelectedEventHandler(Origin_StepEndPointSelected);
}
foreach (JArray step in r["steps"])
{
BTransitStepItem item = new BTransitStepItem();
item.DataSource = step;
_need_walk += item.Step_Walk_Distance;
if (item.Step_Transit_Name != "")
{
_transits += item.Step_Transit_Name + "→";
}
item.Width = flpSteps.Width;
flpSteps.Controls.Add(item);
item.Margin = new Padding(0);
item.StepSelected += new StepSelectedEventHandler(item_StepSelected);
}
if (Destination != null) //终点
{
flpSteps.Controls.Add(Destination);
Destination.StepEndPointSelected += new StepEndPointSelectedEventHandler(Destination_StepEndPointSelected);
}
_transits = _transits.TrimEnd(new char[] { '→'});
foreach (Control c in flpSteps.Controls)
{
_steps_height += c.Height;
}
Selected = false;
}
}
}
private double _distance;
private double _duration;
private int _need_walk;
private string _transits;
private int _steps_height;
private bool _selected;
///
/// 是否选中
///
public bool Selected
{
get
{
return _selected;
}
set
{
_selected = value;
if (_selected)
{
Height = 70 + _steps_height;
}
else
{
Height = 70; //默认70g高度
}
}
}
///
/// 起点
///
public BStepStartAndEndItem Origin
{
get;
set;
}
///
/// 终点
///
public BStepStartAndEndItem Destination
{
get;
set;
}
private bool _mouse_hover;
///
/// 构造方法
///
public BTransitRouteItem()
{
InitializeComponent();
SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true);
}
#region 事件处理
///
/// 重绘
///
///
///
private void BTransitRouteItem_Paint(object sender, PaintEventArgs e)
{
if (Selected || _mouse_hover)
{
using (SolidBrush sb = new SolidBrush(Color.FromArgb(235, 241, 251)))
{
e.Graphics.FillRectangle(sb, new Rectangle(0, 0, Width - 1, 70 - 1));
}
}
e.Graphics.DrawRectangle(Pens.LightGray, new Rectangle(0, 0, Width - 1, 70 - 1));
using(Font f = new Font("微软雅黑",10))
{
e.Graphics.DrawString(_transits, f, Brushes.Blue, new PointF(20, 10));
}
using (Font f = new Font("微软雅黑", 9))
{
e.Graphics.DrawString(Math.Round(_duration / 60, 0) + "分钟 | " + Math.Round(_distance / 1000, 1) + "公里 | 步行" + _need_walk + "米", f, Brushes.Gray, new PointF(20, 35));
}
}
///
/// 点击
///
///
///
private void BTransitRouteItem_Click(object sender, EventArgs e)
{
Selected = true;
if (_selected) //选中
{
if (RouteSelected != null)
{
RouteSelected(_dataSource);
}
}
}
///
/// 鼠标进入
///
///
///
private void BTransitRouteItem_MouseEnter(object sender, EventArgs e)
{
_mouse_hover = true;
Invalidate();
}
///
/// 鼠标移出
///
///
///
private void BTransitRouteItem_MouseLeave(object sender, EventArgs e)
{
_mouse_hover = false;
Invalidate();
}
///
/// 步骤选中
///
///
///
void item_StepSelected(string stepPath, bool enlarge)
{
if (StepSelected != null)
{
StepSelected(stepPath, enlarge);
}
}
///
/// 终点选中
///
///
void Destination_StepEndPointSelected(BPoint bPoint)
{
if (StepEndPointSelected != null)
{
StepEndPointSelected(bPoint);
}
}
///
/// 起点选中
///
///
void Origin_StepEndPointSelected(BPoint bPoint)
{
if (StepEndPointSelected != null)
{
StepEndPointSelected(bPoint);
}
}
#endregion
}
///
/// 表示处理选择路线事件的方法
///
///
delegate void RouteSelectedEventHandler(BRoute bRoute);
///
/// 表示处理选择路线步骤事件的方法
///
///
///
delegate void StepSelectedEventHandler(string stepPath, bool enlarge);
///
/// 表示处理选择路线起点、终点事件的方法
///
///
delegate void StepEndPointSelectedEventHandler(BPoint bPoint);
}
================================================
FILE: BMap.NET.WindowsForm/BTransitRouteItem.resx
================================================
text/microsoft-resx
2.0
System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
================================================
FILE: BMap.NET.WindowsForm/BTransitStepItem.Designer.cs
================================================
namespace BMap.NET.WindowsForm
{
partial class BTransitStepItem
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.SuspendLayout();
//
// BTransitStepItem
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Name = "BTransitStepItem";
this.Size = new System.Drawing.Size(298, 70);
this.Click += new System.EventHandler(this.BTransitStepItem_Click);
this.Paint += new System.Windows.Forms.PaintEventHandler(this.BTransitStepItem_Paint);
this.MouseEnter += new System.EventHandler(this.BTransitStepItem_MouseEnter);
this.MouseLeave += new System.EventHandler(this.BTransitStepItem_MouseLeave);
this.ResumeLayout(false);
}
#endregion
}
}
================================================
FILE: BMap.NET.WindowsForm/BTransitStepItem.cs
================================================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Newtonsoft.Json.Linq;
namespace BMap.NET.WindowsForm
{
///
/// 公交路线步骤控件
///
partial class BTransitStepItem : UserControl
{
///
/// 鼠标进入或点击时激发该事件
///
public event StepSelectedEventHandler StepSelected;
private JArray _dataSource;
///
/// 步骤数据源
///
public JArray DataSource
{
get
{
return _dataSource;
}
set
{
_dataSource = value;
if (_dataSource != null) //解析 具体json结构参见api文档
{
if ((string)_dataSource[0]["type"] == "5") //步行
{
JToken step = _dataSource[0];
_step_type = 0;
_step_walk_string = (string)step["stepInstruction"];
_step_walk_distance = int.Parse((string)step["distance"]);
Paths = (string)step["path"];
Height = 35;
}
else
{
_step_type = 1;
Paths = (string)_dataSource[0]["path"];
_step_transit_start = (string)_dataSource[0]["vehicle"]["start_name"];
_step_transit_end = (string)_dataSource[0]["vehicle"]["end_name"];
_step_transit_stops = int.Parse((string)_dataSource[0]["vehicle"]["stop_num"]);
foreach (JObject step in _dataSource) //多种方案
{
_step_transits += (string)step["vehicle"]["name"] + ",";
}
_step_transits = _step_transits.TrimEnd(new char[]{','});
Height = 70;
}
}
}
}
private int _step_type; //当前步骤类型:0步行 1公交
private string _step_walk_string; //步行信息
private int _step_walk_distance; //步行距离
private string _step_transit_start; //公交起始站
private string _step_transit_end; //公交终点站
private string _step_transits; //可乘坐公交名称
private int _step_transit_stops; //公交站数
///
/// 当前步骤路线
///
public string Paths
{
get;
set;
}
///
/// 步行距离(默认为0)
///
public int Step_Walk_Distance
{
get
{
return _step_walk_distance;
}
}
///
/// 公交线路(默认为空)
///
public string Step_Transit_Name
{
get
{
if (_step_type == 0)
{
return "";
}
else
{
return _step_transits.Split(',')[0]; //取第一个
}
}
}
///
/// 构造方法
///
public BTransitStepItem()
{
InitializeComponent();
SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true);
}
///
/// 重绘
///
///
///
private void BTransitStepItem_Paint(object sender, PaintEventArgs e)
{
if (_step_type == 0) //当前步骤为 步行
{
using (Font f = new Font("微软雅黑", 9))
{
using (Pen p = new Pen(Color.FromArgb(50, Color.Gray), 3))
{
e.Graphics.DrawLine(p, new Point(5 + 9, 3), new Point(5 + 9, Height - 3));
}
e.Graphics.DrawString(_step_walk_string, f, Brushes.Gray, new PointF(30, 10));
e.Graphics.DrawImage(Properties.BMap.ico_bywalk, new Rectangle(5, 8, Properties.BMap.ico_bywalk.Width, Properties.BMap.ico_bywalk.Height));
}
}
else //当前步骤为公交
{
using (Font f = new Font("微软雅黑", 9))
{
using (Pen p = new Pen(Color.FromArgb(50, Color.Gray), 3))
{
e.Graphics.DrawLine(p, new Point(5 + 9, 3), new Point(5 + 9, Height - 3));
}
e.Graphics.DrawString(_step_transit_start + " 上车", f, Brushes.Gray, new PointF(30,5));
e.Graphics.DrawString(_step_transits, f, Brushes.Black, new PointF(35, 5 + 20));
e.Graphics.DrawString(_step_transit_end + " 下车", f, Brushes.Gray, new PointF(30, 5 + 20 + 20));
e.Graphics.DrawString(_step_transit_stops + "站", f, Brushes.Gray, new PointF(Width - 50, 5 + 20));
e.Graphics.DrawImage(Properties.BMap.ico_bytransit, new Rectangle(5, 5, Properties.BMap.ico_bytransit.Width, Properties.BMap.ico_bytransit.Height));
e.Graphics.DrawImage(Properties.BMap.ico_bytransit, new Rectangle(5, 5 + 20 + 20 - 2, Properties.BMap.ico_bytransit.Width, Properties.BMap.ico_bytransit.Height));
}
}
}
///
/// 鼠标进入
///
///
///
private void BTransitStepItem_MouseEnter(object sender, EventArgs e)
{
BackColor = Color.FromArgb(235, 241, 251);
if (StepSelected != null)
{
StepSelected(Paths, false);
}
}
///
/// 鼠标移出
///
///
///
private void BTransitStepItem_MouseLeave(object sender, EventArgs e)
{
BackColor = Color.White;
}
///
/// 鼠标点击
///
///
///
private void BTransitStepItem_Click(object sender, EventArgs e)
{
if (StepSelected != null)
{
StepSelected(Paths, true);
}
}
}
}
================================================
FILE: BMap.NET.WindowsForm/BTransitStepItem.resx
================================================
text/microsoft-resx
2.0
System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
================================================
FILE: BMap.NET.WindowsForm/BWalkingRouteItem.Designer.cs
================================================
namespace BMap.NET.WindowsForm
{
partial class BWalkingRouteItem
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.flpSteps = new System.Windows.Forms.FlowLayoutPanel();
this.SuspendLayout();
//
// flpSteps
//
this.flpSteps.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.flpSteps.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.flpSteps.Location = new System.Drawing.Point(0, 70);
this.flpSteps.Margin = new System.Windows.Forms.Padding(0);
this.flpSteps.Name = "flpSteps";
this.flpSteps.Size = new System.Drawing.Size(298, 235);
this.flpSteps.TabIndex = 1;
this.flpSteps.WrapContents = false;
//
// BWalkingRouteItem
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.Controls.Add(this.flpSteps);
this.Name = "BWalkingRouteItem";
this.Size = new System.Drawing.Size(298, 305);
this.Click += new System.EventHandler(this.BWalkingRouteItem_Click);
this.Paint += new System.Windows.Forms.PaintEventHandler(this.BWalkingRouteItem_Paint);
this.MouseEnter += new System.EventHandler(this.BWalkingRouteItem_MouseEnter);
this.MouseLeave += new System.EventHandler(this.BWalkingRouteItem_MouseLeave);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.FlowLayoutPanel flpSteps;
}
}
================================================
FILE: BMap.NET.WindowsForm/BWalkingRouteItem.cs
================================================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Newtonsoft.Json.Linq;
using BMap.NET.WindowsForm.BMapElements;
namespace BMap.NET.WindowsForm
{
///
/// 步行路线控件
///
partial class BWalkingRouteItem : UserControl
{
///
/// 步骤选择时激发该事件
///
public event StepSelectedEventHandler StepSelected;
///
/// 路线选择时激发该事件
///
public event RouteSelectedEventHandler RouteSelected;
///
/// 路线起点终点选中时激发该事件
///
public event StepEndPointSelectedEventHandler StepEndPointSelected;
private BRoute _dataSource;
///
/// 步行路线数据源
///
public BRoute DataSource
{
get
{
return _dataSource;
}
set
{
_dataSource = value;
if (_dataSource != null) //解析 具体json格式参见api文档
{
_distance = double.Parse((string)_dataSource.DataSource["distance"]);
_duration = double.Parse((string)_dataSource.DataSource["duration"]);
if (Origin != null) //起点
{
flpSteps.Controls.Add(Origin);
Origin.StepEndPointSelected += new StepEndPointSelectedEventHandler(Origin_StepEndPointSelected);
}
foreach (JObject step in _dataSource.DataSource["steps"])
{
BWalkingStepItem item = new BWalkingStepItem();
item.DataSource = step;
item.Width = flpSteps.Width - 17;
flpSteps.Controls.Add(item);
item.Margin = new Padding(0);
item.StepSelected += new StepSelectedEventHandler(item_StepSelected);
}
if (Destination != null) //终点
{
flpSteps.Controls.Add(Destination);
}
foreach (Control c in flpSteps.Controls)
{
_steps_height += c.Height;
Destination.StepEndPointSelected += new StepEndPointSelectedEventHandler(Destination_StepEndPointSelected);
}
Selected = false;
}
}
}
private double _distance;
private double _duration;
private int _steps_height;
private bool _mouse_hover;
private bool _selected;
///
/// 是否选中
///
public bool Selected
{
get
{
return _selected;
}
set
{
_selected = value;
if (_selected)
{
Height = 70 + _steps_height;
}
else
{
Height = 70;
}
}
}
///
/// 起点
///
public BStepStartAndEndItem Origin
{
get;
set;
}
///
/// 终点
///
public BStepStartAndEndItem Destination
{
get;
set;
}
///
/// 构造方法
///
public BWalkingRouteItem()
{
InitializeComponent();
SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);
UpdateStyles();
}
#region 事件处理
///
/// 绘制
///
///
///
private void BWalkingRouteItem_Paint(object sender, PaintEventArgs e)
{
if (Selected || _mouse_hover)
{
using (SolidBrush sb = new SolidBrush(Color.FromArgb(235, 241, 251)))
{
e.Graphics.FillRectangle(sb, new Rectangle(0, 0, Width - 1, 70 - 1));
}
}
e.Graphics.DrawRectangle(Pens.LightGray, new Rectangle(0, 0, Width - 1, 70 - 1));
using (Font f = new Font("微软雅黑", 9))
{
e.Graphics.DrawString(Math.Round(_duration / 60, 0) + "分钟 | " + Math.Round(_distance / 1000, 1) + "公里", f, Brushes.Gray, new PointF(20, 10));
}
}
///
/// 点击
///
///
///
private void BWalkingRouteItem_Click(object sender, EventArgs e)
{
Selected = true;
if (RouteSelected != null)
{
RouteSelected(_dataSource);
}
}
///
/// 鼠标进入
///
///
///
private void BWalkingRouteItem_MouseEnter(object sender, EventArgs e)
{
_mouse_hover = true;
Invalidate();
}
///
/// 鼠标移出
///
///
///
private void BWalkingRouteItem_MouseLeave(object sender, EventArgs e)
{
_mouse_hover = false;
Invalidate();
}
///
/// 路线步骤选中
///
///
///
void item_StepSelected(string stepPath, bool enlarge)
{
if (StepSelected != null)
{
StepSelected(stepPath, enlarge);
}
}
///
/// 路线终点选中
///
///
void Destination_StepEndPointSelected(BPoint bPoint)
{
if (StepEndPointSelected != null)
{
StepEndPointSelected(bPoint);
}
}
///
/// 路线起点选中
///
///
void Origin_StepEndPointSelected(BPoint bPoint)
{
if (StepEndPointSelected != null)
{
StepEndPointSelected(bPoint);
}
}
#endregion
}
}
================================================
FILE: BMap.NET.WindowsForm/BWalkingRouteItem.resx
================================================
text/microsoft-resx
2.0
System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
================================================
FILE: BMap.NET.WindowsForm/BWalkingStepItem.Designer.cs
================================================
namespace BMap.NET.WindowsForm
{
partial class BWalkingStepItem
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.lblStepInfo = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// lblStepInfo
//
this.lblStepInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblStepInfo.Cursor = System.Windows.Forms.Cursors.Hand;
this.lblStepInfo.Font = new System.Drawing.Font("SimSun", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblStepInfo.ForeColor = System.Drawing.Color.DimGray;
this.lblStepInfo.Location = new System.Drawing.Point(37, 7);
this.lblStepInfo.Name = "lblStepInfo";
this.lblStepInfo.Size = new System.Drawing.Size(294, 39);
this.lblStepInfo.TabIndex = 2;
this.lblStepInfo.Text = "这里是步骤说明这里是步骤说明这里是步骤说明这里是步\r\n撒旦法阿斯蒂芬撒旦法撒旦发射点发\r\n撒旦法骤说明";
this.lblStepInfo.Click += new System.EventHandler(this.BWalkingStepItem_Click);
this.lblStepInfo.MouseEnter += new System.EventHandler(this.BWalkingStepItem_MouseEnter);
this.lblStepInfo.MouseLeave += new System.EventHandler(this.BWalkingStepItem_MouseLeave);
//
// BWalkingStepItem
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.Controls.Add(this.lblStepInfo);
this.Cursor = System.Windows.Forms.Cursors.Hand;
this.Name = "BWalkingStepItem";
this.Size = new System.Drawing.Size(338, 52);
this.Click += new System.EventHandler(this.BWalkingStepItem_Click);
this.Paint += new System.Windows.Forms.PaintEventHandler(this.BWalkingStepItem_Paint);
this.MouseEnter += new System.EventHandler(this.BWalkingStepItem_MouseEnter);
this.MouseLeave += new System.EventHandler(this.BWalkingStepItem_MouseLeave);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label lblStepInfo;
}
}
================================================
FILE: BMap.NET.WindowsForm/BWalkingStepItem.cs
================================================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Newtonsoft.Json.Linq;
using System.Text.RegularExpressions;
namespace BMap.NET.WindowsForm
{
///
/// 步行路线步骤控件
///
partial class BWalkingStepItem : UserControl
{
///
/// 步骤选中时激发该事件
///
public event StepSelectedEventHandler StepSelected;
private JObject _dataSource;
///
/// 步行路线步骤数据源
///
public JObject DataSource
{
get
{
return _dataSource;
}
set
{
_dataSource = value;
if (_dataSource != null) //解析 具体json格式参见api文档
{
Paths = (string)_dataSource["path"];
_step_info = (string)_dataSource["instructions"];
_step_direction = int.Parse((string)_dataSource["direction"]);
Regex reg = new Regex(@"<(!|/)?\w+( ((.|\n)*?"")?)? *>");
_step_info = reg.Replace(_step_info, "").Replace("
", "");
lblStepInfo.Text = _step_info;
}
}
}
private string _step_info;
private int _step_direction;
///
/// 当前步骤路线
///
public string Paths
{
get;
set;
}
///
/// 构造方法
///
public BWalkingStepItem()
{
InitializeComponent();
}
#region 事件处理
///
/// 绘制
///
///
///
private void BWalkingStepItem_Paint(object sender, PaintEventArgs e)
{
//e.Graphics.DrawRectangle(Pens.LightGray, new Rectangle(0, 0, Width - 2, Height));
}
///
/// 点击
///
///
///
private void BWalkingStepItem_Click(object sender, EventArgs e)
{
if (StepSelected != null)
{
StepSelected(Paths, true);
}
}
///
/// 鼠标进入
///
///
///
private void BWalkingStepItem_MouseEnter(object sender, EventArgs e)
{
BackColor = Color.FromArgb(235, 241, 251);
if (StepSelected != null)
{
StepSelected(Paths, false);
}
}
///
/// 鼠标移出
///
///
///
private void BWalkingStepItem_MouseLeave(object sender, EventArgs e)
{
BackColor = Color.White;
}
#endregion
}
}
================================================
FILE: BMap.NET.WindowsForm/BWalkingStepItem.resx
================================================
text/microsoft-resx
2.0
System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
================================================
FILE: BMap.NET.WindowsForm/BaiduJSAPI_cracker.js
================================================
window.VTC = {
"ditu": {
"normal": {
"version": "087",
"updateDate": "20150815"
},
"satellite": {
"version": "009",
"updateDate": "20150601"
},
"normalTraffic": {
"version": "081",
"updateDate": "20150815"
},
"satelliteTraffic": {
"version": "083",
"updateDate": "20150815"
},
"mapJS": {
"version": "104",
"updateDate": "20150815"
},
"satelliteStreet": {
"version": "083",
"updateDate": "20150815"
},
"panoClick": {
"version": "1033",
"updateDate": "201400823"
},
"panoUdt": {
"version": "20150815",
"updateDate": "20150814"
},
"panoSwfAPI": {
"version": "20150123",
"updateDate": "20150123"
},
"panoSwfPlace": {
"version": "20141112",
"updateDate": "20141112"
}
},
"webapp": {
"high_normal": {
"version": "001",
"updateDate": "20141209"
},
"lower_normal": {
"version": "002",
"updateDate": "20150529"
}
},
"api_for_mobile": {
"vector": {
"version": "002",
"updateDate": "20150529"
},
"vectorIcon": {
"version": "002",
"updateDate": "20150529"
}
}
};
window.BMAP_AUTHENTIC_KEY = ""; (function () {
var bU, a1 = bU = a1 || {
version: "1.3.4"
};
a1.guid = "$BAIDU$";
window[a1.guid] = window[a1.guid] || {};
a1.object = a1.object || {};
a1.extend = a1.object.extend = function (cD, T) {
for (var cC in T) {
if (T.hasOwnProperty(cC)) {
cD[cC] = T[cC]
}
}
return cD
};
a1.dom = a1.dom || {};
a1.dom.g = function (T) {
if ("string" == typeof T || T instanceof String) {
return document.getElementById(T)
} else {
if (T && T.nodeName && (T.nodeType == 1 || T.nodeType == 9)) {
return T
}
}
return null
};
a1.g = a1.G = a1.dom.g;
a1.dom.hide = function (T) {
T = a1.dom.g(T);
T.style.display = "none";
return T
};
a1.hide = a1.dom.hide;
a1.lang = a1.lang || {};
a1.lang.isString = function (T) {
return "[object String]" == Object.prototype.toString.call(T)
};
a1.isString = a1.lang.isString;
a1.dom._g = function (T) {
if (a1.lang.isString(T)) {
return document.getElementById(T)
}
return T
};
a1._g = a1.dom._g;
a1.dom.contains = function (T, cC) {
var cD = a1.dom._g;
T = cD(T);
cC = cD(cC);
return T.contains ? T != cC && T.contains(cC) : !!(T.compareDocumentPosition(cC) & 16)
};
a1.browser = a1.browser || {};
if (/msie (\d+\.\d)/i.test(navigator.userAgent)) {
a1.browser.ie = a1.ie = document.documentMode || +RegExp["\x241"]
}
a1.dom._NAME_ATTRS = (function () {
var T = {
cellpadding: "cellPadding",
cellspacing: "cellSpacing",
colspan: "colSpan",
rowspan: "rowSpan",
valign: "vAlign",
usemap: "useMap",
frameborder: "frameBorder"
};
if (a1.browser.ie < 8) {
T["for"] = "htmlFor";
T["class"] = "className"
} else {
T.htmlFor = "for";
T.className = "class"
}
return T
})();
a1.dom.setAttr = function (cC, T, cD) {
cC = a1.dom.g(cC);
if ("style" == T) {
cC.style.cssText = cD
} else {
T = a1.dom._NAME_ATTRS[T] || T;
cC.setAttribute(T, cD)
}
return cC
};
a1.setAttr = a1.dom.setAttr;
a1.dom.setAttrs = function (cD, T) {
cD = a1.dom.g(cD);
for (var cC in T) {
a1.dom.setAttr(cD, cC, T[cC])
}
return cD
};
a1.setAttrs = a1.dom.setAttrs;
a1.string = a1.string || {}; (function () {
var T = new RegExp("(^[\\s\\t\\xa0\\u3000]+)|([\\u3000\\xa0\\s\\t]+\x24)", "g");
a1.string.trim = function (cC) {
return String(cC).replace(T, "")
}
})();
a1.trim = a1.string.trim;
a1.string.format = function (cD, T) {
cD = String(cD);
var cC = Array.prototype.slice.call(arguments, 1),
cE = Object.prototype.toString;
if (cC.length) {
cC = cC.length == 1 ? (T !== null && (/\[object Array\]|\[object Object\]/.test(cE.call(T))) ? T : cC) : cC;
return cD.replace(/#\{(.+?)\}/g,
function (cF, cH) {
var cG = cC[cH];
if ("[object Function]" == cE.call(cG)) {
cG = cG(cH)
}
return ("undefined" == typeof cG ? "" : cG)
})
}
return cD
};
a1.format = a1.string.format;
a1.dom.removeClass = function (cG, cH) {
cG = a1.dom.g(cG);
var cE = cG.className.split(/\s+/),
cI = cH.split(/\s+/),
cC,
T = cI.length,
cD,
cF = 0;
for (; cF < T; ++cF) {
for (cD = 0, cC = cE.length; cD < cC; ++cD) {
if (cE[cD] == cI[cF]) {
cE.splice(cD, 1);
break
}
}
}
cG.className = cE.join(" ");
return cG
};
a1.removeClass = a1.dom.removeClass;
a1.dom.insertHTML = function (cE, T, cD) {
cE = a1.dom.g(cE);
var cC, cF;
if (cE.insertAdjacentHTML) {
cE.insertAdjacentHTML(T, cD)
} else {
cC = cE.ownerDocument.createRange();
T = T.toUpperCase();
if (T == "AFTERBEGIN" || T == "BEFOREEND") {
cC.selectNodeContents(cE);
cC.collapse(T == "AFTERBEGIN")
} else {
cF = T == "BEFOREBEGIN";
cC[cF ? "setStartBefore" : "setEndAfter"](cE);
cC.collapse(cF)
}
cC.insertNode(cC.createContextualFragment(cD))
}
return cE
};
a1.insertHTML = a1.dom.insertHTML;
a1.dom.show = function (T) {
T = a1.dom.g(T);
T.style.display = "";
return T
};
a1.show = a1.dom.show;
a1.dom.getDocument = function (T) {
T = a1.dom.g(T);
return T.nodeType == 9 ? T : T.ownerDocument || T.document
};
a1.dom.addClass = function (cG, cH) {
cG = a1.dom.g(cG);
var cC = cH.split(/\s+/),
T = cG.className,
cF = " " + T + " ",
cE = 0,
cD = cC.length;
for (; cE < cD; cE++) {
if (cF.indexOf(" " + cC[cE] + " ") < 0) {
T += " " + cC[cE]
}
}
cG.className = T;
return cG
};
a1.addClass = a1.dom.addClass;
a1.dom._styleFixer = a1.dom._styleFixer || {};
a1.dom._styleFilter = a1.dom._styleFilter || [];
a1.dom._styleFilter.filter = function (cC, cF, cG) {
for (var T = 0,
cE = a1.dom._styleFilter,
cD; cD = cE[T]; T++) {
if (cD = cD[cG]) {
cF = cD(cC, cF)
}
}
return cF
};
a1.string.toCamelCase = function (T) {
if (T.indexOf("-") < 0 && T.indexOf("_") < 0) {
return T
}
return T.replace(/[-_][^-_]/g,
function (cC) {
return cC.charAt(1).toUpperCase()
})
};
a1.dom.getStyle = function (cD, cC) {
var cG = a1.dom;
cD = cG.g(cD);
cC = a1.string.toCamelCase(cC);
var cF = cD.style[cC];
if (!cF) {
var T = cG._styleFixer[cC],
cE = cD.currentStyle || (a1.browser.ie ? cD.style : getComputedStyle(cD, null));
cF = T && T.get ? T.get(cD, cE) : cE[T || cC]
}
if (T = cG._styleFilter) {
cF = T.filter(cC, cF, "get")
}
return cF
};
a1.getStyle = a1.dom.getStyle;
if (/opera\/(\d+\.\d)/i.test(navigator.userAgent)) {
a1.browser.opera = +RegExp["\x241"]
}
a1.browser.isWebkit = /webkit/i.test(navigator.userAgent);
a1.browser.isGecko = /gecko/i.test(navigator.userAgent) && !/like gecko/i.test(navigator.userAgent);
a1.browser.isStrict = document.compatMode == "CSS1Compat";
a1.dom.getPosition = function (T) {
T = a1.dom.g(T);
var cK = a1.dom.getDocument(T),
cE = a1.browser,
cH = a1.dom.getStyle,
cD = cE.isGecko > 0 && cK.getBoxObjectFor && cH(T, "position") == "absolute" && (T.style.top === "" || T.style.left === ""),
cI = {
left: 0,
top: 0
},
cG = (cE.ie && !cE.isStrict) ? cK.body : cK.documentElement,
cL,
cC;
if (T == cG) {
return cI
}
if (T.getBoundingClientRect) {
cC = T.getBoundingClientRect();
cI.left = Math.floor(cC.left) + Math.max(cK.documentElement.scrollLeft, cK.body.scrollLeft);
cI.top = Math.floor(cC.top) + Math.max(cK.documentElement.scrollTop, cK.body.scrollTop);
cI.left -= cK.documentElement.clientLeft;
cI.top -= cK.documentElement.clientTop;
var cJ = cK.body,
cM = parseInt(cH(cJ, "borderLeftWidth")),
cF = parseInt(cH(cJ, "borderTopWidth"));
if (cE.ie && !cE.isStrict) {
cI.left -= isNaN(cM) ? 2 : cM;
cI.top -= isNaN(cF) ? 2 : cF
}
} else {
cL = T;
do {
cI.left += cL.offsetLeft;
cI.top += cL.offsetTop;
if (cE.isWebkit > 0 && cH(cL, "position") == "fixed") {
cI.left += cK.body.scrollLeft;
cI.top += cK.body.scrollTop;
break
}
cL = cL.offsetParent
} while (cL && cL != T);
if (cE.opera > 0 || (cE.isWebkit > 0 && cH(T, "position") == "absolute")) {
cI.top -= cK.body.offsetTop
}
cL = T.offsetParent;
while (cL && cL != cK.body) {
cI.left -= cL.scrollLeft;
if (!cE.opera || cL.tagName != "TR") {
cI.top -= cL.scrollTop
}
cL = cL.offsetParent
}
}
return cI
};
if (/firefox\/(\d+\.\d)/i.test(navigator.userAgent)) {
a1.browser.firefox = +RegExp["\x241"]
} (function () {
var T = navigator.userAgent;
if (/(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(T) && !/chrome/i.test(T)) {
a1.browser.safari = +(RegExp["\x241"] || RegExp["\x242"])
}
})();
if (/chrome\/(\d+\.\d)/i.test(navigator.userAgent)) {
a1.browser.chrome = +RegExp["\x241"]
}
a1.array = a1.array || {};
a1.array.each = function (cG, cE) {
var cD, cF, cC, T = cG.length;
if ("function" == typeof cE) {
for (cC = 0; cC < T; cC++) {
cF = cG[cC];
cD = cE.call(cG, cF, cC);
if (cD === false) {
break
}
}
}
return cG
};
a1.each = a1.array.each;
a1.lang.guid = function () {
return "TANGRAM__" + (window[a1.guid]._counter++).toString(36)
};
window[a1.guid]._counter = window[a1.guid]._counter || 1;
window[a1.guid]._instances = window[a1.guid]._instances || {};
a1.lang.isFunction = function (T) {
return "[object Function]" == Object.prototype.toString.call(T)
};
a1.lang.Class = function (T) {
this.guid = T || a1.lang.guid();
window[a1.guid]._instances[this.guid] = this
};
window[a1.guid]._instances = window[a1.guid]._instances || {};
a1.lang.Class.prototype.dispose = function () {
delete window[a1.guid]._instances[this.guid];
for (var T in this) {
if (!a1.lang.isFunction(this[T])) {
delete this[T]
}
}
this.disposed = true
};
a1.lang.Class.prototype.toString = function () {
return "[object " + (this._className || "Object") + "]"
};
a1.lang.Event = function (T, cC) {
this.type = T;
this.returnValue = true;
this.target = cC || null;
this.currentTarget = null
};
a1.lang.Class.prototype.addEventListener = function (cE, cD, cC) {
if (!a1.lang.isFunction(cD)) {
return
} !this.__listeners && (this.__listeners = {});
var T = this.__listeners,
cF;
if (typeof cC == "string" && cC) {
if (/[^\w\-]/.test(cC)) {
throw ("nonstandard key:" + cC)
} else {
cD.hashCode = cC;
cF = cC
}
}
cE.indexOf("on") != 0 && (cE = "on" + cE);
typeof T[cE] != "object" && (T[cE] = {});
cF = cF || a1.lang.guid();
cD.hashCode = cF;
T[cE][cF] = cD
};
a1.lang.Class.prototype.removeEventListener = function (cD, cC) {
if (a1.lang.isFunction(cC)) {
cC = cC.hashCode
} else {
if (!a1.lang.isString(cC)) {
return
}
} !this.__listeners && (this.__listeners = {});
cD.indexOf("on") != 0 && (cD = "on" + cD);
var T = this.__listeners;
if (!T[cD]) {
return
}
T[cD][cC] && delete T[cD][cC]
};
a1.lang.Class.prototype.dispatchEvent = function (cE, T) {
if (a1.lang.isString(cE)) {
cE = new a1.lang.Event(cE)
} !this.__listeners && (this.__listeners = {});
T = T || {};
for (var cD in T) {
cE[cD] = T[cD]
}
var cD, cC = this.__listeners,
cF = cE.type;
cE.target = cE.target || this;
cE.currentTarget = this;
cF.indexOf("on") != 0 && (cF = "on" + cF);
a1.lang.isFunction(this[cF]) && this[cF].apply(this, arguments);
if (typeof cC[cF] == "object") {
for (cD in cC[cF]) {
cC[cF][cD].apply(this, arguments)
}
}
return cE.returnValue
};
a1.lang.inherits = function (cH, cF, cE) {
var cD, cG, T = cH.prototype,
cC = new Function();
cC.prototype = cF.prototype;
cG = cH.prototype = new cC();
for (cD in T) {
cG[cD] = T[cD]
}
cH.prototype.constructor = cH;
cH.superClass = cF.prototype;
if ("string" == typeof cE) {
cG._className = cE
}
};
a1.inherits = a1.lang.inherits;
a1.lang.instance = function (T) {
return window[a1.guid]._instances[T] || null
};
a1.platform = a1.platform || {};
a1.platform.isMacintosh = /macintosh/i.test(navigator.userAgent);
a1.platform.isWindows = /windows/i.test(navigator.userAgent);
a1.platform.isX11 = /x11/i.test(navigator.userAgent);
a1.platform.isAndroid = /android/i.test(navigator.userAgent);
a1.platform.isIpad = /ipad/i.test(navigator.userAgent);
a1.platform.isIphone = /iphone/i.test(navigator.userAgent);
a1.lang.Event.prototype.inherit = function (cD) {
var cC = this;
this.domEvent = cD = window.event || cD;
cC.clientX = cD.clientX || cD.pageX;
cC.clientY = cD.clientY || cD.pageY;
cC.offsetX = cD.offsetX || cD.layerX;
cC.offsetY = cD.offsetY || cD.layerY;
cC.screenX = cD.screenX;
cC.screenY = cD.screenY;
cC.ctrlKey = cD.ctrlKey || cD.metaKey;
cC.shiftKey = cD.shiftKey;
cC.altKey = cD.altKey;
if (cD.touches) {
cC.touches = [];
for (var T = 0; T < cD.touches.length; T++) {
cC.touches.push({
clientX: cD.touches[T].clientX,
clientY: cD.touches[T].clientY,
screenX: cD.touches[T].screenX,
screenY: cD.touches[T].screenY,
pageX: cD.touches[T].pageX,
pageY: cD.touches[T].pageY,
target: cD.touches[T].target,
identifier: cD.touches[T].identifier
})
}
}
if (cD.changedTouches) {
cC.changedTouches = [];
for (var T = 0; T < cD.changedTouches.length; T++) {
cC.changedTouches.push({
clientX: cD.changedTouches[T].clientX,
clientY: cD.changedTouches[T].clientY,
screenX: cD.changedTouches[T].screenX,
screenY: cD.changedTouches[T].screenY,
pageX: cD.changedTouches[T].pageX,
pageY: cD.changedTouches[T].pageY,
target: cD.changedTouches[T].target,
identifier: cD.changedTouches[T].identifier
})
}
}
if (cD.targetTouches) {
cC.targetTouches = [];
for (var T = 0; T < cD.targetTouches.length; T++) {
cC.targetTouches.push({
clientX: cD.targetTouches[T].clientX,
clientY: cD.targetTouches[T].clientY,
screenX: cD.targetTouches[T].screenX,
screenY: cD.targetTouches[T].screenY,
pageX: cD.targetTouches[T].pageX,
pageY: cD.targetTouches[T].pageY,
target: cD.targetTouches[T].target,
identifier: cD.targetTouches[T].identifier
})
}
}
cC.rotation = cD.rotation;
cC.scale = cD.scale;
return cC
};
a1.lang.decontrol = function (cC) {
var T = window[a1.guid];
T._instances && (delete T._instances[cC])
};
a1.event = {};
a1.on = a1.event.on = function (cD, cC, T) {
if (!(cD = a1.g(cD))) {
return cD
}
cC = cC.replace(/^on/, "");
if (cD.addEventListener) {
cD.addEventListener(cC, T, false)
} else {
if (cD.attachEvent) {
cD.attachEvent("on" + cC, T)
}
}
return cD
};
a1.un = a1.event.un = function (cD, cC, T) {
if (!(cD = a1.g(cD))) {
return cD
}
cC = cC.replace(/^on/, "");
if (cD.removeEventListener) {
cD.removeEventListener(cC, T, false)
} else {
if (cD.detachEvent) {
cD.detachEvent("on" + cC, T)
}
}
return cD
};
a1.dom.hasClass = function (cD, cC) {
if (!cD || !cD.className || typeof cD.className != "string") {
return false
}
var T = -1;
try {
T = cD.className == cC || cD.className.search(new RegExp("(\\s|^)" + cC + "(\\s|$)"))
} catch (cE) {
return false
}
return T > -1
};
window.BMap = window.BMap || {};
window.BMap.version = "1.2";
window.BMap._register = [];
window.BMap.register = function (T) {
this._register.push(T)
};
window.BMap.apiLoad = window.BMap.apiLoad ||
function () { };
function bs(cE, cG) {
cE = a1.g(cE);
if (!cE) {
return
}
var cF = this;
a1.lang.Class.call(cF);
cF.config = {
clickInterval: 200,
enableDragging: true,
enableKeyboard: false,
enableDblclickZoom: true,
enableContinuousZoom: false,
enableWheelZoom: false,
enableMouseDown: true,
enablePinchToZoom: true,
enableAutoResize: true,
fps: 25,
zoomerDuration: 240,
actionDuration: 450,
defaultCursor: b3.defaultCursor,
draggingCursor: b3.draggingCursor,
isOverviewMap: false,
minZoom: 1,
maxZoom: 18,
mapType: BMAP_NORMAL_MAP,
restrictBounds: false,
drawer: BMAP_SYS_DRAWER,
enableInertialDragging: false,
drawMargin: 500,
enableHighResolution: false
};
a1.extend(cF.config, cG || {});
if (cF.highResolutionEnabled()) {
var cI = document.querySelector("meta[name=viewport]");
cI.content = "initial-scale=0.5, minimum-scale=0.5, maximum-scale=0.5, user-scalable=no, target-densitydpi=high-dpi"
}
cF.container = cE;
cF._setStyle(cE);
cE.unselectable = "on";
cE.innerHTML = "";
cE.appendChild(cF.render());
var cC = cF.getSize();
cF.width = cC.width;
cF.height = cC.height;
cF.offsetX = 0;
cF.offsetY = 0;
cF.platform = cE.firstChild;
cF.maskLayer = cF.platform.firstChild;
cF.maskLayer.style.width = cF.width + "px";
cF.maskLayer.style.height = cF.height + "px";
cF._panes = {};
cF.centerPoint = new b4(0, 0);
cF.mercatorCenter = new b4(0, 0);
cF.zoomLevel = 1;
cF.lastLevel = 0;
cF.defaultZoomLevel = null;
cF.defaultCenter = null;
cF.currentCity = "";
cF.cityCode = "";
cF._hotspots = {};
cF.currentOperation = 0;
cG = cG || {};
var cH = cF.mapType = cF.config.mapType;
cF.projection = cH.getProjection();
if (cH === BMAP_PERSPECTIVE_MAP) {
_addStat(5002)
}
if (cH === BMAP_SATELLITE_MAP || cH === BMAP_HYBRID_MAP) {
_addStat(5003)
}
var T = cF.config;
T.userMinZoom = cG.minZoom;
T.userMaxZoom = cG.maxZoom;
cF._checkZoom();
cF.temp = {
operating: false,
arrow: 0,
lastDomMoveTime: 0,
lastLoadTileTime: 0,
lastMovingTime: 0,
canKeyboard: false,
registerIndex: -1,
curSpots: []
};
cF.platform.style.cursor = cF.config.defaultCursor;
for (var cD = 0; cD < BMap._register.length; cD++) {
BMap._register[cD](cF)
}
cF.temp.registerIndex = cD;
cF._bind();
cr.load("map",
function () {
cF._draw()
});
if (bG()) {
cr.load("oppc",
function () {
cF._asyncRegister()
})
}
if (av()) {
cr.load("opmb",
function () {
cF._asyncRegister()
})
}
cE = null
}
a1.lang.inherits(bs, a1.lang.Class, "Map");
a1.extend(bs.prototype, {
render: function () {
var T = W("div");
var cE = T.style;
cE.overflow = "visible";
cE.position = "absolute";
cE.zIndex = "0";
cE.top = cE.left = "0px";
var cC = W("div", {
"class": "BMap_mask"
});
var cD = cC.style;
cD.position = "absolute";
cD.top = cD.left = "0px";
cD.zIndex = "9";
cD.overflow = "hidden";
cD.WebkitUserSelect = "none";
T.appendChild(cC);
return T
},
_setStyle: function (cC) {
var T = cC.style;
T.overflow = "hidden";
if (aD(cC).position != "absolute") {
T.position = "relative";
T.zIndex = 0
}
T.backgroundColor = "#F3F1EC";
T.color = "#000";
T.textAlign = "left"
},
_bind: function () {
var T = this;
T._watchSize = function () {
var cC = T.getSize();
if (T.width != cC.width || T.height != cC.height) {
var cE = new aB(T.width, T.height);
var cF = new a9("onbeforeresize");
cF.size = cE;
T.dispatchEvent(cF);
T._updateCenterPoint((cC.width - T.width) / 2, (cC.height - T.height) / 2);
T.maskLayer.style.width = (T.width = cC.width) + "px";
T.maskLayer.style.height = (T.height = cC.height) + "px";
var cD = new a9("onresize");
cD.size = cC;
T.dispatchEvent(cD)
}
};
if (T.config.enableAutoResize) {
T.temp.autoResizeTimer = setInterval(T._watchSize, 80)
}
},
_updateCenterPoint: function (cE, cC, cI, cH) {
var cF = this.getMapType().getZoomUnits(this.getZoom());
var cJ = this.projection;
var cG = true;
if (cI && b4.isInRange(cI)) {
this.centerPoint = new b4(cI.lng, cI.lat);
cG = false
}
var cD = (cI && cH) ? cJ.lngLatToMercator(cI, this.currentCity) : this.mercatorCenter;
if (cD) {
this.mercatorCenter = new b4(cD.lng + cE * cF, cD.lat - cC * cF);
var T = cJ.mercatorToLngLat(this.mercatorCenter, this.currentCity);
if (T && cG) {
this.centerPoint = T
}
}
},
zoomTo: function (cE, cC) {
if (!aE(cE)) {
return
}
cE = this._getProperZoom(cE).zoom;
if (cE == this.zoomLevel) {
return
}
this.lastLevel = this.zoomLevel;
this.zoomLevel = cE;
var cD;
if (cC) {
cD = cC
} else {
if (this.getInfoWindow()) {
cD = this.getInfoWindow().getPosition()
}
}
if (cD) {
var T = this.pointToPixel(cD, this.lastLevel);
this._updateCenterPoint(this.width / 2 - T.x, this.height / 2 - T.y, this.pixelToPoint(T, this.lastLevel), true)
}
this.dispatchEvent(new a9("onzoomstart"));
this.dispatchEvent(new a9("onzoomstartcode"))
},
setZoom: function (T) {
this.zoomTo(T)
},
zoomIn: function (T) {
this.zoomTo(this.zoomLevel + 1, T)
},
zoomOut: function (T) {
this.zoomTo(this.zoomLevel - 1, T)
},
panTo: function (T, cC) {
if (!(T instanceof b4)) {
return
}
this.mercatorCenter = this.projection.lngLatToMercator(T, this.currentCity);
if (b4.isInRange(T)) {
this.centerPoint = new b4(T.lng, T.lat)
} else {
this.centerPoint = this.projection.mercatorToLngLat(this.mercatorCenter, this.currentCity)
}
},
panBy: function (cC, T) {
cC = Math.round(cC) || 0;
T = Math.round(T) || 0;
this._updateCenterPoint(-cC, -T)
},
addControl: function (T) {
if (T && G(T._i)) {
T._i(this);
this.dispatchEvent(new a9("onaddcontrol", T))
}
},
removeControl: function (T) {
if (T && G(T.remove)) {
T.remove();
this.dispatchEvent(new a9("onremovecontrol", T))
}
},
addContextMenu: function (T) {
if (T && G(T.initialize)) {
T.initialize(this);
this.dispatchEvent(new a9("onaddcontextmenu", T))
}
},
removeContextMenu: function (T) {
if (T && G(T.remove)) {
this.dispatchEvent(new a9("onremovecontextmenu", T));
T.remove()
}
},
addOverlay: function (T) {
if (T && G(T._i)) {
T._i(this);
this.dispatchEvent(new a9("onaddoverlay", T))
}
},
removeOverlay: function (T) {
if (T && G(T.remove)) {
T.remove();
this.dispatchEvent(new a9("onremoveoverlay", T))
}
},
clearOverlays: function () {
this.dispatchEvent(new a9("onclearoverlays"))
},
addTileLayer: function (T) {
if (T) {
this.dispatchEvent(new a9("onaddtilelayer", T))
}
},
removeTileLayer: function (T) {
if (T) {
this.dispatchEvent(new a9("onremovetilelayer", T))
}
},
setMapType: function (cC) {
if (this.mapType === cC) {
return
}
var cD = new a9("onsetmaptype");
var T = this.mapType;
cD.preMapType = T;
this.mapType = this.config.mapType = cC;
this.projection = this.mapType.getProjection();
this._updateCenterPoint(0, 0, this.getCenter(), true);
this._checkZoom();
var cE = this._getProperZoom(this.getZoom()).zoom;
this.zoomTo(cE);
this.dispatchEvent(cD);
var cD = new a9("onmaptypechange");
cD.zoomLevel = cE;
cD.mapType = cC;
this.dispatchEvent(cD);
if (cC === BMAP_SATELLITE_MAP || cC === BMAP_HYBRID_MAP) {
_addStat(5003)
}
},
setCenter: function (T) {
var cD = this;
if (T instanceof b4) {
cD.panTo(T, {
noAnimation: true
})
} else {
if (bV(T)) {
var cC = this._getLocal();
cC.setSearchCompleteCallback(function (cE) {
if (cC.getStatus() == 0 && cC._json.result.type == 2) {
cD.setCenter(cE.getPoi(0).point);
if (BMAP_PERSPECTIVE_MAP.getCityName(T)) {
cD.setCurrentCity(T)
}
}
});
cC.search(T)
}
}
},
centerAndZoom: function (T, cD) {
var cC = this;
if (bV(T)) {
var cG = cC._getLocal();
cG.setSearchCompleteCallback(function (cH) {
if (cG.getStatus() == 0 && cG._json.result.type == 2) {
var cJ = cH.getPoi(0).point;
var cI = cD || P.getBestLevel(cG._json.content.level, cC);
cC.centerAndZoom(cJ, cI);
if (BMAP_PERSPECTIVE_MAP.getCityName(T)) {
cC.setCurrentCity(T)
}
}
});
cG.search(T);
return
}
if (!(T instanceof b4) || !cD) {
return
}
cD = cC._getProperZoom(cD).zoom;
cC.lastLevel = cC.zoomLevel || cD;
cC.zoomLevel = cD;
cC.centerPoint = new b4(T.lng, T.lat);
cC.mercatorCenter = cC.projection.lngLatToMercator(cC.centerPoint, cC.currentCity);
cC.defaultZoomLevel = cC.defaultZoomLevel || cC.zoomLevel;
cC.defaultCenter = cC.defaultCenter || cC.centerPoint;
var cF = new a9("onload");
var cE = new a9("onloadcode");
cF.point = new b4(T.lng, T.lat);
cF.pixel = cC.pointToPixel(cC.centerPoint, cC.zoomLevel);
cF.zoom = cD;
if (!cC.loaded) {
cC.loaded = true;
cC.dispatchEvent(cF)
}
cC.dispatchEvent(cE);
cC.dispatchEvent(new a9("onmoveend"));
if (cC.lastLevel != cC.zoomLevel) {
cC.dispatchEvent(new a9("onzoomend"))
}
},
_getLocal: function () {
if (!this.temp.local) {
this.temp.local = new aX(1)
}
return this.temp.local
},
reset: function () {
this.centerAndZoom(this.defaultCenter, this.defaultZoomLevel, true)
},
enableDragging: function () {
this.config.enableDragging = true
},
disableDragging: function () {
this.config.enableDragging = false
},
enableInertialDragging: function () {
this.config.enableInertialDragging = true
},
disableInertialDragging: function () {
this.config.enableInertialDragging = false
},
enableScrollWheelZoom: function () {
this.config.enableWheelZoom = true
},
disableScrollWheelZoom: function () {
this.config.enableWheelZoom = false
},
enableContinuousZoom: function () {
this.config.enableContinuousZoom = true
},
disableContinuousZoom: function () {
this.config.enableContinuousZoom = false
},
enableDoubleClickZoom: function () {
this.config.enableDblclickZoom = true
},
disableDoubleClickZoom: function () {
this.config.enableDblclickZoom = false
},
enableKeyboard: function () {
this.config.enableKeyboard = true
},
disableKeyboard: function () {
this.config.enableKeyboard = false
},
enablePinchToZoom: function () {
this.config.enablePinchToZoom = true
},
disablePinchToZoom: function () {
this.config.enablePinchToZoom = false
},
enableAutoResize: function () {
this.config.enableAutoResize = true;
this._watchSize();
if (!this.temp.autoResizeTimer) {
this.temp.autoResizeTimer = setInterval(this._watchSize, 80)
}
},
disableAutoResize: function () {
this.config.enableAutoResize = false;
if (this.temp.autoResizeTimer) {
clearInterval(this.temp.autoResizeTimer);
this.temp.autoResizeTimer = null
}
},
getSize: function () {
return new aB(this.container.clientWidth, this.container.clientHeight)
},
getCenter: function () {
return this.centerPoint
},
getZoom: function () {
return this.zoomLevel
},
checkResize: function () {
this._watchSize()
},
_getProperZoom: function (cD) {
var cC = this.config.minZoom,
T = this.config.maxZoom,
cE = false;
if (cD < cC) {
cE = true;
cD = cC
}
if (cD > T) {
cE = true;
cD = T
}
return {
zoom: cD,
exceeded: cE
}
},
getContainer: function () {
return this.container
},
pointToPixel: function (T, cC) {
cC = cC || this.getZoom();
return this.projection.pointToPixel(T, cC, this.mercatorCenter, this.getSize(), this.currentCity)
},
pixelToPoint: function (T, cC) {
cC = cC || this.getZoom();
return this.projection.pixelToPoint(T, cC, this.mercatorCenter, this.getSize(), this.currentCity)
},
pointToOverlayPixel: function (T, cD) {
if (!T) {
return
}
var cE = new b4(T.lng, T.lat);
var cC = this.pointToPixel(cE, cD);
cC.x -= this.offsetX;
cC.y -= this.offsetY;
return cC
},
overlayPixelToPoint: function (T, cD) {
if (!T) {
return
}
var cC = new bn(T.x, T.y);
cC.x += this.offsetX;
cC.y += this.offsetY;
return this.pixelToPoint(cC, cD)
},
getBounds: function () {
if (!this.isLoaded()) {
return new bF()
}
var cC = arguments[0] || {},
cE = cC.margins || [0, 0, 0, 0],
T = cC.zoom || null,
cF = this.pixelToPoint({
x: cE[3],
y: this.height - cE[2]
},
T),
cD = this.pixelToPoint({
x: this.width - cE[1],
y: cE[0]
},
T);
return new bF(cF, cD)
},
isLoaded: function () {
return !!this.loaded
},
_getBestLevel: function (cC, cD) {
var cG = this.getMapType();
var cI = cD.margins || [10, 10, 10, 10],
cF = cD.zoomFactor || 0,
cJ = cI[1] + cI[3],
cH = cI[0] + cI[2],
T = cG.getMinZoom(),
cL = cG.getMaxZoom();
for (var cE = cL; cE >= T; cE--) {
var cK = this.getMapType().getZoomUnits(cE);
if (cC.toSpan().lng / cK < this.width - cJ && cC.toSpan().lat / cK < this.height - cH) {
break
}
}
cE += cF;
if (cE < T) {
cE = T
}
if (cE > cL) {
cE = cL
}
return cE
},
getViewport: function (cK, cC) {
var cO = {
center: this.getCenter(),
zoom: this.getZoom()
};
if (!cK || !cK instanceof bF && cK.length == 0 || cK instanceof bF && cK.isEmpty()) {
return cO
}
var cM = [];
if (cK instanceof bF) {
cM.push(cK.getNorthEast());
cM.push(cK.getSouthWest())
} else {
cM = cK.slice(0)
}
cC = cC || {};
var cG = [];
for (var cH = 0,
cF = cM.length; cH < cF; cH++) {
cG.push(this.projection.lngLatToMercator(cM[cH], this.currentCity))
}
var cD = new bF();
for (var cH = cG.length - 1; cH >= 0; cH--) {
cD.extend(cG[cH])
}
if (cD.isEmpty()) {
return cO
}
var T = cD.getCenter();
var cN = this._getBestLevel(cD, cC);
if (cC.margins) {
var cJ = cC.margins,
cI = (cJ[1] - cJ[3]) / 2,
cL = (cJ[0] - cJ[2]) / 2,
cE = this.getMapType().getZoomUnits(cN);
T.lng = T.lng + cE * cI;
T.lat = T.lat + cE * cL
}
T = this.projection.mercatorToLngLat(T, this.currentCity);
return {
center: T,
zoom: cN
}
},
setViewport: function (cC, cF) {
var T;
if (cC && cC.center) {
T = cC
} else {
T = this.getViewport(cC, cF)
}
cF = cF || {};
var cD = cF.delay || 200;
if (T.zoom == this.zoomLevel && cF.enableAnimation != false) {
var cE = this;
setTimeout(function () {
cE.panTo(T.center, {
duration: 210
})
},
cD)
} else {
this.centerAndZoom(T.center, T.zoom)
}
},
getPanes: function () {
return this._panes
},
getInfoWindow: function () {
if (this.temp.infoWin && this.temp.infoWin.isOpen()) {
return this.temp.infoWin
}
return null
},
getDistance: function (cD, T) {
if (!cD || !T) {
return
}
var cC = 0;
cC = a3.getDistanceByLL(cD, T);
return cC
},
getOverlays: function () {
var cE = [],
cF = this._overlays,
cD = this._customOverlays;
if (cF) {
for (var cC in cF) {
if (cF[cC] instanceof U) {
cE.push(cF[cC])
}
}
}
if (cD) {
for (var cC = 0,
T = cD.length; cC < T; cC++) {
cE.push(cD[cC])
}
}
return cE
},
getMapType: function () {
return this.mapType
},
_asyncRegister: function () {
for (var T = this.temp.registerIndex; T < BMap._register.length; T++) {
BMap._register[T](this)
}
this.temp.registerIndex = T
},
setCurrentCity: function (T) {
this.currentCity = BMAP_PERSPECTIVE_MAP.getCityName(T);
this.cityCode = BMAP_PERSPECTIVE_MAP.getCityCode(this.currentCity)
},
setDefaultCursor: function (T) {
this.config.defaultCursor = T;
if (this.platform) {
this.platform.style.cursor = this.config.defaultCursor
}
},
getDefaultCursor: function () {
return this.config.defaultCursor
},
setDraggingCursor: function (T) {
this.config.draggingCursor = T
},
getDraggingCursor: function () {
return this.config.draggingCursor
},
highResolutionEnabled: function () {
return this.config.enableHighResolution && window.devicePixelRatio > 1
},
addHotspot: function (cC) {
if (cC instanceof cd) {
this._hotspots[cC.guid] = cC;
cC.initialize(this)
}
var T = this;
cr.load("hotspot",
function () {
T._asyncRegister()
})
},
removeHotspot: function (T) {
if (this._hotspots[T.guid]) {
delete this._hotspots[T.guid]
}
},
clearHotspots: function () {
this._hotspots = {}
},
_checkZoom: function () {
var cC = this.mapType.getMinZoom();
var cD = this.mapType.getMaxZoom();
var T = this.config;
T.minZoom = T.userMinZoom || cC;
T.maxZoom = T.userMaxZoom || cD;
if (T.minZoom < cC) {
T.minZoom = cC
}
if (T.maxZoom > cD) {
T.maxZoom = cD
}
},
setMinZoom: function (T) {
if (T > this.config.maxZoom) {
T = this.config.maxZoom
}
this.config.userMinZoom = T;
this._updateZoom()
},
setMaxZoom: function (T) {
if (T < this.config.minZoom) {
T = this.config.minZoom
}
this.config.userMaxZoom = T;
this._updateZoom()
},
_updateZoom: function () {
this._checkZoom();
var T = this.config;
if (this.zoomLevel < T.minZoom) {
this.setZoom(T.minZoom)
} else {
if (this.zoomLevel > T.maxZoom) {
this.setZoom(T.maxZoom)
}
}
var cC = new a9("onzoomspanchange");
cC.minZoom = T.minZoom;
cC.maxZoom = T.maxZoom;
this.dispatchEvent(cC)
}
});
window.BMAP_API_VERSION = "1.2";
window.BMAP_COORD_LNGLAT = 0;
window.BMAP_COORD_MERCATOR = 1;
window.BMAP_SYS_DRAWER = 0;
window.BMAP_SVG_DRAWER = 1;
window.BMAP_VML_DRAWER = 2;
window.BMAP_CANVAS_DRAWER = 3;
window._addStat = function (cG, cF) {
if (!cG) {
return
}
cF = cF || {};
var cE = "";
for (var cC in cF) {
cE = cE + "&" + cC + "=" + encodeURIComponent(cF[cC])
}
var cH = function (cI) {
if (!cI) {
return
}
_addStat._sending = true;
setTimeout(function () {
_addStat._img.src = b3.imgPath + "blank.gif?" + cI.src
},
50)
};
var T = function () {
var cI = _addStat._reqQueue.shift();
if (cI) {
cH(cI)
}
};
var cD = (Math.random() * 100000000).toFixed(0);
if (_addStat._sending) {
_addStat._reqQueue.push({
src: "t=" + cD + "&code=" + cG + cE
})
} else {
cH({
src: "t=" + cD + "&code=" + cG + cE
})
}
if (!_addStat._binded) {
a1.on(_addStat._img, "load",
function () {
_addStat._sending = false;
T()
});
a1.on(_addStat._img, "error",
function () {
_addStat._sending = false;
T()
});
_addStat._binded = true
}
};
window._addStat._reqQueue = [];
window._addStat._img = new Image();
_addStat(5000, {
v: BMap.version
});
function g(cE) {
var T = {
duration: 1000,
fps: 30,
delay: 0,
transition: aq.linear,
onStop: function () { }
};
this._anis = [];
if (cE) {
for (var cC in cE) {
T[cC] = cE[cC]
}
}
this._opts = T;
if (aE(T.delay)) {
var cD = this;
setTimeout(function () {
cD.start()
},
T.delay)
} else {
if (T.delay != g.INFINITE) {
this.start()
}
}
}
g.INFINITE = "INFINITE";
g.prototype.start = function () {
this._beginTime = az();
this._endTime = this._beginTime + this._opts.duration;
this._launch()
};
g.prototype.add = function (T) {
this._anis.push(T)
};
g.prototype._launch = function () {
var cD = this;
var T = az();
if (T >= cD._endTime) {
if (G(cD._opts.render)) {
cD._opts.render(cD._opts.transition(1))
}
if (G(cD._opts.finish)) {
cD._opts.finish()
}
if (cD._anis.length > 0) {
var cC = cD._anis[0];
cC._anis = [].concat(cD._anis.slice(1));
cC.start()
}
return
}
cD.schedule = cD._opts.transition((T - cD._beginTime) / cD._opts.duration);
if (G(cD._opts.render)) {
cD._opts.render(cD.schedule)
}
if (!cD.terminative) {
cD._timer = setTimeout(function () {
cD._launch()
},
1000 / cD._opts.fps)
}
};
g.prototype.stop = function (cC) {
this.terminative = true;
for (var T = 0; T < this._anis.length; T++) {
this._anis[T].stop();
this._anis[T] = null
}
this._anis.length = 0;
if (this._timer) {
clearTimeout(this._timer);
this._timer = null
}
this._opts.onStop(this.schedule);
if (cC) {
this._endTime = this._beginTime;
this._launch()
}
};
g.prototype.cancel = function () {
if (this._timer) {
clearTimeout(this._timer)
}
this._endTime = this._beginTime;
this.schedule = 0
};
g.prototype.setFinishCallback = function (T) {
if (this._anis.length > 0) {
this._anis[this._anis.length - 1]._opts.finish = T
} else {
this._opts.finish = T
}
};
var aq = {
linear: function (T) {
return T
},
reverse: function (T) {
return 1 - T
},
easeInQuad: function (T) {
return T * T
},
easeInCubic: function (T) {
return Math.pow(T, 3)
},
easeOutQuad: function (T) {
return -(T * (T - 2))
},
easeOutCubic: function (T) {
return Math.pow((T - 1), 3) + 1
},
easeInOutQuad: function (T) {
if (T < 0.5) {
return T * T * 2
} else {
return -2 * (T - 2) * T - 1
}
return
},
easeInOutCubic: function (T) {
if (T < 0.5) {
return Math.pow(T, 3) * 4
} else {
return Math.pow(T - 1, 3) * 4 + 1
}
},
easeInOutSine: function (T) {
return (1 - Math.cos(Math.PI * T)) / 2
}
};
aq["ease-in"] = aq.easeInQuad;
aq["ease-out"] = aq.easeOutQuad;
var b3 = {
imgPath: "http://api.map.baidu.com/images/",
cityNames: {
"\u5317\u4eac": "bj",
"\u4e0a\u6d77": "sh",
"\u6df1\u5733": "sz",
"\u5e7f\u5dde": "gz"
},
fontFamily: "arial,sans-serif"
};
if (a1.browser.firefox) {
a1.extend(b3, {
distCursor: "url(" + b3.imgPath + "ruler.cur),crosshair",
defaultCursor: "-moz-grab",
draggingCursor: "-moz-grabbing"
});
if (a1.platform.isWindows) {
b3.fontFamily = "arial,simsun,sans-serif"
}
} else {
if (a1.browser.chrome || a1.browser.safari) {
a1.extend(b3, {
distCursor: "url(" + b3.imgPath + "ruler.cur) 2 6,crosshair",
defaultCursor: "url(" + b3.imgPath + "openhand.cur) 8 8,default",
draggingCursor: "url(" + b3.imgPath + "closedhand.cur) 8 8,move"
})
} else {
a1.extend(b3, {
distCursor: "url(" + b3.imgPath + "ruler.cur),crosshair",
defaultCursor: "url(" + b3.imgPath + "openhand.cur),default",
draggingCursor: "url(" + b3.imgPath + "closedhand.cur),move"
})
}
}
function ap(cD, cC, T) {
this.id = cD;
this.bounds = cC;
this.content = T
}
var bg = {
undo: 1,
redo: 2,
zoom: 4,
drag: 8,
move: 16,
mousewheel: 32,
toolbarOperation: 64,
stdMapCtrlDrag: 128,
dblclick: 256
};
function bB(cD, T) {
var cC = cD.style;
cC.left = T[0] + "px";
cC.top = T[1] + "px"
}
function cn(T) {
if (a1.browser.ie > 0) {
T.unselectable = "on"
} else {
T.style.MozUserSelect = "none"
}
}
function w(T) {
return T && T.parentNode && T.parentNode.nodeType != 11
}
function an(cC, T) {
a1.dom.insertHTML(cC, "beforeEnd", T);
return cC.lastChild
}
function bQ(T) {
var cC = {
left: 0,
top: 0
};
while (T && T.offsetParent) {
cC.left += T.offsetLeft;
cC.top += T.offsetTop;
T = T.offsetParent
}
return cC
}
function aJ(T) {
var T = window.event || T;
T.stopPropagation ? T.stopPropagation() : T.cancelBubble = true
}
function ct(T) {
var T = window.event || T;
T.preventDefault ? T.preventDefault() : T.returnValue = false;
return false
}
function cf(T) {
aJ(T);
return ct(T)
}
function cx() {
var T = document.documentElement,
cC = document.body;
if (T && (T.scrollTop || T.scrollLeft)) {
return [T.scrollTop, T.scrollLeft]
} else {
if (cC) {
return [cC.scrollTop, cC.scrollLeft]
} else {
return [0, 0]
}
}
}
function ck(cC, T) {
if (!cC || !T) {
return
}
return Math.round(Math.sqrt(Math.pow(cC.x - T.x, 2) + Math.pow(cC.y - T.y, 2)))
}
function M(T, cD) {
var cC = [];
cD = cD ||
function (cF) {
return cF
};
for (var cE in T) {
cC.push(cE + "=" + cD(T[cE]))
}
return cC.join("&")
}
function W(cC, T, cD) {
var cE = document.createElement(cC);
if (cD) {
cE = document.createElementNS(cD, cC)
}
return a1.dom.setAttrs(cE, T || {})
}
function aD(T) {
if (T.currentStyle) {
return T.currentStyle
} else {
if (T.ownerDocument && T.ownerDocument.defaultView) {
return T.ownerDocument.defaultView.getComputedStyle(T, null)
}
}
}
function G(T) {
return typeof T == "function"
}
function aE(T) {
return typeof T == "number"
}
function bV(T) {
return typeof T == "string"
}
function b8(T) {
return typeof T != "undefined"
}
function cA(T) {
return typeof T == "object"
}
function aS(T) {
return "[object Array]" == Object.prototype.toString.call(T)
}
var b6 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
function bN(cE) {
var cC = "";
var cL, cJ, cH = "";
var cK, cI, cG, cF = "";
var cD = 0;
var T = /[^A-Za-z0-9\+\/\=]/g;
if (!cE || T.exec(cE)) {
return cE
}
cE = cE.replace(/[^A-Za-z0-9\+\/\=]/g, "");
do {
cK = b6.indexOf(cE.charAt(cD++));
cI = b6.indexOf(cE.charAt(cD++));
cG = b6.indexOf(cE.charAt(cD++));
cF = b6.indexOf(cE.charAt(cD++));
cL = (cK << 2) | (cI >> 4);
cJ = ((cI & 15) << 4) | (cG >> 2);
cH = ((cG & 3) << 6) | cF;
cC = cC + String.fromCharCode(cL);
if (cG != 64) {
cC = cC + String.fromCharCode(cJ)
}
if (cF != 64) {
cC = cC + String.fromCharCode(cH)
}
cL = cJ = cH = "";
cK = cI = cG = cF = ""
} while (cD < cE.length);
return cC
}
var a9 = a1.lang.Event;
function av() {
return !!(a1.platform.isIphone || a1.platform.isIpad || a1.platform.isAndroid)
}
function bG() {
return !!(a1.platform.isWindows || a1.platform.isMacintosh || a1.platform.isX11)
}
function az() {
return (new Date).getTime()
}
var co = {
request: function (cC) {
var T = W("script", {
src: cC,
type: "text/javascript",
charset: "utf-8"
});
if (T.addEventListener) {
T.addEventListener("load",
function (cE) {
var cD = cE.target;
cD.parentNode.removeChild(cD)
},
false)
} else {
if (T.attachEvent) {
T.attachEvent("onreadystatechange",
function (cE) {
var cD = window.event.srcElement;
if (cD && (cD.readyState == "loaded" || cD.readyState == "complete")) {
cD.parentNode.removeChild(cD)
}
})
}
}
setTimeout(function () {
document.getElementsByTagName("head")[0].appendChild(T);
T = null
},
1)
}
};
function cr() { }
a1.object.extend(cr, {
Request: {
INITIAL: -1,
WAITING: 0,
COMPLETED: 1
},
Dependency: {
control: [],
marker: [],
poly: ["marker"],
infowindow: ["marker"],
menu: [],
oppc: [],
opmb: [],
scommon: [],
local: ["scommon"],
route: ["scommon"],
othersearch: ["scommon"],
autocomplete: ["scommon"],
buslinesearch: ["route"],
hotspot: []
},
preLoaded: {},
Config: {
_baseUrl: "http://api.map.baidu.com/getmodules?v=1.2",
_timeout: 5000
},
delayFlag: false,
Module: {
_modules: {},
_arrMdls: []
},
load: function (cC, cE) {
var T = this.current(cC);
if (T._status == this.Request.COMPLETED) {
return
} else {
if (T._status == this.Request.INITIAL) {
this.combine(cC);
this.pushUniqueMdl(cC);
var cD = this;
if (cD.delayFlag == false) {
cD.delayFlag = true;
window.setTimeout(function () {
var cF = cD.Config._baseUrl + "&mod=" + cD.Module._arrMdls.join(",");
co.request(cF);
cD.Module._arrMdls.length = 0;
cD.delayFlag = false
},
1)
}
T._status = this.Request.WAITING
}
T._callbacks.push(cE)
}
},
combine: function (T) {
if (T && this.Dependency[T]) {
var cD = this.Dependency[T];
for (var cC = 0; cC < cD.length; cC++) {
this.combine(cD[cC]);
if (!this.Module._modules[cD[cC]]) {
this.pushUniqueMdl(cD[cC])
}
}
}
},
pushUniqueMdl: function (cC) {
for (var T = 0; T < this.Module._arrMdls.length; T++) {
if (this.Module._arrMdls[T] == cC) {
return
}
}
this.Module._arrMdls.push(cC)
},
run: function (cD, cF) {
var cC = this.current(cD);
try {
eval(cF)
} catch (cG) {
return
}
cC._status = this.Request.COMPLETED;
for (var cE = 0,
T = cC._callbacks.length; cE < T; cE++) {
cC._callbacks[cE]()
}
cC._callbacks.length = 0
},
check: function (cC, cD) {
var T = this;
T.timeout = setTimeout(function () {
var cE = T.Module._modules[cC]._status;
if (cE != T.Request.COMPLETED) {
T.remove(cC);
T.load(cC, cD)
} else {
clearTimeout(T.timeout)
}
},
T.Config._timeout)
},
current: function (cC) {
var T;
if (!this.Module._modules[cC]) {
this.Module._modules[cC] = {};
this.Module._modules[cC]._status = this.Request.INITIAL;
this.Module._modules[cC]._callbacks = []
}
T = this.Module._modules[cC];
return T
},
remove: function (cC) {
var T = this.current(cC);
delete T
}
});
window._jsload = function (T, cC) {
cr.run(T, cC)
};
function bn(T, cC) {
this.x = T || 0;
this.y = cC || 0
}
bn.prototype.equals = function (T) {
return T && T.x == this.x && T.y == this.y
};
function aB(cC, T) {
this.width = cC || 0;
this.height = T || 0
}
aB.prototype.equals = function (T) {
return T && this.width == T.width && this.height == T.height
};
function cd(T, cC) {
if (!T) {
return
}
this._position = T;
this.guid = "spot" + (cd.guid++);
cC = cC || {};
this._text = cC.text || "";
this._offsets = cC.offsets ? cC.offsets.slice(0) : [5, 5, 5, 5];
this._userData = cC.userData || null;
this._minZoom = cC.minZoom || null;
this._maxZoom = cC.maxZoom || null
}
cd.guid = 0;
a1.extend(cd.prototype, {
initialize: function (T) {
if (this._minZoom == null) {
this._minZoom = T.config.minZoom
}
if (this._maxZoom == null) {
this._maxZoom = T.config.maxZoom
}
},
setPosition: function (T) {
if (T instanceof b4) {
this._position = T
}
},
getPosition: function () {
return this._position
},
setText: function (T) {
this._text = T
},
getText: function () {
return this._text
},
setUserData: function (T) {
this._userData = T
},
getUserData: function () {
return this._userData
}
});
function cg() {
this._map = null;
this._container;
this._type = "control";
this.blockInfoWindow = true;
this._visible = true
}
a1.lang.inherits(cg, a1.lang.Class, "Control");
a1.extend(cg.prototype, {
initialize: function (T) {
this._map = T;
if (this._container) {
T.container.appendChild(this._container);
return this._container
}
return
},
_i: function (T) {
if (!this._container && this.initialize && G(this.initialize)) {
this._container = this.initialize(T)
}
this._opts = this._opts || {
printable: false
};
this._setStyle();
this._setPosition();
if (this._container) {
this._container._jsobj = this
}
},
_setStyle: function () {
var cC = this._container;
if (cC) {
var T = cC.style;
T.position = "absolute";
T.zIndex = this._cZIndex || "10";
T.MozUserSelect = "none";
T.WebkitTextSizeAdjust = "none";
if (!this._opts.printable) {
a1.dom.addClass(cC, "BMap_noprint")
}
a1.on(cC, "contextmenu", cf)
}
},
remove: function () {
this._map = null;
if (!this._container) {
return
}
this._container.parentNode && this._container.parentNode.removeChild(this._container);
this._container._jsobj = null;
this._container = null
},
_render: function () {
this._container = an(this._map.container, "");
if (this._visible == false) {
a1.dom.hide(this._container)
}
return this._container
},
_setPosition: function () {
this.setAnchor(this._opts.anchor)
},
setAnchor: function (cE) {
if (this.anchorFixed || !aE(cE) || isNaN(cE) || cE < BMAP_ANCHOR_TOP_LEFT || cE > BMAP_ANCHOR_BOTTOM_RIGHT) {
cE = this.defaultAnchor
}
this._opts = this._opts || {
printable: false
};
this._opts.offset = this._opts.offset || this.defaultOffset;
var cD = this._opts.anchor;
this._opts.anchor = cE;
if (!this._container) {
return
}
var cG = this._container;
var T = this._opts.offset.width;
var cF = this._opts.offset.height;
cG.style.left = cG.style.top = cG.style.right = cG.style.bottom = "auto";
switch (cE) {
case BMAP_ANCHOR_TOP_LEFT:
cG.style.top = cF + "px";
cG.style.left = T + "px";
break;
case BMAP_ANCHOR_TOP_RIGHT:
cG.style.top = cF + "px";
cG.style.right = T + "px";
break;
case BMAP_ANCHOR_BOTTOM_LEFT:
cG.style.bottom = cF + "px";
cG.style.left = T + "px";
break;
case BMAP_ANCHOR_BOTTOM_RIGHT:
cG.style.bottom = cF + "px";
cG.style.right = T + "px";
break;
default:
break
}
var cC = ["TL", "TR", "BL", "BR"];
a1.dom.removeClass(this._container, "anchor" + cC[cD]);
a1.dom.addClass(this._container, "anchor" + cC[cE])
},
getAnchor: function () {
return this._opts.anchor
},
setOffset: function (T) {
if (!(T instanceof aB)) {
return
}
this._opts = this._opts || {
printable: false
};
this._opts.offset = new aB(T.width, T.height);
if (!this._container) {
return
}
this.setAnchor(this._opts.anchor)
},
getOffset: function () {
return this._opts.offset
},
getDom: function () {
return this._container
},
show: function () {
if (this._visible == true) {
return
}
this._visible = true;
if (this._container) {
a1.dom.show(this._container)
}
},
hide: function () {
if (this._visible == false) {
return
}
this._visible = false;
if (this._container) {
a1.dom.hide(this._container)
}
},
isPrintable: function () {
return !!this._opts.printable
},
isVisible: function () {
if (!this._container && !this._map) {
return false
}
return !!this._visible
}
});
window.BMAP_ANCHOR_TOP_LEFT = 0;
window.BMAP_ANCHOR_TOP_RIGHT = 1;
window.BMAP_ANCHOR_BOTTOM_LEFT = 2;
window.BMAP_ANCHOR_BOTTOM_RIGHT = 3;
window.BMAP_NAVIGATION_CONTROL_LARGE = 0;
window.BMAP_NAVIGATION_CONTROL_SMALL = 1;
window.BMAP_NAVIGATION_CONTROL_PAN = 2;
window.BMAP_NAVIGATION_CONTROL_ZOOM = 3;
function J(T) {
cg.call(this);
T = T || {};
this._opts = {
printable: false,
showZoomInfo: true
};
a1.object.extend(this._opts, T);
this.defaultAnchor = BMAP_ANCHOR_TOP_LEFT;
this.defaultOffset = new aB(10, 10);
this.setAnchor(T.anchor);
this.setType(T.type);
this._asyncLoadCode()
}
a1.lang.inherits(J, cg, "NavigationControl");
a1.extend(J.prototype, {
initialize: function (T) {
this._map = T;
return this._container
},
setType: function (T) {
if (aE(T) && T >= BMAP_NAVIGATION_CONTROL_LARGE && T <= BMAP_NAVIGATION_CONTROL_ZOOM) {
this._opts.type = T
} else {
this._opts.type = BMAP_NAVIGATION_CONTROL_LARGE
}
},
getType: function () {
return this._opts.type
},
_asyncLoadCode: function () {
var T = this;
cr.load("control",
function () {
T._asyncDraw()
})
}
});
function ai(T) {
cg.call(this);
T = T || {};
this._opts = {
printable: false
};
a1.object.extend(this._opts, T);
this._copyrightCollection = [];
this.defaultAnchor = BMAP_ANCHOR_BOTTOM_LEFT;
this.defaultOffset = new aB(5, 2);
this.setAnchor(T.anchor);
this._canShow = true;
this.blockInfoWindow = false;
this._asyncLoadCode()
}
a1.lang.inherits(ai, cg, "CopyrightControl");
a1.object.extend(ai.prototype, {
initialize: function (T) {
this._map = T;
return this._container
},
addCopyright: function (cD) {
if (!cD || !aE(cD.id) || isNaN(cD.id)) {
return
}
var T = {
bounds: null,
content: ""
};
for (var cC in cD) {
T[cC] = cD[cC]
}
var cE = this.getCopyright(cD.id);
if (cE) {
for (var cF in T) {
cE[cF] = T[cF]
}
} else {
this._copyrightCollection.push(T)
}
},
getCopyright: function (cD) {
for (var cC = 0,
T = this._copyrightCollection.length; cC < T; cC++) {
if (this._copyrightCollection[cC].id == cD) {
return this._copyrightCollection[cC]
}
}
},
getCopyrightCollection: function () {
return this._copyrightCollection
},
removeCopyright: function (cD) {
for (var cC = 0,
T = this._copyrightCollection.length; cC < T; cC++) {
if (this._copyrightCollection[cC].id == cD) {
r = this._copyrightCollection.splice(cC, 1);
cC--;
T = this._copyrightCollection.length
}
}
},
_asyncLoadCode: function () {
var T = this;
cr.load("control",
function () {
T._asyncDraw()
})
}
});
function cB(T) {
cg.call(this);
T = T || {};
this._opts = {
printable: false
};
this._opts = a1.extend(a1.extend(this._opts, {
size: new aB(150, 150),
padding: 8,
isOpen: false,
zoomInterval: 4
}), T);
this.defaultAnchor = BMAP_ANCHOR_BOTTOM_RIGHT;
this.defaultOffset = new aB(0, 0);
this._btnWidth = 15;
this._btnHeight = 15;
this.setAnchor(T.anchor);
this.setSize(this._opts.size);
this._asyncLoadCode()
}
a1.lang.inherits(cB, cg, "OverviewMapControl");
a1.extend(cB.prototype, {
initialize: function (T) {
this._map = T;
return this._container
},
setAnchor: function (T) {
cg.prototype.setAnchor.call(this, T)
},
changeView: function () {
this.changeView._running = true;
this._opts.isOpen = !this._opts.isOpen;
if (!this._container) {
this.changeView._running = false
}
},
setSize: function (T) {
if (!(T instanceof aB)) {
T = new aB(150, 150)
}
T.width = T.width > 0 ? T.width : 150;
T.height = T.height > 0 ? T.height : 150;
this._opts.size = T
},
getSize: function () {
return this._opts.size
},
isOpen: function () {
return this._opts.isOpen
},
_asyncLoadCode: function () {
var T = this;
cr.load("control",
function () {
T._asyncDraw()
})
}
});
function bC(T) {
cg.call(this);
T = T || {};
this._opts = {
printable: false
};
this._opts = a1.object.extend(a1.object.extend(this._opts, {
color: "black",
unit: "metric"
}), T);
this.defaultAnchor = BMAP_ANCHOR_BOTTOM_LEFT;
this.defaultOffset = new aB(81, 18);
this.setAnchor(T.anchor);
this._units = {
metric: {
name: "metric",
conv: 1,
incon: 1000,
u1: "\u7c73",
u2: "\u516c\u91cc"
},
us: {
name: "us",
conv: 3.2808,
incon: 5280,
u1: "\u82f1\u5c3a",
u2: "\u82f1\u91cc"
}
};
if (!this._units[this._opts.unit]) {
this._opts.unit = "metric"
}
this._scaleText = null;
this._numberArray = {};
this._asyncLoadCode()
}
window.BMAP_UNIT_METRIC = "metric";
window.BMAP_UNIT_IMPERIAL = "us";
a1.lang.inherits(bC, cg, "ScaleControl");
a1.object.extend(bC.prototype, {
initialize: function (T) {
this._map = T;
return this._container
},
setColor: function (T) {
this._opts.color = T + ""
},
getColor: function () {
return this._opts.color
},
setUnit: function (T) {
this._opts.unit = this._units[T] && this._units[T].name || this._opts.unit
},
getUnit: function () {
return this._opts.unit
},
_asyncLoadCode: function () {
var T = this;
cr.load("control",
function () {
T._asyncDraw()
})
}
});
window.BMAP_MAPTYPE_CONTROL_HORIZONTAL = 0;
window.BMAP_MAPTYPE_CONTROL_DROPDOWN = 1;
function aF(T) {
cg.call(this);
T = T || {};
this._opts = {
printable: false,
mapTypes: [BMAP_NORMAL_MAP, BMAP_SATELLITE_MAP, BMAP_HYBRID_MAP, BMAP_PERSPECTIVE_MAP],
type: BMAP_MAPTYPE_CONTROL_HORIZONTAL
};
this.defaultAnchor = BMAP_ANCHOR_TOP_RIGHT;
this.defaultOffset = new aB(10, 10);
this.setAnchor(T.anchor);
this._opts = a1.extend(a1.extend(this._opts, {
offset: this.defaultOffset,
enableSwitch: true
}), T);
if (aS(T.mapTypes)) {
this._opts.mapTypes = T.mapTypes.slice(0)
}
this._asyncLoadCode()
}
a1.lang.inherits(aF, cg, "MapTypeControl");
a1.object.extend(aF.prototype, {
initialize: function (T) {
this._map = T;
return this._container
},
_asyncLoadCode: function () {
var T = this;
cr.load("control",
function () {
T._asyncDraw()
})
}
});
function cq(cC) {
a1.lang.Class.call(this);
this._opts = {
container: null,
cursor: "default"
};
this._opts = a1.extend(this._opts, cC);
this._type = "contextmenu";
this._map = null;
this._container;
this._shadow;
this._left = 0;
this._top = 0;
this._items = [];
this._rItems = [];
this._dividers = [];
this.curPixel = null;
this.curPoint = null;
this._isOpen = false;
var T = this;
cr.load("menu",
function () {
T._draw()
})
}
a1.lang.inherits(cq, a1.lang.Class, "ContextMenu");
a1.object.extend(cq.prototype, {
initialize: function (cC, T) {
this._map = cC;
this._overlay = T || null
},
remove: function () {
this._map = this._overlay = null
},
addItem: function (cD) {
if (!cD || cD._type != "menuitem" || cD._text == "" || cD._width <= 0) {
return
}
for (var cC = 0,
T = this._items.length; cC < T; cC++) {
if (this._items[cC] === cD) {
return
}
}
this._items.push(cD);
this._rItems.push(cD)
},
removeItem: function (cD) {
if (!cD || cD._type != "menuitem") {
return
}
for (var cC = 0,
T = this._items.length; cC < T; cC++) {
if (this._items[cC] === cD) {
this._items[cC].remove();
this._items.splice(cC, 1);
T--
}
}
for (var cC = 0,
T = this._rItems.length; cC < T; cC++) {
if (this._rItems[cC] === cD) {
this._rItems[cC].remove();
this._rItems.splice(cC, 1);
T--
}
}
},
addSeparator: function () {
this._items.push({
_type: "divider",
_dIndex: this._dividers.length
});
this._dividers.push({
dom: null
})
},
removeSeparator: function (cC) {
if (!this._dividers[cC]) {
return
}
for (var cD = 0,
T = this._items.length; cD < T; cD++) {
if (this._items[cD] && this._items[cD]._type == "divider" && this._items[cD]._dIndex == cC) {
this._items.splice(cD, 1);
T--
}
if (this._items[cD] && this._items[cD]._type == "divider" && this._items[cD]._dIndex > cC) {
this._items[cD]._dIndex--
}
}
this._dividers.splice(cC, 1)
},
getDom: function () {
return this._container
},
show: function () {
if (this._isOpen == true) {
return
}
this._isOpen = true
},
hide: function () {
if (this._isOpen == false) {
return
}
this._isOpen = false
},
setCursor: function (T) {
if (!T) {
return
}
this._opts.cursor = T
},
getItem: function (T) {
return this._rItems[T]
}
});
function a7(cD, cE, cC) {
if (!cD || !G(cE)) {
return
}
a1.lang.Class.call(this);
this._opts = {
width: 100,
id: ""
};
cC = cC || {};
this._opts.width = (cC.width * 1) ? cC.width : 100;
this._opts.id = cC.id ? cC.id : "";
this._text = cD + "";
this._callback = cE;
this._map = null;
this._type = "menuitem";
this._contextmenu = null;
this._container = null;
this._enabled = true;
var T = this;
cr.load("menu",
function () {
T._draw()
})
}
a1.lang.inherits(a7, a1.lang.Class, "MenuItem");
a1.object.extend(a7.prototype, {
initialize: function (T, cC) {
this._map = T;
this._contextmenu = cC
},
remove: function () {
this._contextmenu = null;
this._map = null
},
setText: function (T) {
if (!T) {
return
}
this._text = T + ""
},
getDom: function () {
return this._container
},
enable: function () {
this._enabled = true
},
disable: function () {
this._enabled = false
}
});
function bF(T, cC) {
if (T && !cC) {
cC = T
}
this._sw = this._ne = null;
this._swLng = this._swLat = null;
this._neLng = this._neLat = null;
if (T) {
this._sw = new b4(T.lng, T.lat);
this._ne = new b4(cC.lng, cC.lat);
this._swLng = T.lng;
this._swLat = T.lat;
this._neLng = cC.lng;
this._neLat = cC.lat
}
}
a1.object.extend(bF.prototype, {
isEmpty: function () {
return !this._sw || !this._ne
},
equals: function (T) {
if (!(T instanceof bF) || this.isEmpty()) {
return false
}
return this.getSouthWest().equals(T.getSouthWest()) && this.getNorthEast().equals(T.getNorthEast())
},
getSouthWest: function () {
return this._sw
},
getNorthEast: function () {
return this._ne
},
containsBounds: function (T) {
if (!(T instanceof bF) || this.isEmpty() || T.isEmpty()) {
return false
}
return (T._swLng > this._swLng && T._neLng < this._neLng && T._swLat > this._swLat && T._neLat < this._neLat)
},
getCenter: function () {
if (this.isEmpty()) {
return null
}
return new b4((this._swLng + this._neLng) / 2, (this._swLat + this._neLat) / 2)
},
intersects: function (cD) {
if (!(cD instanceof bF)) {
return null
}
if (Math.max(cD._swLng, cD._neLng) < Math.min(this._swLng, this._neLng) || Math.min(cD._swLng, cD._neLng) > Math.max(this._swLng, this._neLng) || Math.max(cD._swLat, cD._neLat) < Math.min(this._swLat, this._neLat) || Math.min(cD._swLat, cD._neLat) > Math.max(this._swLat, this._neLat)) {
return null
}
var cF = Math.max(this._swLng, cD._swLng);
var cC = Math.min(this._neLng, cD._neLng);
var cE = Math.max(this._swLat, cD._swLat);
var T = Math.min(this._neLat, cD._neLat);
return new bF(new b4(cF, cE), new b4(cC, T))
},
containsPoint: function (T) {
if (!(T instanceof b4) || this.isEmpty()) {
return false
}
return (T.lng >= this._swLng && T.lng <= this._neLng && T.lat >= this._swLat && T.lat <= this._neLat)
},
extend: function (T) {
if (!(T instanceof b4)) {
return
}
var cC = T.lng,
cD = T.lat;
if (!this._sw) {
this._sw = new b4(0, 0)
}
if (!this._ne) {
this._ne = new b4(0, 0)
}
if (!this._swLng || this._swLng > cC) {
this._sw.lng = this._swLng = cC
}
if (!this._neLng || this._neLng < cC) {
this._ne.lng = this._neLng = cC
}
if (!this._swLat || this._swLat > cD) {
this._sw.lat = this._swLat = cD
}
if (!this._neLat || this._neLat < cD) {
this._ne.lat = this._neLat = cD
}
},
toSpan: function () {
if (this.isEmpty()) {
return new b4(0, 0)
}
return new b4(Math.abs(this._neLng - this._swLng), Math.abs(this._neLat - this._swLat))
}
});
function b4(T, cC) {
if (isNaN(T)) {
T = bN(T);
T = isNaN(T) ? 0 : T
}
if (bV(T)) {
T = parseFloat(T)
}
if (isNaN(cC)) {
cC = bN(cC);
cC = isNaN(cC) ? 0 : cC
}
if (bV(cC)) {
cC = parseFloat(cC)
}
this.lng = T;
this.lat = cC
}
b4.isInRange = function (T) {
return T && T.lng <= 180 && T.lng >= -180 && T.lat <= 74 && T.lat >= -74
};
b4.prototype.equals = function (T) {
return T && this.lat == T.lat && this.lng == T.lng
};
function a6() { }
a6.prototype.lngLatToPoint = function () {
throw "lngLatToPoint\u65b9\u6cd5\u672a\u5b9e\u73b0"
};
a6.prototype.pointToLngLat = function () {
throw "pointToLngLat\u65b9\u6cd5\u672a\u5b9e\u73b0"
};
function bX() { }
a1.extend(bX, {
num: {
bj: {
num: Math.sin(Math.PI / 4),
num2: Math.sin(Math.PI / 6)
},
gz: {
num: Math.sin(Math.PI / 4),
num2: Math.sin(Math.PI / 4)
},
sz: {
num: Math.sin(Math.PI / 4),
num2: Math.sin(Math.PI / 4)
},
sh: {
num: Math.sin(Math.PI / 4),
num2: Math.sin(Math.PI / 4)
}
},
correct_pts: {
bj: [{
j: 116.305687,
w: 39.990912,
utm_x: 12947230.73,
utm_y: 4836903.65,
x: 630412,
y: 547340
},
{
j: 116.381837,
w: 40.000198,
utm_x: 12955707.8,
utm_y: 4838247.62,
x: 667412,
y: 561832
},
{
j: 116.430651,
w: 39.995216,
utm_x: 12961141.81,
utm_y: 4837526.55,
x: 686556,
y: 573372
},
{
j: 116.474111,
w: 39.976323,
utm_x: 12965979.81,
utm_y: 4834792.55,
x: 697152,
y: 586816
},
{
j: 116.280328,
w: 39.953159,
utm_x: 12944407.75,
utm_y: 4831441.53,
x: 603272,
y: 549976
},
{
j: 116.316117,
w: 39.952496,
utm_x: 12948391.8,
utm_y: 4831345.64,
x: 618504,
y: 557872
},
{
j: 116.350477,
w: 39.938107,
utm_x: 12952216.78,
utm_y: 4829264.65,
x: 627044,
y: 568220
},
{
j: 116.432025,
w: 39.947158,
utm_x: 12961294.76,
utm_y: 4830573.59,
x: 666280,
y: 584016
},
{
j: 116.46873,
w: 39.949516,
utm_x: 12965380.79,
utm_y: 4830914.63,
x: 683328,
y: 591444
},
{
j: 116.280077,
w: 39.913823,
utm_x: 12944379.8,
utm_y: 4825753.62,
x: 586150,
y: 558552
},
{
j: 116.308625,
w: 39.91374,
utm_x: 12947557.79,
utm_y: 4825741.62,
x: 598648,
y: 564732
},
{
j: 116.369853,
w: 39.912979,
utm_x: 12954373.73,
utm_y: 4825631.62,
x: 624561,
y: 578039
},
{
j: 116.433552,
w: 39.914694,
utm_x: 12961464.75,
utm_y: 4825879.53,
x: 652972,
y: 591348
},
{
j: 116.457034,
w: 39.914273,
utm_x: 12964078.78,
utm_y: 4825818.67,
x: 663028,
y: 596444
},
{
j: 116.490927,
w: 39.914127,
utm_x: 12967851.77,
utm_y: 4825797.57,
x: 677968,
y: 604188
},
{
j: 116.483839,
w: 39.877198,
utm_x: 12967062.73,
utm_y: 4820460.67,
x: 658596,
y: 610312
},
{
j: 116.405777,
w: 39.864461,
utm_x: 12958372.82,
utm_y: 4818620.62,
x: 619256,
y: 596088
},
{
j: 116.35345,
w: 39.859774,
utm_x: 12952547.74,
utm_y: 4817943.6,
x: 594633,
y: 585851
},
{
j: 116.403818,
w: 39.9141,
utm_x: 12958154.74,
utm_y: 4825793.66,
x: 639699,
y: 585226
},
{
j: 116.318111,
w: 39.891101,
utm_x: 12948613.78,
utm_y: 4822469.56,
x: 592856,
y: 571480
},
{
j: 116.413047,
w: 39.907238,
utm_x: 12959182.12,
utm_y: 4824801.76,
x: 640680,
y: 588704
},
{
j: 116.390843,
w: 39.906113,
utm_x: 12956710.35,
utm_y: 4824639.16,
x: 630620,
y: 584108
},
{
j: 116.446527,
w: 39.899438,
utm_x: 12962909.14,
utm_y: 4823674.4,
x: 651752,
y: 597416
},
{
j: 116.388665,
w: 39.95527,
utm_x: 12956467.9,
utm_y: 4831746.87,
x: 650656,
y: 572800
},
{
j: 116.398343,
w: 39.939704,
utm_x: 12957545.26,
utm_y: 4829495.6,
x: 648036,
y: 578452
},
{
j: 116.355101,
w: 39.973581,
utm_x: 12952731.53,
utm_y: 4834395.82,
x: 643268,
y: 560944
},
{
j: 116.380727,
w: 39.88464,
utm_x: 12955584.23,
utm_y: 4821535.94,
x: 616920,
y: 586496
},
{
j: 116.360843,
w: 39.946452,
utm_x: 12953370.73,
utm_y: 4830471.48,
x: 635293,
y: 568765
},
{
j: 116.340955,
w: 39.973421,
utm_x: 12951156.79,
utm_y: 4834372.67,
x: 638420,
y: 558632
},
{
j: 116.322585,
w: 40.023941,
utm_x: 12949111.83,
utm_y: 4841684.79,
x: 652135,
y: 543802
},
{
j: 116.356486,
w: 39.883341,
utm_x: 12952885.71,
utm_y: 4821348.24,
x: 606050,
y: 581443
},
{
j: 116.339592,
w: 39.992259,
utm_x: 12951005.06,
utm_y: 4837098.59,
x: 645664,
y: 554400
},
{
j: 116.3778,
w: 39.86392,
utm_x: 12955258.4,
utm_y: 4818542.48,
x: 606848,
y: 590328
},
{
j: 116.377354,
w: 39.964124,
utm_x: 12955208.75,
utm_y: 4833027.64,
x: 649911,
y: 568581
},
{
j: 116.361837,
w: 39.963897,
utm_x: 12953481.39,
utm_y: 4832994.8,
x: 643286,
y: 565175
},
{
j: 116.441397,
w: 39.939403,
utm_x: 12962338.06,
utm_y: 4829452.07,
x: 666772,
y: 587728
},
{
j: 116.359176,
w: 40.006631,
utm_x: 12953185.16,
utm_y: 4839178.78,
x: 660440,
y: 555411
}],
sz: [{
j: 113.88099,
w: 22.58884,
utm_x: 12677311.76,
utm_y: 2565810.52,
x: 569078,
y: 532290
},
{
j: 113.902002,
w: 22.566098,
utm_x: 12679650.83,
utm_y: 2563084.58,
x: 568318,
y: 545457
},
{
j: 113.869843,
w: 22.577711,
utm_x: 12676070.87,
utm_y: 2564476.5,
x: 561115,
y: 532494
},
{
j: 113.943387,
w: 22.555192,
utm_x: 12684257.84,
utm_y: 2561777.5,
x: 579437,
y: 558427
},
{
j: 113.899505,
w: 22.577052,
utm_x: 12679372.86,
utm_y: 2564397.51,
x: 571923,
y: 540181
},
{
j: 113.900376,
w: 22.596431,
utm_x: 12679469.82,
utm_y: 2566720.51,
x: 580142,
y: 535463
},
{
j: 113.92101,
w: 22.528931,
utm_x: 12681766.81,
utm_y: 2558630.58,
x: 560296,
y: 559780
},
{
j: 113.919672,
w: 22.517839,
utm_x: 12681617.86,
utm_y: 2557301.57,
x: 555296,
y: 562549
},
{
j: 113.938716,
w: 22.505569,
utm_x: 12683737.86,
utm_y: 2555831.55,
x: 557349,
y: 571072
},
{
j: 113.919203,
w: 22.483494,
utm_x: 12681565.66,
utm_y: 2553187.17,
x: 540853,
y: 572118
},
{
j: 113.942875,
w: 22.492046,
utm_x: 12684200.84,
utm_y: 2554211.57,
x: 553296,
y: 575994
},
{
j: 113.9567,
w: 22.530183,
utm_x: 12685739.85,
utm_y: 2558780.59,
x: 573378,
y: 568442
},
{
j: 113.989102,
w: 22.52697,
utm_x: 12689346.86,
utm_y: 2558395.61,
x: 584796,
y: 578728
},
{
j: 114.015467,
w: 22.533746,
utm_x: 12692281.83,
utm_y: 2559207.53,
x: 597126,
y: 584075
},
{
j: 113.972977,
w: 22.55702,
utm_x: 12687551.81,
utm_y: 2561996.58,
x: 591204,
y: 565924
},
{
j: 113.990368,
w: 22.561133,
utm_x: 12689487.79,
utm_y: 2562489.51,
x: 599240,
y: 569528
},
{
j: 114.143745,
w: 22.580535,
utm_x: 12706561.83,
utm_y: 2564815,
x: 663830,
y: 605622
},
{
j: 114.150374,
w: 22.557704,
utm_x: 12707299.77,
utm_y: 2562078.56,
x: 657016,
y: 613828
},
{
j: 114.106905,
w: 22.541858,
utm_x: 12702460.77,
utm_y: 2560179.58,
x: 634284,
y: 606528
},
{
j: 114.083927,
w: 22.535065,
utm_x: 12699902.85,
utm_y: 2559365.58,
x: 623132,
y: 602096
},
{
j: 114.049584,
w: 22.517997,
utm_x: 12696079.76,
utm_y: 2557320.5,
x: 603390,
y: 597564
},
{
j: 114.056304,
w: 22.542425,
utm_x: 12696827.84,
utm_y: 2560247.52,
x: 615980,
y: 592534
},
{
j: 114.051552,
w: 22.551321,
utm_x: 12696298.84,
utm_y: 2561313.59,
x: 617887,
y: 588719
},
{
j: 114.096377,
w: 22.559064,
utm_x: 12701288.79,
utm_y: 2562241.55,
x: 637568,
y: 598739
},
{
j: 114.135858,
w: 22.575851,
utm_x: 12705683.84,
utm_y: 2564253.55,
x: 659024,
y: 604806
},
{
j: 114.092029,
w: 22.575592,
utm_x: 12700804.77,
utm_y: 2564222.51,
x: 642776,
y: 592932
},
{
j: 114.054795,
w: 22.570617,
utm_x: 12696659.85,
utm_y: 2563626.21,
x: 626988,
y: 584142
},
{
j: 114.03075,
w: 22.553687,
utm_x: 12693983.15,
utm_y: 2561597.14,
x: 611068,
y: 582552
},
{
j: 114.074153,
w: 22.554124,
utm_x: 12698814.8,
utm_y: 2561649.51,
x: 627380,
y: 594008
},
{
j: 113.926721,
w: 22.546028,
utm_x: 12682402.56,
utm_y: 2560679.29,
x: 569340,
y: 556468
},
{
j: 113.938125,
w: 22.538296,
utm_x: 12683672.07,
utm_y: 2559752.74,
x: 570548,
y: 561748
}],
gz: [{
j: 113.335098,
w: 23.147289,
utm_x: 12616542.68,
utm_y: 2632892.7,
x: 1129109,
y: 1073920
},
{
j: 113.320932,
w: 23.146956,
utm_x: 12614965.71,
utm_y: 2632852.62,
x: 1125620,
y: 1071640
},
{
j: 113.321435,
w: 23.140119,
utm_x: 12615021.7,
utm_y: 2632029.65,
x: 1124032,
y: 1072882
},
{
j: 113.321471,
w: 23.119165,
utm_x: 12615025.71,
utm_y: 2629507.68,
x: 1118932,
y: 1076530
},
{
j: 113.340201,
w: 23.118616,
utm_x: 12617110.75,
utm_y: 2629441.61,
x: 1123238,
y: 1079667
},
{
j: 113.358068,
w: 23.116323,
utm_x: 12619099.71,
utm_y: 2629165.66,
x: 1126968,
y: 1083116
},
{
j: 113.357529,
w: 23.131271,
utm_x: 12619039.71,
utm_y: 2630964.68,
x: 1130508,
y: 1080440
},
{
j: 113.365811,
w: 23.150595,
utm_x: 12619961.67,
utm_y: 2633290.66,
x: 1137205,
y: 1078567
},
{
j: 113.294145,
w: 23.118467,
utm_x: 12611983.76,
utm_y: 2629423.68,
x: 1112245,
y: 1072043
},
{
j: 113.28615,
w: 23.121525,
utm_x: 12611093.75,
utm_y: 2629791.7,
x: 1110993,
y: 1070197
},
{
j: 113.307152,
w: 23.055497,
utm_x: 12613431.71,
utm_y: 2621847.21,
x: 1100144,
y: 1085123
},
{
j: 113.333445,
w: 23.052687,
utm_x: 12616358.66,
utm_y: 2621509.2,
x: 1105784,
y: 1089948
},
{
j: 113.347476,
w: 23.048755,
utm_x: 12617920.6,
utm_y: 2621036.24,
x: 1108099,
y: 1093064
},
{
j: 113.385774,
w: 23.036574,
utm_x: 12622183.96,
utm_y: 2619571.12,
x: 1113850,
y: 1101834
},
{
j: 113.364185,
w: 22.89798,
utm_x: 12619780.66,
utm_y: 2602910.64,
x: 1073186,
y: 1123374
},
{
j: 113.404577,
w: 22.906481,
utm_x: 12624277.13,
utm_y: 2603932.06,
x: 1084888,
y: 1128692
},
{
j: 113.430856,
w: 22.913156,
utm_x: 12627202.52,
utm_y: 2604734.12,
x: 1092892,
y: 1131761
},
{
j: 113.384554,
w: 22.933021,
utm_x: 12622048.15,
utm_y: 2607121.32,
x: 1086975,
y: 1120403
},
{
j: 113.263566,
w: 23.146333,
utm_x: 12608579.68,
utm_y: 2632777.63,
x: 1111742,
y: 1062098
},
{
j: 113.239213,
w: 23.152996,
utm_x: 12605868.69,
utm_y: 2633579.69,
x: 1107616,
y: 1056740
},
{
j: 113.253865,
w: 23.131628,
utm_x: 12607499.76,
utm_y: 2631007.65,
x: 1105912,
y: 1062966
},
{
j: 113.240767,
w: 23.088434,
utm_x: 12606041.68,
utm_y: 2625809.7,
x: 1092270,
y: 1068184
},
{
j: 113.279628,
w: 23.088284,
utm_x: 12610367.72,
utm_y: 2625791.65,
x: 1101412,
y: 1074883
},
{
j: 113.462271,
w: 23.107058,
utm_x: 12630699.66,
utm_y: 2628050.7,
x: 1148752,
y: 1101736
},
{
j: 113.401618,
w: 23.052957,
utm_x: 12623947.73,
utm_y: 2621541.68,
x: 1121925,
y: 1101535
},
{
j: 113.422504,
w: 23.05905,
utm_x: 12626272.77,
utm_y: 2622274.61,
x: 1128470,
y: 1104049
},
{
j: 113.362506,
w: 23.107149,
utm_x: 12619593.75,
utm_y: 2628061.65,
x: 1125835,
y: 1085505
},
{
j: 113.419629,
w: 23.143176,
utm_x: 12625952.73,
utm_y: 2632397.61,
x: 1148133,
y: 1089052
},
{
j: 113.23315,
w: 23.062251,
utm_x: 12605193.75,
utm_y: 2622659.67,
x: 1084184,
y: 1071368
},
{
j: 113.314525,
w: 23.101412,
utm_x: 12614252.48,
utm_y: 2627371.29,
x: 1113011,
y: 1078426
},
{
j: 113.307947,
w: 23.131369,
utm_x: 12613520.21,
utm_y: 2630976.47,
x: 1118622,
y: 1072198
}],
sh: [{
j: 121.524411,
w: 31.245875,
utm_x: 13528182.75,
utm_y: 3642354.51,
x: 1086581,
y: 1065728
},
{
j: 121.419229,
w: 31.244887,
utm_x: 13516473.81,
utm_y: 3642226.51,
x: 1032616,
y: 1029148
},
{
j: 121.405637,
w: 31.237871,
utm_x: 13514960.74,
utm_y: 3641317.54,
x: 1022724,
y: 1027244
},
{
j: 121.415348,
w: 31.222879,
utm_x: 13516041.78,
utm_y: 3639375.47,
x: 1018548,
y: 1036980
},
{
j: 121.422561,
w: 31.224261,
utm_x: 13516844.73,
utm_y: 3639554.48,
x: 1022976,
y: 1038908
},
{
j: 121.412581,
w: 31.204148,
utm_x: 13515733.75,
utm_y: 3636949.48,
x: 1006568,
y: 1043696
},
{
j: 121.443025,
w: 31.206202,
utm_x: 13519122.8,
utm_y: 3637215.49,
x: 1022656,
y: 1053704
},
{
j: 121.524061,
w: 31.246917,
utm_x: 13528143.79,
utm_y: 3642489.52,
x: 1082052,
y: 1064124
},
{
j: 121.529343,
w: 31.217769,
utm_x: 13528731.78,
utm_y: 3638713.59,
x: 1072696,
y: 1079064
},
{
j: 121.530268,
w: 31.210341,
utm_x: 13528834.75,
utm_y: 3637751.53,
x: 1068748,
y: 1082416
},
{
j: 121.511601,
w: 31.227303,
utm_x: 13526756.73,
utm_y: 3639948.53,
x: 1069276,
y: 1068716
},
{
j: 121.4966,
w: 31.243614,
utm_x: 13525086.81,
utm_y: 3642061.58,
x: 1071220,
y: 1056805
},
{
j: 121.485021,
w: 31.26138,
utm_x: 13523797.82,
utm_y: 3644363.54,
x: 1075708,
y: 1045540
},
{
j: 121.465114,
w: 31.278803,
utm_x: 13521581.76,
utm_y: 3646621.48,
x: 1073740,
y: 1031268
},
{
j: 121.454784,
w: 31.266566,
utm_x: 13520431.82,
utm_y: 3645035.58,
x: 1063591,
y: 1033191
},
{
j: 121.46851,
w: 31.24951,
utm_x: 13521959.81,
utm_y: 3642825.48,
x: 1060200,
y: 1044520
},
{
j: 121.446384,
w: 31.248422,
utm_x: 13519496.73,
utm_y: 3642684.51,
x: 1048784,
y: 1037750
},
{
j: 121.509499,
w: 31.246469,
utm_x: 13526522.73,
utm_y: 3642431.47,
x: 1079309,
y: 1060105
},
{
j: 121.481643,
w: 31.283943,
utm_x: 13523421.78,
utm_y: 3647287.68,
x: 1087096,
y: 1035304
},
{
j: 121.508054,
w: 31.280609,
utm_x: 13526361.87,
utm_y: 3646855.56,
x: 1098432,
y: 1045648
},
{
j: 121.493854,
w: 31.19121,
utm_x: 13524781.12,
utm_y: 3635274.07,
x: 1039624,
y: 1077288
},
{
j: 121.500079,
w: 31.185541,
utm_x: 13525474.09,
utm_y: 3634540.04,
x: 1039960,
y: 1081640
},
{
j: 121.484482,
w: 31.202846,
utm_x: 13523737.82,
utm_y: 3636780.87,
x: 1041388,
y: 1069232
},
{
j: 121.480877,
w: 31.189587,
utm_x: 13523336.51,
utm_y: 3635063.92,
x: 1032484,
y: 1073640
},
{
j: 121.502652,
w: 31.195209,
utm_x: 13525760.52,
utm_y: 3635791.9,
x: 1046384,
y: 1078728
}]
},
getLnglatIndex: function (cE, cI, cH) {
var cD = 0;
var cC = 0;
var cJ = 10000000,
cG = 1000000000;
for (var cF = 0; cF < this.correct_pts[cE].length; cF++) {
var T = this.getDis(this.correct_pts[cE][cF].x, this.correct_pts[cE][cF].y, cI, cH);
if (T < cG) {
if (T < cJ) {
cG = cJ;
cJ = T;
cC = cD;
cD = cF
} else {
sedMinDis = T;
cC = cF
}
}
}
return {
lt: cD,
rb: cC
}
},
getOMapIndex_mm: function (cE, cJ, cI) {
var cD = 0;
var cC = 0;
var cH = 1294723000,
cG = 1294723000;
for (var cF = 0; cF < this.correct_pts[cE].length; cF++) {
var T = this.getDis(this.correct_pts[cE][cF].utm_x, this.correct_pts[cE][cF].utm_y, cJ, cI);
if (T < cG) {
if (T < cH) {
cG = cH;
cH = T;
cC = cD;
cD = cF
} else {
sedMinDis = T;
cC = cF
}
}
}
return {
lt: cD,
rb: cC
}
},
getDis: function (T, cE, cC, cD) {
return Math.abs(T - cC) + Math.abs(cE - cD)
},
toMap: function (cE, T, cF) {
var cC = (T - cF) * this.num[cE].num;
var cD = (T + cF) * this.num[cE].num * this.num[cE].num2;
return {
x: cC,
y: cD
}
},
fromMap: function (cE, T, cF) {
cF = cF / this.num[cE].num2;
var cC = (T + cF) / (this.num[cE].num * 2);
var cD = (cF - T) / (this.num[cE].num * 2);
return {
x: cC,
y: cD
}
},
getDgPix_mm: function (cF, cK, cG) {
var cJ = this.fromMap(cF, this.correct_pts[cF][cK].x, this.correct_pts[cF][cK].y);
var cH = this.fromMap(cF, this.correct_pts[cF][cG].x, this.correct_pts[cF][cG].y);
var cP = cJ.x,
cC = cJ.y;
var cO = cH.x,
T = cH.y;
var cM = this.correct_pts[cF][cK].utm_x,
cE = this.correct_pts[cF][cK].utm_y;
var cI = this.correct_pts[cF][cG].utm_x,
cD = this.correct_pts[cF][cG].utm_y;
var cN = Math.abs((cI - cM) * 100000 / (cO - cP));
var cL = Math.abs((cD - cE) * 100000 / (T - cC));
return {
j: cN,
w: cL,
x: 100000 / cN,
y: 100000 / cL
}
},
getPx_mm: function (cS, cO, cN, cF, cE) {
var cD = this.correct_pts[cS][cF];
var T = this.correct_pts[cS][cF];
var cL = this.getDgPix_mm(cS, cF, cE);
var cH = this.fromMap(cS, cD.x, cD.y);
var cG = T.utm_x,
cU = T.utm_y;
var cT = cO,
cM = cN;
var cR = cH.x;
var cC = cH.y;
var cJ = cT - cG,
cQ = cM - cU;
var cK = cJ * cL.x + cR;
var cI = -cQ * cL.y + cC;
var cP = this.toMap(cS, cK, cI);
return cP
},
getJw_mm: function (cQ, cL, cK, cG, cF) {
var cJ = this.correct_pts[cQ][cG];
var cC = this.correct_pts[cQ][cG];
var cM = this.getDgPix_mm(cQ, cG, cF);
var cO = this.fromMap(cQ, cL, cK);
var cE = this.fromMap(cQ, cJ.x, cJ.y);
var cH = cC.utm_x,
cR = cC.utm_y;
var cP = cE.x;
var cD = cE.y;
var cS = cO.x - cP,
cN = cD - cO.y;
var cI = cS / cM.x + cH;
var T = cN / cM.y + cR;
return {
lng: cI,
lat: T
}
},
getOMap_pts: function (cC, T) {
return this.getOMap_index(cC, T.lng, T.lat, T.lt, T.rb)
},
getMapJw_pts: function (cC, T) {
return this.getMapJw_index(cC, T.lng, 9998336 - T.lat, T.lt, T.rb)
},
getOMap_index: function (cH, cG, cF, T, cE) {
if (!T || !cE) {
var cC = this.getOMapIndex_mm(cH, cG, cF)
} else {
var cC = {
lt: T,
rb: cE
}
}
var cD = this.getPx_mm(cH, cG, cF, cC.lt, cC.rb);
return {
x: Math.floor(cD.x),
y: 9998336 - Math.floor(cD.y),
lt: cC.lt,
rb: cC.rb
}
},
getMapJw_index: function (cG, cD, cH, cC, cF) {
if (!cC || !cF) {
var cE = this.getLnglatIndex(cG, cD, cH)
} else {
var cE = {
lt: cC,
rb: cF
}
}
var T = this.getJw_mm(cG, cD, cH, cE.lt, cE.rb);
return {
lng: T.lng,
lat: T.lat,
lt: cE.lt,
rb: cE.rb
}
}
});
function a3() { }
a3.prototype = new a6();
a1.extend(a3, {
EARTHRADIUS: 6370996.81,
MCBAND: [12890594.86, 8362377.87, 5591021, 3481989.83, 1678043.12, 0],
LLBAND: [75, 60, 45, 30, 15, 0],
MC2LL: [[1.410526172116255e-8, 0.00000898305509648872, -1.9939833816331, 200.9824383106796, -187.2403703815547, 91.6087516669843, -23.38765649603339, 2.57121317296198, -0.03801003308653, 17337981.2], [-7.435856389565537e-9, 0.000008983055097726239, -0.78625201886289, 96.32687599759846, -1.85204757529826, -59.36935905485877, 47.40033549296737, -16.50741931063887, 2.28786674699375, 10260144.86], [-3.030883460898826e-8, 0.00000898305509983578, 0.30071316287616, 59.74293618442277, 7.357984074871, -25.38371002664745, 13.45380521110908, -3.29883767235584, 0.32710905363475, 6856817.37], [-1.981981304930552e-8, 0.000008983055099779535, 0.03278182852591, 40.31678527705744, 0.65659298677277, -4.44255534477492, 0.85341911805263, 0.12923347998204, -0.04625736007561, 4482777.06], [3.09191371068437e-9, 0.000008983055096812155, 0.00006995724062, 23.10934304144901, -0.00023663490511, -0.6321817810242, -0.00663494467273, 0.03430082397953, -0.00466043876332, 2555164.4], [2.890871144776878e-9, 0.000008983055095805407, -3.068298e-8, 7.47137025468032, -0.00000353937994, -0.02145144861037, -0.00001234426596, 0.00010322952773, -0.00000323890364, 826088.5]],
LL2MC: [[-0.0015702102444, 111320.7020616939, 1704480524535203, -10338987376042340, 26112667856603880, -35149669176653700, 26595700718403920, -10725012454188240, 1800819912950474, 82.5], [0.0008277824516172526, 111320.7020463578, 647795574.6671607, -4082003173.641316, 10774905663.51142, -15171875531.51559, 12053065338.62167, -5124939663.577472, 913311935.9512032, 67.5], [0.00337398766765, 111320.7020202162, 4481351.045890365, -23393751.19931662, 79682215.47186455, -115964993.2797253, 97236711.15602145, -43661946.33752821, 8477230.501135234, 52.5], [0.00220636496208, 111320.7020209128, 51751.86112841131, 3796837.749470245, 992013.7397791013, -1221952.21711287, 1340652.697009075, -620943.6990984312, 144416.9293806241, 37.5], [-0.0003441963504368392, 111320.7020576856, 278.2353980772752, 2485758.690035394, 6070.750963243378, 54821.18345352118, 9540.606633304236, -2710.55326746645, 1405.483844121726, 22.5], [-0.0003218135878613132, 111320.7020701615, 0.00369383431289, 823725.6402795718, 0.46104986909093, 2351.343141331292, 1.58060784298199, 8.77738589078284, 0.37238884252424, 7.45]],
getDistanceByMC: function (cG, cE) {
if (!cG || !cE) {
return 0
}
var cC, cF, T, cD;
cG = this.convertMC2LL(cG);
if (!cG) {
return 0
}
cC = this.toRadians(cG.lng);
cF = this.toRadians(cG.lat);
cE = this.convertMC2LL(cE);
if (!cE) {
return 0
}
T = this.toRadians(cE.lng);
cD = this.toRadians(cE.lat);
return this.getDistance(cC, T, cF, cD)
},
getDistanceByLL: function (cG, cE) {
if (!cG || !cE) {
return 0
}
cG.lng = this.getLoop(cG.lng, -180, 180);
cG.lat = this.getRange(cG.lat, -74, 74);
cE.lng = this.getLoop(cE.lng, -180, 180);
cE.lat = this.getRange(cE.lat, -74, 74);
var cC, T, cF, cD;
cC = this.toRadians(cG.lng);
cF = this.toRadians(cG.lat);
T = this.toRadians(cE.lng);
cD = this.toRadians(cE.lat);
return this.getDistance(cC, T, cF, cD)
},
convertMC2LL: function (cC) {
var cD, cF;
cD = new b4(Math.abs(cC.lng), Math.abs(cC.lat));
for (var cE = 0; cE < this.MCBAND.length; cE++) {
if (cD.lat >= this.MCBAND[cE]) {
cF = this.MC2LL[cE];
break
}
}
var T = this.convertor(cC, cF);
var cC = new b4(T.lng.toFixed(6), T.lat.toFixed(6));
return cC
},
convertLL2MC: function (T) {
var cC, cE;
T.lng = this.getLoop(T.lng, -180, 180);
T.lat = this.getRange(T.lat, -74, 74);
cC = new b4(T.lng, T.lat);
for (var cD = 0; cD < this.LLBAND.length; cD++) {
if (cC.lat >= this.LLBAND[cD]) {
cE = this.LL2MC[cD];
break
}
}
if (!cE) {
for (var cD = this.LLBAND.length - 1; cD >= 0; cD--) {
if (cC.lat <= -this.LLBAND[cD]) {
cE = this.LL2MC[cD];
break
}
}
}
var cF = this.convertor(T, cE);
var T = new b4(cF.lng.toFixed(2), cF.lat.toFixed(2));
return T
},
convertor: function (cD, cE) {
if (!cD || !cE) {
return
}
var T = cE[0] + cE[1] * Math.abs(cD.lng);
var cC = Math.abs(cD.lat) / cE[9];
var cF = cE[2] + cE[3] * cC + cE[4] * cC * cC + cE[5] * cC * cC * cC + cE[6] * cC * cC * cC * cC + cE[7] * cC * cC * cC * cC * cC + cE[8] * cC * cC * cC * cC * cC * cC;
T *= (cD.lng < 0 ? -1 : 1);
cF *= (cD.lat < 0 ? -1 : 1);
return new b4(T, cF)
},
getDistance: function (cC, T, cE, cD) {
return this.EARTHRADIUS * Math.acos((Math.sin(cE) * Math.sin(cD) + Math.cos(cE) * Math.cos(cD) * Math.cos(T - cC)))
},
toRadians: function (T) {
return Math.PI * T / 180
},
toDegrees: function (T) {
return (180 * T) / Math.PI
},
getRange: function (cD, cC, T) {
if (cC != null) {
cD = Math.max(cD, cC)
}
if (T != null) {
cD = Math.min(cD, T)
}
return cD
},
getLoop: function (cD, cC, T) {
while (cD > T) {
cD -= T - cC
}
while (cD < cC) {
cD += T - cC
}
return cD
}
});
a1.extend(a3.prototype, {
lngLatToMercator: function (T) {
return a3.convertLL2MC(T)
},
lngLatToPoint: function (T) {
var cC = a3.convertLL2MC(T);
return new bn(cC.lng, cC.lat)
},
mercatorToLngLat: function (T) {
return a3.convertMC2LL(T)
},
pointToLngLat: function (T) {
var cC = new b4(T.x, T.y);
return a3.convertMC2LL(cC)
},
pointToPixel: function (cC, cG, cF, cE, cH) {
if (!cC) {
return
}
cC = this.lngLatToMercator(cC, cH);
var cD = this.getZoomUnits(cG);
var T = Math.round((cC.lng - cF.lng) / cD + cE.width / 2);
var cI = Math.round((cF.lat - cC.lat) / cD + cE.height / 2);
return new bn(T, cI)
},
pixelToPoint: function (T, cJ, cF, cD, cC) {
if (!T) {
return
}
var cI = this.getZoomUnits(cJ);
var cG = cF.lng + cI * (T.x - cD.width / 2);
var cE = cF.lat - cI * (T.y - cD.height / 2);
var cH = new b4(cG, cE);
return this.mercatorToLngLat(cH, cC)
},
getZoomUnits: function (T) {
return Math.pow(2, (18 - T))
}
});
function cv() { }
cv.prototype = new a3();
a1.extend(cv.prototype, {
lngLatToMercator: function (cC, T) {
return this._convert2DTo3D(T, a3.convertLL2MC(cC))
},
mercatorToLngLat: function (cC, T) {
return a3.convertMC2LL(this._convert3DTo2D(T, cC))
},
lngLatToPoint: function (cD, T) {
var cC = this._convert2DTo3D(T, a3.convertLL2MC(cD));
return new bn(cC.lng, cC.lat)
},
pointToLngLat: function (cC, T) {
var cD = new b4(cC.x, cC.y);
return a3.convertMC2LL(this._convert3DTo2D(T, cD))
},
_convert2DTo3D: function (cD, T) {
var cC = bX.getOMap_pts(cD || "bj", T);
return new b4(cC.x, cC.y)
},
_convert3DTo2D: function (cD, T) {
var cC = bX.getMapJw_pts(cD || "bj", T);
return new b4(cC.lng, cC.lat)
},
getZoomUnits: function (T) {
return Math.pow(2, (20 - T))
}
});
function bz() {
this._type = "overlay"
}
a1.lang.inherits(bz, a1.lang.Class, "Overlay");
bz.getZIndex = function (T) {
T = T * 1;
if (!T) {
return 0
}
return (T * -100000) << 1
};
a1.extend(bz.prototype, {
_i: function (T) {
if (!this.domElement && G(this.initialize)) {
this.domElement = this.initialize(T);
if (this.domElement) {
this.domElement.style.WebkitUserSelect = "none"
}
}
this.draw()
},
initialize: function (T) {
throw "initialize\u65b9\u6cd5\u672a\u5b9e\u73b0"
},
draw: function () {
throw "draw\u65b9\u6cd5\u672a\u5b9e\u73b0"
},
remove: function () {
if (this.domElement && this.domElement.parentNode) {
this.domElement.parentNode.removeChild(this.domElement)
}
this.domElement = null;
this.dispatchEvent(new a9("onremove"))
},
hide: function () {
if (this.domElement) {
a1.dom.hide(this.domElement)
}
},
show: function () {
if (this.domElement) {
a1.dom.show(this.domElement)
}
},
isVisible: function () {
if (!this.domElement) {
return false
}
if (this.domElement.style.display == "none" || this.domElement.style.visibility == "hidden") {
return false
}
return true
}
});
BMap.register(function (cD) {
var T = cD.temp;
T.overlayDiv = cD.overlayDiv = cC(cD.platform, 200);
cD._panes.floatPane = cC(T.overlayDiv, 800);
cD._panes.markerMouseTarget = cC(T.overlayDiv, 700);
cD._panes.floatShadow = cC(T.overlayDiv, 600);
cD._panes.labelPane = cC(T.overlayDiv, 500);
cD._panes.markerPane = cC(T.overlayDiv, 400);
cD._panes.markerShadow = cC(T.overlayDiv, 300);
cD._panes.mapPane = cC(T.overlayDiv, 200);
function cC(cE, cH) {
var cG = W("div"),
cF = cG.style;
cF.position = "absolute";
cF.top = cF.left = cF.width = cF.height = "0";
cF.zIndex = cH;
cE.appendChild(cG);
return cG
}
});
function U() {
a1.lang.Class.call(this);
bz.call(this);
this.map = null;
this._visible = true;
this.infoWindow = null;
this._dblclickTime = 0
}
a1.lang.inherits(U, bz, "OverlayInternal");
a1.extend(U.prototype, {
initialize: function (T) {
this.map = T;
a1.lang.Class.call(this, this.guid);
return null
},
getMap: function () {
return this.map
},
draw: function () { },
remove: function () {
this.map = null;
a1.lang.decontrol(this.guid);
bz.prototype.remove.call(this)
},
hide: function () {
if (this._visible == false) {
return
}
this._visible = false
},
show: function () {
if (this._visible == true) {
return
}
this._visible = true
},
isVisible: function () {
if (!this.domElement) {
return false
}
return !!this._visible
},
getContainer: function () {
return this.domElement
},
setConfig: function (cC) {
cC = cC || {};
for (var T in cC) {
this._config[T] = cC[T]
}
},
setZIndex: function (T) {
this.zIndex = T
},
enableMassClear: function () {
this._config.enableMassClear = true
},
disableMassClear: function () {
this._config.enableMassClear = false
},
addContextMenu: function (T) {
this._menu = T
},
removeContextMenu: function (T) {
this._menu = null
}
});
function cj() {
this.map = null;
this._overlays = {};
this._customOverlays = []
}
BMap.register(function (cC) {
var T = new cj();
T.map = cC;
cC._overlays = T._overlays;
cC._customOverlays = T._customOverlays;
cC.addEventListener("load",
function (cD) {
T.draw(cD)
});
cC.addEventListener("moveend",
function (cD) {
T.draw(cD)
});
if (a1.browser.ie && a1.browser.ie < 8 || document.compatMode == "BackCompat") {
cC.addEventListener("zoomend",
function (cD) {
setTimeout(function () {
T.draw(cD)
},
20)
})
} else {
cC.addEventListener("zoomend",
function (cD) {
T.draw(cD)
})
}
cC.addEventListener("maptypechange",
function (cD) {
T.draw(cD)
});
cC.addEventListener("addoverlay",
function (cH) {
var cE = cH.target;
if (cE instanceof U) {
if (!T._overlays[cE.guid]) {
T._overlays[cE.guid] = cE
}
} else {
var cG = false;
for (var cF = 0,
cD = T._customOverlays.length; cF < cD; cF++) {
if (T._customOverlays[cF] === cE) {
cG = true;
break
}
}
if (!cG) {
T._customOverlays.push(cE)
}
}
});
cC.addEventListener("removeoverlay",
function (cG) {
var cE = cG.target;
if (cE instanceof U) {
delete T._overlays[cE.guid]
} else {
for (var cF = 0,
cD = T._customOverlays.length; cF < cD; cF++) {
if (T._customOverlays[cF] === cE) {
T._customOverlays.splice(cF, 1);
break
}
}
}
});
cC.addEventListener("clearoverlays",
function (cG) {
this.closeInfoWindow();
for (var cF in T._overlays) {
if (T._overlays[cF]._config.enableMassClear) {
T._overlays[cF].remove();
delete T._overlays[cF]
}
}
for (var cE = 0,
cD = T._customOverlays.length; cE < cD; cE++) {
if (T._customOverlays[cE].enableMassClear != false) {
T._customOverlays[cE].remove();
T._customOverlays[cE] = null;
T._customOverlays.splice(cE, 1);
cE--;
cD--
}
}
});
cC.addEventListener("infowindowopen",
function (cE) {
var cD = this.infoWindow;
if (cD) {
a1.dom.hide(cD.popDom);
a1.dom.hide(cD.shadowDom)
}
});
cC.addEventListener("movestart",
function () {
if (this.getInfoWindow()) {
this.getInfoWindow()._setOverflow()
}
});
cC.addEventListener("moveend",
function () {
if (this.getInfoWindow()) {
this.getInfoWindow()._resetOverflow()
}
})
});
cj.prototype.draw = function (cD) {
for (var cC in this._overlays) {
this._overlays[cC].draw()
}
a1.array.each(this._customOverlays,
function (cE) {
cE.draw()
});
if (this.map.temp.infoWin) {
this.map.temp.infoWin.setPosition()
}
if (BMap.DrawerSelector) {
var T = BMap.DrawerSelector.getDrawer(this.map);
T.setPalette()
}
};
function cw(T) {
U.call(this);
this._config = {
strokeColor: "#3a6bdb",
strokeWeight: 5,
strokeOpacity: 0.65,
strokeStyle: "solid",
enableMassClear: true,
getParseTolerance: null,
getParseCacheIndex: null,
enableEditing: false,
mouseOverTolerance: 15,
use3DCoords: false,
clickable: true
};
T = T || {};
this.setConfig(T);
if (this._config.strokeWeight <= 0) {
this._config.strokeWeight = 5
}
if (this._config.strokeOpacity < 0 || this._config.strokeOpacity > 1) {
this._config.strokeOpacity = 0.65
}
if (this._config.fillOpacity < 0 || this._config.fillOpacity > 1) {
this._config.fillOpacity = 0.65
}
if (this._config.strokeStyle != "solid" && this._config.strokeStyle != "dashed") {
this._config.strokeStyle = "solid"
}
if (b8(T.enableClicking)) {
this._config.clickable = T.enableClicking
}
this.domElement = null;
this._bounds = new BMap.Bounds(0, 0, 0, 0);
this._parseCache = [];
this.vertexMarkers = [];
this._temp = {}
}
a1.lang.inherits(cw, U, "Graph");
cw.getGraphPoints = function (cC) {
var T = [];
if (!cC) {
return T
}
if (bV(cC)) {
var cD = cC.split(";");
a1.array.each(cD,
function (cF) {
var cE = cF.split(",");
T.push(new b4(cE[0], cE[1]))
})
}
if (cC.constructor == Array && cC.length > 0) {
T = cC
}
return T
};
cw.parseTolerance = [0.09, 0.005, 0.0001, 0.00001];
a1.extend(cw.prototype, {
initialize: function (T) {
this.map = T;
return null
},
draw: function () {
return;
if (!this.domElement) {
return
}
if (this._drawer) {
this._drawer.setPath(this.domElement, this._getDisplayPixels(this.points))
}
},
setPath: function (T) {
this._parseCache.length = 0;
this.points = cw.getGraphPoints(T).slice(0);
this._calcBounds()
},
_calcBounds: function () {
if (!this.points) {
return
}
var T = this;
T._bounds = new bF();
a1.array.each(this.points,
function (cC) {
T._bounds.extend(cC)
})
},
getPath: function () {
return this.points
},
setPositionAt: function (cC, T) {
if (!T || !this.points[cC]) {
return
}
this._parseCache.length = 0;
this.points[cC] = new b4(T.lng, T.lat);
this._calcBounds()
},
setStrokeColor: function (T) {
this._config.strokeColor = T
},
getStrokeColor: function () {
return this._config.strokeColor
},
setStrokeWeight: function (T) {
if (T > 0) {
this._config.strokeWeight = T
}
},
getStrokeWeight: function () {
return this._config.strokeWeight
},
setStrokeOpacity: function (T) {
if (!T || T > 1 || T < 0) {
return
}
this._config.strokeOpacity = T
},
getStrokeOpacity: function () {
return this._config.strokeOpacity
},
setFillOpacity: function (T) {
if (T > 1 || T < 0) {
return
}
this._config.fillOpacity = T
},
getFillOpacity: function () {
return this._config.fillOpacity
},
setStrokeStyle: function (T) {
if (T != "solid" && T != "dashed") {
return
}
this._config.strokeStyle = T
},
getStrokeStyle: function () {
return this._config.strokeStyle
},
setFillColor: function (T) {
this._config.fillColor = T || ""
},
getFillColor: function () {
return this._config.fillColor
},
getBounds: function () {
return this._bounds
},
remove: function () {
if (this.map) {
this.map.removeEventListener("onmousemove", this._graphMouseEvent)
}
U.prototype.remove.call(this);
this._parseCache.length = 0
},
enableEditing: function () {
this._config.enableEditing = true
},
disableEditing: function () {
this._config.enableEditing = false
}
});
function l(T) {
U.call(this);
this.map = null;
this.domElement = null;
this._config = {
width: 0,
height: 0,
offset: new aB(0, 0),
opacity: 1,
background: "transparent",
lineStroke: 1,
lineColor: "#000",
lineStyle: "solid",
point: null
};
this.setConfig(T);
this.point = this._config.point
}
a1.lang.inherits(l, U, "Division");
a1.extend(l.prototype, {
_addDom: function () {
var T = this._config;
var cD = this.content;
var cC = ['');
cC.push(cD);
cC.push("
");
this.domElement = an(this.map.getPanes().markerMouseTarget, cC.join(""))
},
initialize: function (T) {
this.map = T;
this._addDom();
if (this.domElement) {
a1.on(this.domElement, "mousedown",
function (cC) {
aJ(cC)
})
}
return this.domElement
},
draw: function () {
var T = this.map.pointToOverlayPixel(this._config.point);
this._config.offset = new aB(-Math.round(this._config.width / 2) - Math.round(this._config.lineStroke), -Math.round(this._config.height / 2) - Math.round(this._config.lineStroke));
this.domElement.style.left = T.x + this._config.offset.width + "px";
this.domElement.style.top = T.y + this._config.offset.height + "px"
},
getPosition: function () {
return this._config.point
},
_getPixel: function (T) {
return this.map.pointToPixel(this.getPosition())
},
setPosition: function (T) {
this._config.point = T;
this.draw()
},
setDimension: function (T, cC) {
this._config.width = Math.round(T);
this._config.height = Math.round(cC);
if (this.domElement) {
this.domElement.style.width = this._config.width + "px";
this.domElement.style.height = this._config.height + "px";
this.draw()
}
}
});
function K(cC, cD, cE) {
if (!cC || !cD) {
return
}
this.imageUrl = cC;
this.size = cD;
var T = new aB(Math.floor(cD.width / 2), Math.floor(cD.height / 2));
var cF = {
anchor: T,
imageOffset: new aB(0, 0)
};
cE = cE || {};
a1.extend(cF, cE);
this.anchor = cF.anchor;
this.imageOffset = cF.imageOffset;
this.infoWindowAnchor = cE.infoWindowAnchor || this.anchor;
this.printImageUrl = cE.printImageUrl || ""
}
var bw = K.prototype;
bw.setImageUrl = function (T) {
if (!T) {
return
}
this.imageUrl = T
};
bw.setPrintImageUrl = function (T) {
if (!T) {
return
}
this.printImageUrl = T
};
bw.setSize = function (T) {
if (!T) {
return
}
this.size = new aB(T.width, T.height)
};
bw.setAnchor = function (T) {
if (!T) {
return
}
this.anchor = new aB(T.width, T.height)
};
bw.setImageOffset = function (T) {
if (!T) {
return
}
this.imageOffset = new aB(T.width, T.height)
};
bw.setInfoWindowAnchor = function (T) {
if (!T) {
return
}
this.infoWindowAnchor = new aB(T.width, T.height)
};
bw.toString = function () {
return "Icon"
};
function bH(cD, cC) {
a1.lang.Class.call(this);
this.content = cD;
this.map = null;
this._config = {
width: 0,
height: 0,
maxWidth: 600,
offset: new aB(0, 0),
title: "",
maxContent: "",
enableMaximize: false,
enableAutoPan: true,
enableCloseOnClick: true,
margin: [10, 10, 40, 10],
collisions: [[10, 10], [10, 10], [10, 10], [10, 10]],
ifMaxScene: false,
onClosing: function () {
return true
}
};
a1.extend(this._config, cC || {});
if (this._config.width != 0) {
if (this._config.width < 220) {
this._config.width = 220
}
if (this._config.width > 730) {
this._config.width = 730
}
}
if (this._config.height != 0) {
if (this._config.height < 60) {
this._config.height = 60
}
if (this._config.height > 650) {
this._config.height = 650
}
}
if (this._config.maxWidth != 0) {
if (this._config.maxWidth < 220) {
this._config.maxWidth = 220
}
if (this._config.maxWidth > 730) {
this._config.maxWidth = 730
}
}
this.isWinMax = false;
this.IMG_PATH = b3.imgPath;
this.overlay = null;
var T = this;
cr.load("infowindow",
function () {
T._draw()
})
}
a1.lang.inherits(bH, a1.lang.Class, "InfoWindow");
a1.extend(bH.prototype, {
setWidth: function (T) {
if (!T && T != 0 || isNaN(T) || T < 0) {
return
}
if (T != 0) {
if (T < 220) {
T = 220
}
if (T > 730) {
T = 730
}
}
this._config.width = T
},
setHeight: function (T) {
if (!T && T != 0 || isNaN(T) || T < 0) {
return
}
if (T != 0) {
if (T < 60) {
T = 60
}
if (T > 650) {
T = 650
}
}
this._config.height = T
},
setMaxWidth: function (T) {
if (!T && T != 0 || isNaN(T) || T < 0) {
return
}
if (T != 0) {
if (T < 220) {
T = 220
}
if (T > 730) {
T = 730
}
}
this._config.maxWidth = T
},
setTitle: function (T) {
this._config.title = T
},
getTitle: function () {
return this._config.title
},
setContent: function (T) {
this.content = T
},
getContent: function () {
return this.content
},
setMaxContent: function (T) {
this._config.maxContent = T + ""
},
redraw: function () { },
enableAutoPan: function () {
this._config.enableAutoPan = true
},
disableAutoPan: function () {
this._config.enableAutoPan = false
},
enableCloseOnClick: function () {
this._config.enableCloseOnClick = true
},
disableCloseOnClick: function () {
this._config.enableCloseOnClick = false
},
enableMaximize: function () {
this._config.enableMaximize = true
},
disableMaximize: function () {
this._config.enableMaximize = false
},
show: function () {
this._visible = true
},
hide: function () {
this._visible = false
},
close: function () {
this.hide()
},
maximize: function () {
this.isWinMax = true
},
restore: function () {
this.isWinMax = false
},
isVisible: function () {
return this.isOpen()
},
isOpen: function () {
return false
},
getPosition: function () {
if (this.overlay && this.overlay.getPosition) {
return this.overlay.getPosition()
}
},
getOffset: function () {
return this._config.offset
}
});
bs.prototype.openInfoWindow = function (cE, T) {
if (!(cE instanceof bH) || !(T instanceof b4)) {
return
}
var cC = this.temp;
if (!cC.marker) {
var cD = new K(b3.imgPath + "blank.gif", {
width: 1,
height: 1
});
cC.marker = new Z(T, {
icon: cD,
width: 1,
height: 1,
offset: new aB(0, 0),
infoWindowOffset: new aB(0, 0),
clickable: false
});
cC.marker._fromMap = 1
} else {
cC.marker.setPosition(T)
}
this.addOverlay(cC.marker);
cC.marker.openInfoWindow(cE)
};
bs.prototype.closeInfoWindow = function () {
var T = this.temp.infoWin || this.temp._infoWin;
if (T && T.overlay) {
T.overlay.closeInfoWindow()
}
};
U.prototype.openInfoWindow = function (T) {
if (this.map) {
this.map.closeInfoWindow();
T._visible = true;
this.map.temp._infoWin = T;
T.overlay = this;
a1.lang.Class.call(T, T.guid)
}
};
U.prototype.closeInfoWindow = function () {
if (this.map && this.map.temp._infoWin) {
this.map.temp._infoWin._visible = false;
a1.lang.decontrol(this.map.temp._infoWin.guid);
this.map.temp._infoWin = null
}
};
function ac(cD, cC) {
U.call(this);
this.content = cD;
this.map = null;
this.domElement = null;
this._config = {
width: 0,
offset: new aB(0, 0),
styles: {
backgroundColor: "#fff",
border: "1px solid #f00",
padding: "1px",
whiteSpace: "nowrap",
font: "12px " + b3.fontFamily,
zIndex: "80",
MozUserSelect: "none"
},
position: null,
enableMassClear: true,
clickable: true
};
cC = cC || {};
this.setConfig(cC);
if (this._config.width < 0) {
this._config.width = 0
}
if (b8(cC.enableClicking)) {
this._config.clickable = cC.enableClicking
}
this.point = this._config.position;
var T = this;
cr.load("marker",
function () {
T._draw()
})
}
a1.lang.inherits(ac, U, "Label");
a1.extend(ac.prototype, {
getPosition: function () {
if (this._marker) {
return this._marker.getPosition()
}
return this.point
},
setPosition: function (T) {
if (T instanceof b4 && !this.getMarker()) {
this.point = this._config.position = new b4(T.lng, T.lat)
}
},
setContent: function (T) {
this.content = T
},
setOpacity: function (T) {
if (T >= 0 && T <= 1) {
this._config.opacity = T
}
},
setOffset: function (T) {
if (!(T instanceof aB)) {
return
}
this._config.offset = new aB(T.width, T.height)
},
getOffset: function () {
return this._config.offset
},
setStyle: function (T) {
T = T || {};
this._config.styles = a1.extend(this._config.styles, T)
},
setStyles: function (T) {
return this.setStyle(T)
},
setTitle: function (T) {
this._config.title = T || ""
},
getTitle: function () {
return this._config.title
},
setMarker: function (T) {
this._marker = T;
if (T) {
this.point = this._config.position = T.getPosition()
} else {
this.point = this._config.position = null
}
},
getMarker: function () {
return this._marker || null
}
});
window.BMAP_ANIMATION_DROP = 1;
window.BMAP_ANIMATION_BOUNCE = 2;
var ao = new K(b3.imgPath + "marker_red_sprite.png", new aB(19, 25), {
anchor: new aB(10, 25),
infoWindowAnchor: new aB(10, 0)
});
var am = new K(b3.imgPath + "marker_red_sprite.png", new aB(20, 11), {
anchor: new aB(6, 11),
imageOffset: new aB(-19, -13)
});
function Z(T, cD) {
U.call(this);
cD = cD || {};
this.point = T;
this.map = null;
this._animation = null;
this._config = {
offset: new aB(0, 0),
icon: ao,
shadow: am,
title: "",
label: null,
baseZIndex: 0,
clickable: true,
zIndexFixed: false,
isTop: false,
enableMassClear: true,
enableDragging: false,
raiseOnDrag: false,
restrictDraggingArea: false,
draggingCursor: b3.draggingCursor
};
this.setConfig(cD);
if (cD.icon && !cD.shadow) {
this._config.shadow = null
}
if (b8(cD.enableClicking)) {
this._config.clickable = cD.enableClicking
}
var cC = this;
cr.load("marker",
function () {
cC._draw()
})
}
Z.TOP_ZINDEX = bz.getZIndex(-90) + 1000000;
Z.DRAG_ZINDEX = Z.TOP_ZINDEX + 1000000;
a1.lang.inherits(Z, U, "Marker");
a1.extend(Z.prototype, {
setIcon: function (T) {
if (T instanceof K) {
this._config.icon = T
}
},
getIcon: function () {
return this._config.icon
},
setShadow: function (T) {
if (T instanceof K) {
this._config.shadow = T
}
},
getShadow: function () {
return this._config.shadow
},
setLabel: function (T) {
this._config.label = T || null
},
getLabel: function () {
return this._config.label
},
enableDragging: function () {
this._config.enableDragging = true
},
disableDragging: function () {
this._config.enableDragging = false
},
getPosition: function () {
return this.point
},
setPosition: function (T) {
if (T instanceof b4) {
this.point = new b4(T.lng, T.lat)
}
},
setTop: function (cC, T) {
this._config.isTop = !!cC;
if (cC) {
this._addi = T || 0
}
},
setTitle: function (T) {
this._config.title = T + ""
},
getTitle: function () {
return this._config.title
},
setOffset: function (T) {
if (T instanceof aB) {
this._config.offset = T
}
},
getOffset: function () {
return this._config.offset
},
setAnimation: function (T) {
this._animation = T
}
});
function ce(T, cD) {
cw.call(this, cD);
cD = cD || {};
this._config.fillOpacity = cD.fillOpacity ? cD.fillOpacity : 0.65;
if (cD.fillColor == "") {
this._config.fillColor = ""
} else {
this._config.fillColor = cD.fillColor ? cD.fillColor : "#fff"
}
this.setPath(T);
var cC = this;
cr.load("poly",
function () {
cC._draw()
})
}
a1.lang.inherits(ce, cw, "Polygon");
a1.extend(ce.prototype, {
setPath: function (cC, T) {
this._userPoints = cw.getGraphPoints(cC).slice(0);
var cD = cw.getGraphPoints(cC).slice(0);
if (cD.length > 1 && !cD[0].equals(cD[cD.length - 1])) {
cD.push(new b4(cD[0].lng, cD[0].lat))
}
cw.prototype.setPath.call(this, cD, T)
},
setPositionAt: function (cC, T) {
if (!this._userPoints[cC]) {
return
}
this._userPoints[cC] = new b4(T.lng, T.lat);
this.points[cC] = new b4(T.lng, T.lat);
if (cC == 0 && !this.points[0].equals(this.points[this.points.length - 1])) {
this.points[this.points.length - 1] = new b4(T.lng, T.lat)
}
this._calcBounds()
},
getPath: function () {
var T = this._userPoints;
if (T.length == 0) {
T = this.points
}
return T
}
});
function f(T, cD) {
cw.call(this, cD);
this.setPath(T);
var cC = this;
cr.load("poly",
function () {
cC._draw()
})
}
a1.lang.inherits(f, cw, "Polyline");
function a(cC, T, cD) {
this.point = cC;
this.radius = Math.abs(T);
ce.call(this, [], cD)
}
a.parseTolerance = [0.01, 0.0001, 0.00001, 0.000004];
a1.lang.inherits(a, ce, "Circle");
a1.extend(a.prototype, {
initialize: function (T) {
this.map = T;
this.points = this._getPerimeterPoints(this.point, this.radius);
this._calcBounds();
return null
},
getCenter: function () {
return this.point
},
setCenter: function (T, cC) {
if (!T) {
return
}
this.point = T
},
getRadius: function () {
return this.radius
},
setRadius: function (T) {
this.radius = Math.abs(T)
},
_getPerimeterPoints: function (T, cJ) {
if (!T || !cJ || !this.map) {
return []
}
var cC = this.map;
var cG = T.lng,
cE = T.lat;
var cQ = [];
var cL = cJ / 6378800,
cI = (Math.PI / 180) * cE,
cO = (Math.PI / 180) * cG;
for (var cH = 0; cH < 360; cH += 9) {
var cF = (Math.PI / 180) * cH,
cM = Math.asin(Math.sin(cI) * Math.cos(cL) + Math.cos(cI) * Math.sin(cL) * Math.cos(cF)),
cK = Math.atan2(Math.sin(cF) * Math.sin(cL) * Math.cos(cI), Math.cos(cL) - Math.sin(cI) * Math.sin(cM)),
cN = ((cO - cK + Math.PI) % (2 * Math.PI)) - Math.PI,
cP = new b4(cN * (180 / Math.PI), cM * (180 / Math.PI));
cQ.push(cP)
}
var cD = cQ[0];
cQ.push(new b4(cD.lng, cD.lat));
return cQ
}
});
function bJ(T) {
this.map = T;
this.mapTypeLayers = [];
this.tileLayers = [];
this.bufferNumber = 300;
this.realBufferNumber = 0;
this.mapTiles = {};
this.bufferTiles = {};
this.numLoading = 0;
this._mapTypeLayerContainer = this._createDiv(1);
this._normalLayerContainer = this._createDiv(2);
T.platform.appendChild(this._mapTypeLayerContainer);
T.platform.appendChild(this._normalLayerContainer)
}
BMap.register(function (cC) {
var T = new bJ(cC);
T.initialize()
});
a1.extend(bJ.prototype, {
initialize: function () {
var T = this,
cC = T.map;
cC.addEventListener("loadcode",
function () {
T.loadTiles()
});
cC.addEventListener("addtilelayer",
function (cD) {
T.addTileLayer(cD)
});
cC.addEventListener("removetilelayer",
function (cD) {
T.removeTileLayer(cD)
});
cC.addEventListener("setmaptype",
function (cD) {
T.setMapType(cD)
});
cC.addEventListener("zoomstartcode",
function (cD) {
T._zoom(cD)
})
},
loadTiles: function () {
var T = this;
if (a1.browser.ie) {
try {
document.execCommand("BackgroundImageCache", false, true)
} catch (cC) { }
}
if (!this.loaded) {
T.initMapTypeTiles()
}
T.moveGridTiles();
if (!this.loaded) {
this.loaded = true;
cr.load("tile",
function () {
T._asyncLoadTiles()
})
}
},
initMapTypeTiles: function () {
var cC = this.map.getMapType();
var cD = cC.getTileLayers();
for (var T = 0; T < cD.length; T++) {
var cE = new n();
a1.extend(cE, cD[T]);
this.mapTypeLayers.push(cE);
cE.initialize(this.map, this._mapTypeLayerContainer)
}
},
_createDiv: function (cC) {
var T = W("div");
T.style.position = "absolute";
T.style.left = T.style.top = "0";
T.style.zIndex = cC;
return T
},
showTile: function (cG, cF, cJ) {
var cM = this;
cM.centerPos = cF;
var cI = this.map.getMapType();
var cD = cM.getTileName(cG, cJ);
var cQ = cI.getTileSize();
var cE = (cG[0] * cQ) + cF[0];
var cP = 0;
if (cI === BMAP_PERSPECTIVE_MAP && cM.map.getZoom() == 15) {
cP = 0.5
}
var cC = (cP - 1 - cG[1]) * cQ + cF[1];
var cK = [cE, cC];
var cL = this.mapTiles[cD];
if (cL && cL.img) {
bB(cL.img, cK);
if (cL.loaded) {
this._checkTilesLoaded()
} else {
cL._addLoadCbk(function () {
cM._checkTilesLoaded()
})
}
return
}
cL = this.bufferTiles[cD];
if (cL && cL.img) {
cJ.tilesDiv.insertBefore(cL.img, cJ.tilesDiv.lastChild);
this.mapTiles[cD] = cL;
bB(cL.img, cK);
if (cL.loaded) {
this._checkTilesLoaded()
} else {
cL._addLoadCbk(function () {
cM._checkTilesLoaded()
})
}
return
}
var cO = 256 * Math.pow(2, (cI.getMaxZoom() - cG[2]));
var cN = new b4(cG[0] * cO, cG[1] * cO);
var cH = new bn(cG[0], cG[1]);
var T = cJ.getTilesUrl(cH, cG[2]);
cL = new bM(this, T, cK, cG, cJ);
cL._addLoadCbk(function () {
cM._checkTilesLoaded()
});
cL._load();
this.mapTiles[cD] = cL
},
_checkTilesLoaded: function () {
this.numLoading--;
var T = this;
if (this.numLoading == 0) {
if (this._checkLoadedTimer) {
clearTimeout(this._checkLoadedTimer);
this._checkLoadedTimer = null
}
this._checkLoadedTimer = setTimeout(function () {
if (T.numLoading == 0) {
T.map.dispatchEvent(new a9("ontilesloaded"))
}
T._checkLoadedTimer = null
},
80)
}
},
getTileName: function (T, cC) {
if (this.map.getMapType() === BMAP_PERSPECTIVE_MAP) {
return "TILE-" + cC.guid + "-" + this.map.cityCode + "-" + T[0] + "-" + T[1] + "-" + T[2]
} else {
return "TILE-" + cC.guid + "-" + T[0] + "-" + T[1] + "-" + T[2]
}
},
hideTile: function (cC) {
var T = cC.img;
if (T) {
H(T);
if (w(T)) {
T.parentNode.removeChild(T)
}
}
delete this.mapTiles[cC.name];
if (!cC.loaded) {
H(T);
T = null;
cC._callCbks();
cC.img = null;
cC.mgr = null
}
},
moveGridTiles: function () {
var c1 = this.mapTypeLayers;
var cN = c1.concat(this.tileLayers);
var cT = cN.length;
for (var cV = 0; cV < cT; cV++) {
var cG = cN[cV];
if (cG.baseLayer) {
this.tilesDiv = cG.tilesDiv
}
var c7 = this.map;
var c3 = c7.getMapType();
var c8 = c3.getProjection();
var cU = c7.zoomLevel;
var cX = c7.mercatorCenter;
this.mapCenterPoint = cX;
var cL = c3.getZoomUnits(cU);
var cO = c3.getZoomFactor(cU);
var cM = Math.ceil(cX.lng / cO);
var cH = Math.ceil(cX.lat / cO);
var cS = c3.getTileSize();
var cF = [cM, cH, (cX.lng - cM * cO) / cO * cS, (cX.lat - cH * cO) / cO * cS];
var c2 = cF[0] - Math.ceil((c7.width / 2 - cF[2]) / cS);
var cE = cF[1] - Math.ceil((c7.height / 2 - cF[3]) / cS);
var cY = cF[0] + Math.ceil((c7.width / 2 + cF[2]) / cS);
var cQ = 0;
if (c3 === BMAP_PERSPECTIVE_MAP && c7.getZoom() == 15) {
cQ = 1
}
var cP = cF[1] + Math.ceil((c7.height / 2 + cF[3]) / cS) + cQ;
this.areaCenter = new b4(cX.lng, cX.lat);
var cD = this.mapTiles;
var cK = -this.areaCenter.lng / cL;
var cJ = this.areaCenter.lat / cL;
var c5 = [Math.round(cK), Math.round(cJ)];
var cC = c7.getZoom();
for (var c6 in cD) {
var c9 = cD[c6];
var c4 = c9.info;
if (c4[2] != cC || (c4[2] == cC && (c2 > c4[0] || cY <= c4[0] || cE > c4[1] || cP <= c4[1]))) {
this.hideTile(c9)
}
}
var cI = -c7.offsetX + c7.width / 2;
var cR = -c7.offsetY + c7.height / 2;
cG.tilesDiv.style.left = Math.round(cK + cI) - c5[0] + "px";
cG.tilesDiv.style.top = Math.round(cJ + cR) - c5[1] + "px";
var T = [];
for (var c0 = c2; c0 < cY; c0++) {
for (var cZ = cE; cZ < cP; cZ++) {
T.push([c0, cZ])
}
}
T.sort((function (da) {
return function (db, dc) {
return ((0.4 * Math.abs(db[0] - da[0]) + 0.6 * Math.abs(db[1] - da[1])) - (0.4 * Math.abs(dc[0] - da[0]) + 0.6 * Math.abs(dc[1] - da[1])))
}
})([cF[0] - 1, cF[1] - 1]));
this.numLoading += T.length;
for (var c0 = 0,
cW = T.length; c0 < cW; c0++) {
this.showTile([T[c0][0], T[c0][1], cC], c5, cG)
}
}
return
},
addTileLayer: function (cE) {
var cD = this;
var T = cE.target;
for (var cC = 0; cC < cD.tileLayers.length; cC++) {
if (cD.tileLayers[cC] == T) {
return
}
}
T.initialize(this.map, this._normalLayerContainer);
cD.tileLayers.push(T)
},
removeTileLayer: function (cF) {
var cE = this;
var cC = cF.target;
for (var cD = 0,
T = cE.tileLayers.length; cD < T; cD++) {
if (cC == cE.tileLayers[cD]) {
cE.tileLayers.splice(cD, 1)
}
}
cC.remove()
},
setMapType: function () {
var cD = this;
var cE = this.mapTypeLayers;
for (var cC = 0,
T = cE.length; cC < T; cC++) {
cE[cC].remove()
}
delete this.tilesDiv;
this.mapTypeLayers = [];
this.bufferTiles = this.mapTiles = {};
this.initMapTypeTiles();
this.moveGridTiles()
},
_zoom: function () {
var T = this;
if (T.zoomsDiv) {
a1.dom.hide(T.zoomsDiv)
}
setTimeout(function () {
T.moveGridTiles();
T.map.dispatchEvent(new a9("onzoomend"))
},
10)
}
});
function bM(cI, T, cF, cC, cE) {
this.mgr = cI;
this.position = cF;
this._cbks = [];
this.name = cI.getTileName(cC, cE);
this.info = cC;
this._transparentPng = cE.isTransparentPng();
var cJ = W("img");
cn(cJ);
cJ.galleryImg = false;
var cH = cJ.style;
var cD = cI.map.getMapType();
cH.position = "absolute";
cH.border = "none";
cH.width = cD.getTileSize() + "px";
cH.height = cD.getTileSize() + "px";
cH.left = cF[0] + "px";
cH.top = cF[1] + "px";
this.img = cJ;
this.src = T;
if (C) {
this.img.style.opacity = 0
}
var cG = this;
this.img.onload = function (cP) {
cG.loaded = true;
if (!cG.mgr) {
return
}
var cL = cG.mgr;
var cK = cL.bufferTiles;
if (!cK[cG.name]) {
cL.realBufferNumber++;
cK[cG.name] = cG
}
if (cG.img && !w(cG.img)) {
if (cE.tilesDiv) {
cE.tilesDiv.appendChild(cG.img);
if (a1.browser.ie <= 6 && a1.browser.ie > 0 && cG._transparentPng) {
cG.img.style.cssText += ';filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + cG.src + '",sizingMethod=scale);'
}
}
}
var cN = cL.realBufferNumber - cL.bufferNumber;
for (var cO in cK) {
if (cN <= 0) {
break
}
if (!cL.mapTiles[cO]) {
cK[cO].mgr = null;
var cM = cK[cO].img;
if (cM && cM.parentNode) {
cM.parentNode.removeChild(cM);
H(cM)
}
cM = null;
cK[cO].img = null;
delete cK[cO];
cL.realBufferNumber--;
cN--
}
}
if (C) {
new g({
fps: 20,
duration: 200,
render: function (cQ) {
if (cG.img && cG.img.style) {
cG.img.style.opacity = cQ * 1
}
},
finish: function () {
if (cG.img && cG.img.style) {
delete cG.img.style.opacity
}
}
})
}
cG._callCbks()
};
this.img.onerror = function () {
cG._callCbks();
if (!cG.mgr) {
return
}
var cK = cG.mgr;
var cL = cK.map.getMapType();
if (cL.getErrorImageUrl()) {
cG.error = true;
cG.img.src = cL.getErrorImageUrl();
if (cG.img && !w(cG.img)) {
cE.tilesDiv.appendChild(cG.img)
}
}
};
cJ = null
}
bM.prototype._addLoadCbk = function (T) {
this._cbks.push(T)
};
bM.prototype._load = function () {
if (a1.browser.ie > 0 && a1.browser.ie <= 6 && this._transparentPng) {
this.img.src = b3.imgPath + "blank.gif"
} else {
this.img.src = this.src
}
};
bM.prototype._callCbks = function () {
var cC = this;
for (var T = 0; T < cC._cbks.length; T++) {
cC._cbks[T]()
}
cC._cbks.length = 0
};
function H(cE) {
if (!cE) {
return
}
cE.onload = cE.onerror = null;
var cC = cE.attributes,
cD, T, cF;
if (cC) {
T = cC.length;
for (cD = 0; cD < T; cD += 1) {
cF = cC[cD].name;
if (G(cE[cF])) {
cE[cF] = null
}
}
}
cC = cE.children;
if (cC) {
T = cC.length;
for (cD = 0; cD < T; cD += 1) {
H(cE.children[cD])
}
}
}
var C = (!a1.browser.ie || a1.browser.ie > 8);
function n(T) {
this.opts = T || {};
this.copyright = this.opts.copyright || null;
this.transparentPng = this.opts.transparentPng || false;
this.baseLayer = this.opts.baseLayer || false;
this.zIndex = this.opts.zIndex || 0;
this.guid = n._guid++
}
n._guid = 0;
a1.lang.inherits(n, a1.lang.Class, "TileLayer");
a1.extend(n.prototype, {
initialize: function (cD, T) {
if (this.baseLayer) {
this.zIndex = -100
}
this.map = cD;
if (!this.tilesDiv) {
var cE = W("div");
var cC = cE.style;
cC.position = "absolute";
cC.zIndex = this.zIndex;
cC.left = Math.ceil(-cD.offsetX + cD.width / 2) + "px";
cC.top = Math.ceil(-cD.offsetY + cD.height / 2) + "px";
T.appendChild(cE);
this.tilesDiv = cE
}
},
remove: function () {
if (this.tilesDiv && this.tilesDiv.parentNode) {
this.tilesDiv.innerHTML = "";
this.tilesDiv.parentNode.removeChild(this.tilesDiv)
}
delete this.tilesDiv
},
isTransparentPng: function () {
return this.transparentPng
},
getTilesUrl: function (cC, cD) {
var T = "";
if (this.opts.tileUrlTemplate) {
T = this.opts.tileUrlTemplate.replace(/\{X\}/, cC.x);
T = T.replace(/\{Y\}/, cC.y);
T = T.replace(/\{Z\}/, cD)
}
return T
},
getCopyright: function () {
return this.copyright
},
getMapType: function () {
return this.mapType || BMAP_NORMAL_MAP
}
});
function ax(T) {
n.call(this, T);
this._opts = {};
T = T || {};
this._opts = a1.object.extend(this._opts, T);
if (this._opts.predictDate) {
if (this._opts.predictDate.weekday < 1 || this._opts.predictDate.weekday > 7) {
this._opts.predictDate = 1
}
if (this._opts.predictDate.hour < 0 || this._opts.predictDate.hour > 23) {
this._opts.predictDate.hour = 0
}
}
this._tileUrl = "http://its.map.baidu.com:8002/traffic/"
}
ax.prototype = new n();
ax.prototype.initialize = function (cC, T) {
n.prototype.initialize.call(this, cC, T);
this._map = cC
};
ax.prototype.isTransparentPng = function () {
return true
};
ax.prototype.getTilesUrl = function (cH, cC) {
var cI = "";
if (this._opts.predictDate) {
cI = "HistoryService?day=" + (this._opts.predictDate.weekday - 1) + "&hour=" + this._opts.predictDate.hour + "&t=" + new Date().getTime() + "&"
} else {
cI = "TrafficTileService?time=" + new Date().getTime() + "&"
}
var cD = this._map,
cJ = cH.x,
cE = cH.y,
cG = Math.floor(cJ / 200),
cF = Math.floor(cE / 200),
T = this._tileUrl + cI + "level=" + cC + "&x=" + cJ + "&y=" + cE;
return T.replace(/-(\d+)/gi, "M$1")
};
function cl(T, cC, cD) {
this._name = T;
this._layers = cC instanceof n ? [cC] : cC.slice(0);
this._opts = {
tips: "",
labelText: "",
minZoom: 1,
maxZoom: 19,
tileSize: 256,
textColor: "black",
errorImageUrl: "",
projection: new a3()
};
if (this._layers.length == 1) {
this._layers[0].baseLayer = true
}
a1.extend(this._opts, cD || {})
}
a1.extend(cl.prototype, {
getName: function () {
return this._name
},
getTips: function () {
return this._opts.tips
},
getLabelText: function () {
return this._opts.labelText
},
getTileLayer: function () {
return this._layers[0]
},
getTileLayers: function () {
return this._layers
},
getTileSize: function () {
return this._opts.tileSize
},
getMinZoom: function () {
return this._opts.minZoom
},
getMaxZoom: function () {
return this._opts.maxZoom
},
getTextColor: function () {
return this._opts.textColor
},
getProjection: function () {
return this._opts.projection
},
getErrorImageUrl: function () {
return this._opts.errorImageUrl
},
getZoomUnits: function (T) {
return Math.pow(2, (18 - T))
},
getZoomFactor: function (T) {
return this.getZoomUnits(T) * 256
}
});
var bY = ["http://shangetu0.map.bdimg.com/it/", "http://shangetu1.map.bdimg.com/it/", "http://shangetu2.map.bdimg.com/it/", "http://shangetu3.map.bdimg.com/it/", "http://shangetu4.map.bdimg.com/it/"];
var i = ["http://online0.map.bdimg.com/tile/", "http://online1.map.bdimg.com/tile/", "http://online2.map.bdimg.com/tile/", "http://online3.map.bdimg.com/tile/", "http://online4.map.bdimg.com/tile/"];
var aN = new n();
aN.getTilesUrl = function (cD, cG) {
var cH = cD.x;
var cE = cD.y;
var T = "20150518";
var cF = "pl";
if (this.map.highResolutionEnabled()) {
cF = "ph"
}
var cC = i[Math.abs(cH + cE) % i.length] + "?qt=tile&x=" + (cH + "").replace(/-/gi, "M") + "&y=" + (cE + "").replace(/-/gi, "M") + "&z=" + cG + "&styles=" + cF + (a1.browser.ie == 6 ? "&color_dep=32&colors=50" : "") + "&udt=" + T;
return cC.replace(/-(\d+)/gi, "M$1")
};
window.BMAP_NORMAL_MAP = new cl("\u5730\u56fe", aN, {
tips: "\u663e\u793a\u666e\u901a\u5730\u56fe"
});
var bl = new n();
bl.tileUrls = ["http://d0.map.baidu.com/resource/mappic/", "http://d1.map.baidu.com/resource/mappic/", "http://d2.map.baidu.com/resource/mappic/", "http://d3.map.baidu.com/resource/mappic/"];
bl.getTilesUrl = function (T, cD) {
var cF = T.x;
var cC = T.y;
var cE = Math.pow(2, (20 - cD)) * 256;
cC = Math.round((9998336 - cE * (cC)) / cE) - 1;
url = this.tileUrls[Math.abs(cF + cC) % this.tileUrls.length] + this.map.currentCity + "/" + this.map.cityCode + "/3/lv" + (21 - cD) + "/" + cF + "," + cC + ".jpg";
return url
};
window.BMAP_PERSPECTIVE_MAP = new cl("\u4e09\u7ef4", bl, {
tips: "\u663e\u793a\u4e09\u7ef4\u5730\u56fe",
minZoom: 15,
maxZoom: 20,
textColor: "white",
projection: new cv()
});
BMAP_PERSPECTIVE_MAP.getZoomUnits = function (T) {
return Math.pow(2, (20 - T))
};
BMAP_PERSPECTIVE_MAP.getCityName = function (T) {
if (!T) {
return ""
}
var cC = b3.cityNames;
for (var cD in cC) {
if (T.search(cD) > -1) {
return cC[cD]
}
}
return ""
};
BMAP_PERSPECTIVE_MAP.getCityCode = function (T) {
return ({
bj: 2,
gz: 1,
sz: 14,
sh: 4
})[T]
};
var bI = new n({
baseLayer: true
});
bI.getTilesUrl = function (cC, cE) {
var cF = cC.x;
var cD = cC.y;
var T = bY[Math.abs(cF + cD) % bY.length] + "u=x=" + cF + ";y=" + cD + ";z=" + cE + ";v=009;type=sate&fm=46&udt=20141015";
return T.replace(/-(\d+)/gi, "M$1")
};
window.BMAP_SATELLITE_MAP = new cl("\u536b\u661f", bI, {
tips: "\u663e\u793a\u536b\u661f\u5f71\u50cf",
minZoom: 1,
maxZoom: 19,
textColor: "white"
});
var m = new n({
transparentPng: true
});
m.getTilesUrl = function (cE, cG) {
var cH = cE.x;
var cF = cE.y;
var T = "20141015";
var cC = "015";
var cD = i[Math.abs(cH + cF) % i.length] + "?qt=tile&x=" + (cH + "").replace(/-/gi, "M") + "&y=" + (cF + "").replace(/-/gi, "M") + "&z=" + cG + "&styles=sl" + (a1.browser.ie == 6 ? "&color_dep=32&colors=50" : "") + "&v=" + cC + "&udt=" + T;
return cD.replace(/-(\d+)/gi, "M$1")
};
window.BMAP_HYBRID_MAP = new cl("\u6df7\u5408", [bI, m], {
tips: "\u663e\u793a\u5e26\u6709\u8857\u9053\u7684\u536b\u661f\u5f71\u50cf",
labelText: "\u8def\u7f51",
minZoom: 1,
maxZoom: 19,
textColor: "white"
});
window.BMAP_POI_TYPE_NORMAL = 0;
window.BMAP_POI_TYPE_BUSSTOP = 1;
window.BMAP_POI_TYPE_BUSLINE = 2;
window.BMAP_POI_TYPE_SUBSTOP = 3;
window.BMAP_POI_TYPE_SUBLINE = 4;
var F = 0;
var ba = 1;
var aj = {};
function u(cC, T) {
a1.lang.Class.call(this);
this._loc = {};
this.setLocation(cC);
this._opts = {
renderOptions: {
panel: null,
map: null,
autoViewport: true
},
onSearchComplete: function () { },
onMarkersSet: function () { },
onInfoHtmlSet: function () { },
onResultsHtmlSet: function () { },
onGetBusListComplete: function () { },
onGetBusLineComplete: function () { },
onBusListHtmlSet: function () { },
onBusLineHtmlSet: function () { },
onPolylinesSet: function () { },
reqFrom: ""
};
a1.extend(this._opts, T);
if (typeof T != "undefined" && typeof T.renderOptions != "undefined" && typeof T.renderOptions.autoViewport != "undefined") {
this._opts.renderOptions.autoViewport = T.renderOptions.autoViewport
} else {
this._opts.renderOptions.autoViewport = true
}
this._opts.renderOptions.panel = a1.G(this._opts.renderOptions.panel)
}
a1.inherits(u, a1.lang.Class);
a1.extend(u.prototype, {
getResults: function () {
if (!this._isMultiKey) {
return this._results
} else {
return this._arrResults
}
},
enableAutoViewport: function () {
this._opts.renderOptions.autoViewport = true
},
disableAutoViewport: function () {
this._opts.renderOptions.autoViewport = false
},
setLocation: function (T) {
if (!T) {
return
}
this._loc.src = T
},
setSearchCompleteCallback: function (T) {
this._opts.onSearchComplete = T ||
function () { }
},
setMarkersSetCallback: function (T) {
this._opts.onMarkersSet = T ||
function () { }
},
setPolylinesSetCallback: function (T) {
this._opts.onPolylinesSet = T ||
function () { }
},
setInfoHtmlSetCallback: function (T) {
this._opts.onInfoHtmlSet = T ||
function () { }
},
setResultsHtmlSetCallback: function (T) {
this._opts.onResultsHtmlSet = T ||
function () { }
},
getStatus: function () {
return this._status
}
});
var a4 = {
REQ_BASE_URL: "http://api.map.baidu.com/",
request: function (cC, cI, T, cH) {
var cD = (Math.random() * 100000).toFixed(0);
BMap._rd["_cbk" + cD] = function (cJ) {
T = T || {};
cC && cC(cJ, T);
delete BMap._rd["_cbk" + cD]
};
cH = cH || "";
var cF;
if (T && T.useEncodeURI) {
cF = M(cI, encodeURI)
} else {
cF = M(cI, encodeURIComponent)
}
var cG = this,
cE = cG.REQ_BASE_URL + cH + "?" + cF + "&ie=utf-8&oue=1&res=api&callback=BMap._rd._cbk" + cD;
co.request(cE)
}
};
BMap._rd = {};
var P = {};
P.removeHtml = function (T) {
return T.replace(/<\/?b>/g, "")
};
P.parseGeoExtReg1 = function (T) {
return T.replace(/([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*),([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*)(,)/g, "$1,$2;")
};
P.parseGeoExtReg2 = function (cC, T) {
var cD = new RegExp("(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);)(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);){" + T + "}", "ig");
return cC.replace(cD, "$1")
};
window.BMAP_STATUS_SUCCESS = 0;
window.BMAP_STATUS_CITY_LIST = 1;
window.BMAP_STATUS_UNKNOWN_LOCATION = 2;
window.BMAP_STATUS_UNKNOWN_ROUTE = 3;
window.BMAP_STATUS_INVALID_KEY = 4;
window.BMAP_STATUS_INVALID_REQUEST = 5;
window.BMAP_STATUS_PERMISSION_DENIED = 6;
window.BMAP_STATUS_SERVICE_UNAVAILABLE = 7;
window.BMAP_STATUS_TIMEOUT = 8;
window.BMAP_ROUTE_TYPE_WALKING = 2;
window.BMAP_ROUTE_TYPE_DRIVING = 3;
var cm = "cur";
var c = "cen";
var ca = "s";
var N = "con";
var ah = "bd";
var b2 = "nb";
var D = "bt";
var bE = "nav";
var bo = "walk";
var bt = "gc";
var d = "rgc";
var Q = "dec";
var aK = "bse";
var e = "nse";
var E = "bl";
var a8 = "bsl";
var aA = "bda";
var ae = "sa";
var aU = "nba";
var b9 = "drag";
var p = 2;
var aY = 4;
var bm = 7;
var S = 11;
var aH = 12;
var bb = 14;
var aV = 15;
var cp = 18;
var s = 20;
var O = 21;
var al = 26;
var bx = 28;
var x = 31;
var bj = 35;
var bv = 44;
var ar = 45;
var aa = 46;
var bK = 47;
var aT = -1;
var X = 0;
var ch = 1;
var aZ = 2;
var z = 3;
var cz = "http://map.baidu.com/";
var v = "http://api.map.baidu.com/";
BMap.I = window.Instance = a1.lang.instance;
var aX = function (cD, cC) {
u.call(this, cD, cC);
cC = cC || {};
cC.renderOptions = cC.renderOptions || {};
this.setPageCapacity(cC.pageCapacity);
if (typeof cC.renderOptions.selectFirstResult != "undefined" && !cC.renderOptions.selectFirstResult) {
this.disableFirstResultSelection()
} else {
this.enableFirstResultSelection()
}
this._overlays = [];
this._arrPois = [];
this._curIndex = -1;
this._queryList = [];
var T = this;
cr.load("local",
function () {
T._check()
})
};
a1.inherits(aX, u, "LocalSearch");
aX.DEFAULT_PAGE_CAPACITY = 10;
aX.MIN_PAGE_CAPACITY = 1;
aX.MAX_PAGE_CAPACITY = 100;
aX.DEFAULT_RADIUS = 2000;
aX.MAX_RADIUS = 100000;
a1.extend(aX.prototype, {
search: function (T) {
this._queryList.push({
method: "search",
arguments: [T]
})
},
searchInBounds: function (T, cC) {
this._queryList.push({
method: "searchInBounds",
arguments: [T, cC]
})
},
searchNearby: function (cD, cC, T) {
this._queryList.push({
method: "searchNearby",
arguments: [cD, cC, T]
})
},
clearResults: function () {
delete this._json;
delete this._status;
delete this._results;
delete this._ud;
this._curIndex = -1;
this._setStatus();
if (this._opts.renderOptions.panel) {
this._opts.renderOptions.panel.innerHTML = ""
}
},
gotoPage: function () { },
enableFirstResultSelection: function () {
this._opts.renderOptions.selectFirstResult = true
},
disableFirstResultSelection: function () {
this._opts.renderOptions.selectFirstResult = false
},
setPageCapacity: function (T) {
if (typeof T == "number" && !isNaN(T)) {
this._opts.pageCapacity = T < 1 ? aX.DEFAULT_PAGE_CAPACITY : (T > aX.MAX_PAGE_CAPACITY ? aX.DEFAULT_PAGE_CAPACITY : T)
} else {
this._opts.pageCapacity = aX.DEFAULT_PAGE_CAPACITY
}
},
getPageCapacity: function () {
return this._opts.pageCapacity
},
toString: function () {
return "LocalSearch"
}
});
var bW = function (cC, T) {
u.call(this, cC, T)
};
a1.inherits(bW, u, "BaseRoute");
a1.extend(bW.prototype, {
clearResults: function () { }
});
window.BMAP_TRANSIT_POLICY_LEAST_TIME = 0;
window.BMAP_TRANSIT_POLICY_LEAST_TRANSFER = 2;
window.BMAP_TRANSIT_POLICY_LEAST_WALKING = 3;
window.BMAP_TRANSIT_POLICY_AVOID_SUBWAYS = 4;
window.BMAP_LINE_TYPE_BUS = 0;
window.BMAP_LINE_TYPE_SUBWAY = 1;
window.BMAP_LINE_TYPE_FERRY = 2;
function aO(cD, cC) {
bW.call(this, cD, cC);
cC = cC || {};
this.setPolicy(cC.policy);
this.setPageCapacity(cC.pageCapacity);
this.QUERY_TYPE = D;
this.RETURN_TYPE = bb;
this.ROUTE_TYPE = ba;
this._overlays = [];
this._curIndex = -1;
this._queryList = [];
var T = this;
cr.load("route",
function () {
T._asyncSearch()
})
}
aO.MAX_PAGE_CAPACITY = 100;
aO.LINE_TYPE_MAPPING = [0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 1, 1];
a1.inherits(aO, bW, "TransitRoute");
a1.extend(aO.prototype, {
setPolicy: function (T) {
if (T >= BMAP_TRANSIT_POLICY_LEAST_TIME && T <= BMAP_TRANSIT_POLICY_AVOID_SUBWAYS) {
this._opts.policy = T
} else {
this._opts.policy = BMAP_TRANSIT_POLICY_LEAST_TIME
}
},
_internalSearch: function (cC, T) {
this._queryList.push({
method: "_internalSearch",
arguments: [cC, T]
})
},
search: function (cC, T) {
this._queryList.push({
method: "search",
arguments: [cC, T]
})
},
setPageCapacity: function (T) {
if (typeof T == "string") {
T = parseInt(T);
if (isNaN(T)) {
this._opts.pageCapacity = aO.MAX_PAGE_CAPACITY;
return
}
}
if (typeof T != "number") {
this._opts.pageCapacity = aO.MAX_PAGE_CAPACITY;
return
}
if (T >= 1 && T <= aO.MAX_PAGE_CAPACITY) {
this._opts.pageCapacity = Math.round(T)
} else {
this._opts.pageCapacity = aO.MAX_PAGE_CAPACITY
}
},
toString: function () {
return "TransitRoute"
},
_shortTitle: function (T) {
return T.replace(/\(.*\)/, "")
}
});
window.BMAP_HIGHLIGHT_STEP = 1;
window.BMAP_HIGHLIGHT_ROUTE = 2;
var be = function (T, cE) {
bW.call(this, T, cE);
this._overlays = [];
this._curIndex = -1;
this._queryList = [];
var cD = this;
var cC = this._opts.renderOptions;
if (cC.highlightMode != BMAP_HIGHLIGHT_STEP && cC.highlightMode != BMAP_HIGHLIGHT_ROUTE) {
cC.highlightMode = BMAP_HIGHLIGHT_STEP
}
this._enableDragging = this._opts.renderOptions.enableDragging ? true : false;
cr.load("route",
function () {
cD._asyncSearch()
})
};
be.ROAD_TYPE = ["", "\u73af\u5c9b", "\u65e0\u5c5e\u6027\u9053\u8def", "\u4e3b\u8def", "\u9ad8\u901f\u8fde\u63a5\u8def", "\u4ea4\u53c9\u70b9\u5185\u8def\u6bb5", "\u8fde\u63a5\u9053\u8def", "\u505c\u8f66\u573a\u5185\u90e8\u9053\u8def", "\u670d\u52a1\u533a\u5185\u90e8\u9053\u8def", "\u6865", "\u6b65\u884c\u8857", "\u8f85\u8def", "\u531d\u9053", "\u5168\u5c01\u95ed\u9053\u8def", "\u672a\u5b9a\u4e49\u4ea4\u901a\u533a\u57df", "POI\u8fde\u63a5\u8def", "\u96a7\u9053", "\u6b65\u884c\u9053", "\u516c\u4ea4\u4e13\u7528\u9053", "\u63d0\u524d\u53f3\u8f6c\u9053"];
a1.inherits(be, bW, "DWRoute");
a1.extend(be.prototype, {
search: function (cC, T) {
this._queryList.push({
method: "search",
arguments: [cC, T]
})
}
});
window.BMAP_DRIVING_POLICY_LEAST_TIME = 0;
window.BMAP_DRIVING_POLICY_LEAST_DISTANCE = 1;
window.BMAP_DRIVING_POLICY_AVOID_HIGHWAYS = 2;
function o(T, cC) {
be.call(this, T, cC);
cC = cC || {};
this.setPolicy(cC.policy);
this.QUERY_TYPE = bE;
this.RETURN_TYPE = s;
this.ROUTE_TYPE = BMAP_ROUTE_TYPE_DRIVING
}
a1.inherits(o, be, "DrivingRoute");
a1.extend(o.prototype, {
setPolicy: function (T) {
if (T >= BMAP_DRIVING_POLICY_LEAST_TIME && T <= BMAP_DRIVING_POLICY_AVOID_HIGHWAYS) {
this._opts.policy = T
} else {
this._opts.policy = BMAP_DRIVING_POLICY_LEAST_TIME
}
}
});
function cu(T, cC) {
be.call(this, T, cC);
this.QUERY_TYPE = bo;
this.RETURN_TYPE = x;
this.ROUTE_TYPE = BMAP_ROUTE_TYPE_WALKING;
this._enableDragging = false
}
a1.inherits(cu, be, "WalkingRoute");
function aR(cC) {
this._opts = {};
a1.extend(this._opts, cC);
this._queryList = [];
var T = this;
cr.load("othersearch",
function () {
T._asyncSearch()
})
}
a1.inherits(aR, a1.lang.Class, "Geocoder");
a1.extend(aR.prototype, {
getPoint: function (T, cD, cC) {
this._queryList.push({
method: "getPoint",
arguments: [T, cD, cC]
})
},
getLocation: function (T, cD, cC) {
this._queryList.push({
method: "getLocation",
arguments: [T, cD, cC]
})
},
toString: function () {
return "Geocoder"
}
});
function ag(cC) {
this._opts = {};
a1.extend(this._opts, cC);
this._queryList = [];
var T = this;
cr.load("othersearch",
function () {
T._asyncSearch()
})
}
a1.extend(ag.prototype, {
getCurrentPosition: function (cC, T) {
this._queryList.push({
method: "getCurrentPosition",
arguments: [cC, T]
})
},
getStatus: function () {
return this._status
}
});
function b0(cC) {
this._opts = {
renderOptions: {
map: null
}
};
a1.extend(this._opts, cC);
this._queryList = [];
var T = this;
cr.load("othersearch",
function () {
T._asyncSearch()
})
}
a1.inherits(b0, a1.lang.Class, "LocalCity");
a1.extend(b0.prototype, {
get: function (T) {
this._queryList.push({
method: "get",
arguments: [T]
})
},
toString: function () {
return "LocalCity"
}
});
function bf(cD, cC) {
u.call(this, cD, cC);
this.QUERY_TYPE_BUSLIST = E;
this.RETURN_TYPE_BUSLIST = aV;
this.QUERY_TYPE_BUSLINE = a8;
this.RETURN_TYPE_BUSLINE = cp;
this._queryList = [];
var T = this;
cr.load("buslinesearch",
function () {
T._asyncSearch()
})
}
bf._iconOpen = b3.imgPath + "iw_plus.gif";
bf._iconClose = b3.imgPath + "iw_minus.gif";
bf._stopUrl = b3.imgPath + "stop_icon.png";
a1.inherits(bf, u);
a1.extend(bf.prototype, {
getBusList: function (T) {
this._queryList.push({
method: "getBusList",
arguments: [T]
})
},
getBusLine: function (T) {
this._queryList.push({
method: "getBusLine",
arguments: [T]
})
},
setGetBusListCompleteCallback: function (T) {
this._opts.onGetBusListComplete = T ||
function () { }
},
setGetBusLineCompleteCallback: function (T) {
this._opts.onGetBusLineComplete = T ||
function () { }
},
setBusListHtmlSetCallback: function (T) {
this._opts.onBusListHtmlSet = T ||
function () { }
},
setBusLineHtmlSetCallback: function (T) {
this._opts.onBusLineHtmlSet = T ||
function () { }
},
setPolylinesSetCallback: function (T) {
this._opts.onPolylinesSet = T ||
function () { }
}
});
function br(cC) {
u.call(this, cC);
cC = cC || {};
this._options = {
input: null,
types: [],
onSearchComplete: function () { }
};
a1.extend(this._options, cC);
this._loc.src = cC.location || "\u5168\u56fd";
this._word = "";
this._show = false;
this._suggestion = null;
_addStat(5011);
var T = this;
cr.load("autocomplete",
function () {
T._asyncSearch()
})
}
a1.inherits(br, u, "Autocomplete");
a1.extend(br.prototype, {
show: function () {
this._show = true
},
hide: function () {
this._show = false
},
setTypes: function (T) {
this._options.types = T
},
setLocation: function (T) {
this._loc.src = T
},
search: function (T) {
this._word = T
}
});
function af(T, cC) {
window.BMap[T] = cC
}
af("Map", bs);
af("Hotspot", cd);
af("MapType", cl);
af("Point", b4);
af("Pixel", bn);
af("Size", aB);
af("Bounds", bF);
af("TileLayer", n);
af("Projection", a6);
af("MercatorProjection", a3);
af("PerspectiveProjection", cv);
af("Copyright", ap);
af("Overlay", bz);
af("Label", ac);
af("Marker", Z);
af("Icon", K);
af("Polyline", f);
af("Polygon", ce);
af("InfoWindow", bH);
af("Circle", a);
af("Control", cg);
af("NavigationControl", J);
af("OverviewMapControl", cB);
af("CopyrightControl", ai);
af("ScaleControl", bC);
af("MapTypeControl", aF);
af("TrafficLayer", ax);
af("ContextMenu", cq);
af("MenuItem", a7);
af("LocalSearch", aX);
af("TransitRoute", aO);
af("DrivingRoute", o);
af("WalkingRoute", cu);
af("Autocomplete", br);
af("Geocoder", aR);
af("LocalCity", b0);
af("Geolocation", ag);
af("BusLineSearch", bf);
window.BMap.apiLoad();
})();
================================================
FILE: BMap.NET.WindowsForm/DrawingObjects/BCircle.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
namespace BMap.NET.WindowsForm.DrawingObjects
{
///
/// 绘制椭圆类
///
public class BCircle : DrawingObject
{
///
/// 椭圆中心
///
public LatLngPoint Center
{
get;
set;
}
///
/// 椭圆矩形任意一角坐标
///
public LatLngPoint RightBottom
{
get;
set;
}
///
/// 绘制方法
///
/// 画布
/// 地图中心
/// 地图缩放级别
/// 地图大小
public override void Draw(System.Drawing.Graphics g, LatLngPoint center, int zoom, System.Drawing.Size screen_size)
{
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
Point theScreenCenter = MapHelper.GetScreenLocationByLatLng(Center, center, zoom, screen_size); //椭圆中心点的屏幕坐标
Point theScreenRightBottom = MapHelper.GetScreenLocationByLatLng(RightBottom, center, zoom, screen_size); //椭圆矩形任意一角的屏幕坐标
int width = Math.Abs(2 * (theScreenRightBottom.X - theScreenCenter.X));
int height = Math.Abs(2 * (theScreenRightBottom.Y - theScreenCenter.Y));
if (new Rectangle(new Point(0,0), screen_size).IntersectsWith(new Rectangle(theScreenCenter.X - width/2, theScreenCenter.Y - height/2, width, height))) //需要绘制
{
using (SolidBrush sb = new SolidBrush(Color.FromArgb(30, Color.Blue)))
{
g.FillEllipse(sb, new Rectangle(theScreenCenter.X - width / 2, theScreenCenter.Y - height / 2, width, height));
}
using (Pen pen = new Pen(Color.FromArgb(150,Color.Blue), 4))
{
g.DrawEllipse(pen, new Rectangle(theScreenCenter.X - width / 2, theScreenCenter.Y - height / 2, width, height));
}
}
}
}
}
================================================
FILE: BMap.NET.WindowsForm/DrawingObjects/BDownloadRectangle.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
namespace BMap.NET.WindowsForm.DrawingObjects
{
public class BDownloadRectangle : DrawingObject
{
///
/// 左上角屏幕坐标
///
public Point LeftTop
{
get;
set;
}
///
/// 矩形宽 像素
///
public int Width
{
get;
set;
}
///
/// 矩形高 像素
///
public int Height
{
set;
get;
}
///
/// 表示屏幕区域
///
public Rectangle Rect
{
get
{
return new Rectangle(LeftTop, new Size(Width, Height));
}
}
///
/// 绘制方法
///
///
///
///
///
public override void Draw(Graphics g, LatLngPoint center, int zoom, Size screen_size)
{
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
using (SolidBrush sb = new SolidBrush(Color.FromArgb(100, Color.White)))
{
g.FillRectangle(sb, new Rectangle(LeftTop, new Size(Width, Height)));
}
using (Pen pen = new Pen(Color.Green))
{
g.DrawRectangle(pen, new Rectangle(LeftTop, new Size(Width, Height)));
}
using (SolidBrush sb = new SolidBrush(Color.Green))
{
//移动柄
g.FillRectangle(sb, new Rectangle(new Point(LeftTop.X - 3, LeftTop.Y - 3), new Size(6, 6)));
g.FillRectangle(sb, new Rectangle(new Point(LeftTop.X - 3 + Width / 2, LeftTop.Y - 3), new Size(6, 6)));
g.FillRectangle(sb, new Rectangle(new Point(LeftTop.X - 3 + Width, LeftTop.Y - 3), new Size(6, 6)));
g.FillRectangle(sb, new Rectangle(new Point(LeftTop.X - 3 + Width, LeftTop.Y - 3 + Height / 2), new Size(6, 6)));
g.FillRectangle(sb, new Rectangle(new Point(LeftTop.X - 3 + Width, LeftTop.Y - 3 + Height), new Size(6, 6)));
g.FillRectangle(sb, new Rectangle(new Point(LeftTop.X - 3 + Width / 2, LeftTop.Y - 3 + Height), new Size(6, 6)));
g.FillRectangle(sb, new Rectangle(new Point(LeftTop.X - 3, LeftTop.Y - 3 + Height), new Size(6, 6)));
g.FillRectangle(sb, new Rectangle(new Point(LeftTop.X - 3, LeftTop.Y - 3 + Height / 2), new Size(6, 6)));
}
}
}
}
================================================
FILE: BMap.NET.WindowsForm/DrawingObjects/BLine.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
namespace BMap.NET.WindowsForm.DrawingObjects
{
///
/// 绘制直(折)线类
///
public class BLine : DrawingObject
{
///
/// 点集
///
public List Points
{
get;
set;
}
///
/// 更新最后一点
///
///
public void UpdateTheEnd(LatLngPoint p)
{
if (Points != null)
{
Points[Points.Count - 1] = p;
}
}
///
/// 绘制方法
///
/// 画布
/// 地图中心
/// 地图缩放级别
/// 地图大小
public override void Draw(System.Drawing.Graphics g, LatLngPoint center, int zoom, System.Drawing.Size screen_size)
{
if (Points != null && Points.Count >= 2)
{
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
List l = new List();
foreach (LatLngPoint p in Points)
{
l.Add(MapHelper.GetScreenLocationByLatLng(p, center, zoom, screen_size)); //屏幕坐标
}
using (Pen pen = new Pen(Color.FromArgb(150,Color.Blue), 4))
{
for (int i = 0; i < l.Count - 1; ++i)
{
g.DrawLine(pen, l[i], l[i + 1]);
}
}
}
}
}
}
================================================
FILE: BMap.NET.WindowsForm/DrawingObjects/BPolygon.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
namespace BMap.NET.WindowsForm.DrawingObjects
{
///
/// 绘制多边形类
///
public class BPolygon : DrawingObject
{
///
/// 点集
///
public List Points
{
get;
set;
}
///
/// 更新最后一点
///
///
public void UpdateTheEnd(LatLngPoint p)
{
if (Points != null)
{
Points[Points.Count - 1] = p;
}
}
///
/// 绘制方法
///
/// 画布
/// 地图中心点
/// 地图缩放级别
/// 地图大小
public override void Draw(System.Drawing.Graphics g, LatLngPoint center, int zoom, System.Drawing.Size screen_size)
{
if (Points != null && Points.Count >= 2)
{
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
List l = new List();
foreach (LatLngPoint p in Points)
{
l.Add(MapHelper.GetScreenLocationByLatLng(p, center, zoom, screen_size));
}
using (Pen pen = new Pen(Color.FromArgb(150,Color.Blue), 4))
{
if (Points.Count == 2)
{
g.DrawLine(pen, l[0], l[1]);
}
else
{
using (SolidBrush sb = new SolidBrush(Color.FromArgb(30, Color.Blue)))
{
g.FillPolygon(sb, l.ToArray());
}
g.DrawPolygon(pen, l.ToArray());
}
}
}
}
}
}
================================================
FILE: BMap.NET.WindowsForm/DrawingObjects/BRectangle.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
namespace BMap.NET.WindowsForm.DrawingObjects
{
///
/// 绘制矩形类
///
public class BRectangle : DrawingObject
{
///
/// 左上角坐标
///
public LatLngPoint LeftTop
{
get;
set;
}
///
/// 右下角坐标
///
public LatLngPoint RightBottom
{
get;
set;
}
///
/// 绘制方法
///
///
///
///
///
public override void Draw(System.Drawing.Graphics g, LatLngPoint center, int zoom, System.Drawing.Size screen_size)
{
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
Point theScreenLeftTop = MapHelper.GetScreenLocationByLatLng(LeftTop, center, zoom, screen_size); //矩形左上角屏幕坐标
Point theScreenRightBottom = MapHelper.GetScreenLocationByLatLng(RightBottom, center, zoom, screen_size); //矩形右下角屏幕坐标
int width = Math.Abs(theScreenRightBottom.X - theScreenLeftTop.X);
int height = Math.Abs(theScreenRightBottom.Y - theScreenLeftTop.Y);
Rectangle r = new Rectangle(Math.Min(theScreenLeftTop.X, theScreenRightBottom.X), Math.Min(theScreenLeftTop.Y, theScreenRightBottom.Y), width, height);
if (new Rectangle(new Point(0, 0), screen_size).IntersectsWith(r))
{
using (SolidBrush sb = new SolidBrush(Color.FromArgb(30, Color.Blue)))
{
g.FillRectangle(sb, r);
}
using (Pen pen = new Pen(Color.FromArgb(150,Color.Blue), 4))
{
g.DrawRectangle(pen, r);
}
}
}
}
}
================================================
FILE: BMap.NET.WindowsForm/DrawingObjects/BScreenShotRectangle.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
namespace BMap.NET.WindowsForm.DrawingObjects
{
///
/// 地图中截图矩形
///
public class BScreenShotRectangle : DrawingObject
{
///
/// 左上角屏幕坐标
///
public Point LeftTop
{
get;
set;
}
///
/// 矩形宽 像素
///
public int Width
{
get;
set;
}
///
/// 矩形高 像素
///
public int Height
{
set;
get;
}
///
/// 表示屏幕区域
///
public Rectangle Rect
{
get
{
return new Rectangle(LeftTop, new Size(Width, Height));
}
}
///
/// 绘制方法
///
///
///
///
///
public override void Draw(Graphics g, LatLngPoint center, int zoom, Size screen_size)
{
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
using (SolidBrush sb = new SolidBrush(Color.FromArgb(100, Color.White)))
{
g.FillRectangle(sb, new Rectangle(LeftTop, new Size(Width, Height)));
}
using (Pen pen = new Pen(Color.Black))
{
g.DrawRectangle(pen, new Rectangle(LeftTop, new Size(Width, Height)));
}
using (SolidBrush sb = new SolidBrush(Color.Black))
{
//移动柄
g.FillRectangle(sb, new Rectangle(new Point(LeftTop.X - 3, LeftTop.Y - 3), new Size(6, 6)));
g.FillRectangle(sb, new Rectangle(new Point(LeftTop.X - 3 + Width / 2, LeftTop.Y - 3), new Size(6, 6)));
g.FillRectangle(sb, new Rectangle(new Point(LeftTop.X - 3 + Width, LeftTop.Y - 3), new Size(6, 6)));
g.FillRectangle(sb, new Rectangle(new Point(LeftTop.X - 3 + Width, LeftTop.Y - 3 + Height / 2), new Size(6, 6)));
g.FillRectangle(sb, new Rectangle(new Point(LeftTop.X - 3 + Width, LeftTop.Y - 3 + Height), new Size(6, 6)));
g.FillRectangle(sb, new Rectangle(new Point(LeftTop.X - 3 + Width / 2, LeftTop.Y - 3 + Height), new Size(6, 6)));
g.FillRectangle(sb, new Rectangle(new Point(LeftTop.X - 3, LeftTop.Y - 3 + Height), new Size(6, 6)));
g.FillRectangle(sb, new Rectangle(new Point(LeftTop.X - 3, LeftTop.Y - 3 + Height / 2), new Size(6, 6)));
//高宽
g.FillRectangle(sb, new Rectangle(new Point(LeftTop.X - 2, LeftTop.Y - 23), new Size(60, 18)));
using (Font f = new Font("微软雅黑", 9))
{
g.DrawString(Width + "×" + Height, f, Brushes.White, new PointF(LeftTop.X - 1, LeftTop.Y - 21));
}
}
}
}
}
================================================
FILE: BMap.NET.WindowsForm/DrawingObjects/DrawingObject.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
namespace BMap.NET.WindowsForm.DrawingObjects
{
///
/// 地图中绘制图形基类
///
public abstract class DrawingObject
{
///
/// 绘制方法
///
/// 画布
/// 地图中心点坐标
/// 当前地图缩放级别
/// 屏幕大小
public abstract void Draw(Graphics g, LatLngPoint center, int zoom, Size screen_size);
}
}
================================================
FILE: BMap.NET.WindowsForm/FunctionalControls/BTabControl.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
namespace BMap.NET.WindowsForm.FunctionalControls
{
///
/// 选项卡控件,可以用来组织 位置列表控件BPlacesControl、导航控件BDirectionControl
///
public class BTabControl:TabControl
{
int _mouse_over = -1;
public BTabControl()
{
ItemSize = new System.Drawing.Size(70, 70);
Alignment = TabAlignment.Left;
//自绘
base.SetStyle(
ControlStyles.UserPaint |
ControlStyles.OptimizedDoubleBuffer |
ControlStyles.AllPaintingInWmPaint |
ControlStyles.ResizeRedraw |
ControlStyles.SupportsTransparentBackColor, true);
base.UpdateStyles();
}
///
/// 绘制
///
///
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
using (SolidBrush sb = new SolidBrush(Color.FromArgb(37, 37, 37)))
{
Rectangle all_back = new Rectangle(1, 1, Width - 2, Height - 2); //整个背景区域
e.Graphics.FillRectangle(sb, all_back);
Rectangle back = new Rectangle(ItemSize.Width + 1, 1, Width - ItemSize.Width - 2, Height - 2); //客户区
e.Graphics.FillRectangle(Brushes.White, back);
e.Graphics.DrawRectangle(Pens.Gray, back);
foreach (TabPage tab in TabPages) //Tab
{
Rectangle tab_rect = GetTabRect(TabPages.IndexOf(tab));
tab_rect = new Rectangle(tab_rect.X - 1, tab_rect.Y - 1, tab_rect.Width, tab_rect.Height);
if (this.SelectedTab == tab || TabPages.IndexOf(tab) == _mouse_over)
{
using (SolidBrush bsb = new SolidBrush(Color.FromArgb(51,133,255)))
{
e.Graphics.FillRectangle(bsb, tab_rect);
}
e.Graphics.DrawString(tab.Text, new Font("微软雅黑", 10), Brushes.White, new PointF(tab_rect.X + 18, tab_rect.Y + 20));
}
else
{
e.Graphics.FillRectangle(sb, tab_rect);
e.Graphics.DrawString(tab.Text, new Font("微软雅黑", 10), Brushes.White, new PointF(tab_rect.X + 18, tab_rect.Y + 20));
}
}
}
}
///
/// 鼠标进入选项卡
///
///
protected override void OnMouseMove(MouseEventArgs e)
{
base.OnMouseMove(e);
_mouse_over = -1;
foreach (TabPage tab in TabPages)
{
Rectangle tab_rect = GetTabRect(TabPages.IndexOf(tab));
if (tab_rect.Contains(e.Location))
{
_mouse_over = TabPages.IndexOf(tab);
break;
}
}
Invalidate();
}
///
/// 鼠标移出
///
///
protected override void OnMouseLeave(EventArgs e)
{
base.OnMouseLeave(e);
_mouse_over = -1;
Invalidate();
}
}
}
================================================
FILE: BMap.NET.WindowsForm/FunctionalControls/CityList.Designer.cs
================================================
namespace BMap.NET.WindowsForm.FunctionalControls
{
partial class CityList
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.flpList = new System.Windows.Forms.FlowLayoutPanel();
this.SuspendLayout();
//
// flpList
//
this.flpList.AutoScroll = true;
this.flpList.Dock = System.Windows.Forms.DockStyle.Fill;
this.flpList.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.flpList.Location = new System.Drawing.Point(0, 0);
this.flpList.Name = "flpList";
this.flpList.Size = new System.Drawing.Size(130, 139);
this.flpList.TabIndex = 0;
//
// CityList
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.flpList);
this.Name = "CityList";
this.Size = new System.Drawing.Size(130, 139);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.FlowLayoutPanel flpList;
}
}
================================================
FILE: BMap.NET.WindowsForm/FunctionalControls/CityList.cs
================================================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace BMap.NET.WindowsForm.FunctionalControls
{
///
/// 可以按拼音顺序、行政组织结构的方式显示城市列表的控件
///
partial class CityList : UserControl
{
public event SelectedCityChangedEventHandler SelectedCityChanged;
///
/// 构造方法
///
public CityList()
{
InitializeComponent();
}
///
/// 城市控件显示方式
///
public CityListMode Mode
{
get;
set;
}
///
/// 拼音类型数据源
///
public Dictionary> DataByPinyin
{
get;
set;
}
///
/// 行政组织结构类型数据源
///
public CityNode DataByOrganization
{
get;
set;
}
///
/// 刷新列表
///
public void RefreshList()
{
flpList.Controls.Clear();
flpList.BackColor = Color.White;
flpList.Padding = new Padding(3);
//按照拼音方式显示
if (Mode == CityListMode.Pinyin)
{
if (DataByPinyin != null)
{
var c = DataByPinyin.OrderBy((p) => p.Key);
foreach (KeyValuePair> p in c) //遍历26个拼音
{
Label lbl_title = new Label();
lbl_title.BackColor = Color.LightGray;
lbl_title.Width = 150;
lbl_title.AutoSize = false;
lbl_title.Font = new System.Drawing.Font("微软雅黑", 12, FontStyle.Bold);
lbl_title.Height = 30;
lbl_title.Text = " " + p.Key;
lbl_title.TextAlign = ContentAlignment.MiddleLeft;
flpList.Controls.Add(lbl_title);
Application.DoEvents();
foreach (string city in p.Value) //遍历拼音中的城市
{
Label lbl_item = new Label();
lbl_item.AutoSize = false;
lbl_item.BackColor = Color.White;
lbl_item.Font = new System.Drawing.Font("微软雅黑", 10);
lbl_item.Width = 150;
lbl_item.Height = 30;
lbl_item.TextAlign = ContentAlignment.MiddleLeft;
lbl_item.Text = city;
lbl_item.MouseEnter += new EventHandler(lbl_item_MouseEnter);
lbl_item.MouseLeave += new EventHandler(lbl_item_MouseLeave);
lbl_item.Click += new EventHandler(lbl_item_Click);
flpList.Controls.Add(lbl_item);
Application.DoEvents();
}
}
}
}
//按照组织结构显示
else if(Mode == CityListMode.Organization)
{
if (DataByOrganization != null)
{
foreach (CityNode province in DataByOrganization.Nexts) //遍历省份、直辖市
{
Label lbl_title = new Label();
lbl_title.Text = " " + province.CityName;
lbl_title.BackColor = Color.LightGray;
lbl_title.Width = 150;
lbl_title.AutoSize = false;
lbl_title.Font = new System.Drawing.Font("微软雅黑", 12, FontStyle.Bold);
lbl_title.Height = 30;
lbl_title.TextAlign = ContentAlignment.MiddleLeft;
flpList.Controls.Add(lbl_title);
Application.DoEvents();
foreach (CityNode city in province.Nexts) //遍历省份中的市 直辖市中的县
{
Label lbl_item = new Label();
lbl_item.BackColor = Color.White;
lbl_item.Font = new System.Drawing.Font("微软雅黑", 10);
lbl_item.Width = 150;
lbl_item.Height = 30;
lbl_item.Text = city.CityName;
lbl_item.TextAlign = ContentAlignment.MiddleLeft;
lbl_item.AutoSize = false;
lbl_item.MouseEnter += new EventHandler(lbl_item_MouseEnter);
lbl_item.MouseLeave += new EventHandler(lbl_item_MouseLeave);
lbl_item.Click += new EventHandler(lbl_item_Click);
flpList.Controls.Add(lbl_item);
Application.DoEvents();
}
}
}
}
}
///
/// 鼠标选择项
///
///
///
void lbl_item_Click(object sender, EventArgs e)
{
if (SelectedCityChanged != null)
{
SelectedCityChanged((sender as Label).Text);
}
}
///
/// 鼠标离开选项
///
///
///
void lbl_item_MouseLeave(object sender, EventArgs e)
{
(sender as Label).BackColor = Color.White;
}
///
/// 鼠标进入选项
///
///
///
void lbl_item_MouseEnter(object sender, EventArgs e)
{
(sender as Label).BackColor = Color.FromArgb(100, Color.LightGray);
}
}
///
/// 表示处理选择城市发生变化事件的方法
///
///
public delegate void SelectedCityChangedEventHandler(string cityName);
///
/// 城市控件显示方式
///
enum CityListMode
{
Pinyin,
Organization
}
///
/// 城市节点
///
class CityNode
{
public string CityName
{
get;
set;
}
public string CityCode
{
get;
set;
}
public string ParentCode
{
set;
get;
}
public string CityLevel
{
set;
get;
}
public List Nexts
{
set;
get;
}
public CityNode(string cityName, string cityCode, string parentCode, string cityLevel)
{
CityName = cityName;
CityCode = cityCode;
parentCode = ParentCode;
cityLevel = CityLevel;
}
}
}
================================================
FILE: BMap.NET.WindowsForm/FunctionalControls/CityList.resx
================================================
text/microsoft-resx
2.0
System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
================================================
FILE: BMap.NET.WindowsForm/LatLngPoint.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BMap.NET.WindowsForm
{
///
/// 经纬度坐标
///
public class LatLngPoint
{
public double Lng
{
set;
get;
}
public double Lat
{
set;
get;
}
public LatLngPoint(double _lng, double _lat)
{
Lng = _lng;
Lat = _lat;
}
}
}
================================================
FILE: BMap.NET.WindowsForm/MapDownloadDialog.Designer.cs
================================================
namespace BMap.NET.WindowsForm
{
partial class MapDownloadDialog
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.button2 = new System.Windows.Forms.Button();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.label1 = new System.Windows.Forms.Label();
this.numZoomEnd = new System.Windows.Forms.NumericUpDown();
this.radioButton2 = new System.Windows.Forms.RadioButton();
this.radioButton1 = new System.Windows.Forms.RadioButton();
this.numThread = new System.Windows.Forms.NumericUpDown();
this.label6 = new System.Windows.Forms.Label();
this.numZoom = new System.Windows.Forms.NumericUpDown();
this.label5 = new System.Windows.Forms.Label();
this.rchOuput = new System.Windows.Forms.RichTextBox();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.button1 = new System.Windows.Forms.Button();
this.txtPath = new System.Windows.Forms.TextBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
this.groupBox4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numZoomEnd)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numThread)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numZoom)).BeginInit();
this.groupBox5.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
// button2
//
this.button2.Location = new System.Drawing.Point(485, 156);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 7;
this.button2.Text = "开始下载";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// groupBox4
//
this.groupBox4.Controls.Add(this.label1);
this.groupBox4.Controls.Add(this.numZoomEnd);
this.groupBox4.Controls.Add(this.radioButton2);
this.groupBox4.Controls.Add(this.radioButton1);
this.groupBox4.Controls.Add(this.numThread);
this.groupBox4.Controls.Add(this.label6);
this.groupBox4.Controls.Add(this.numZoom);
this.groupBox4.Controls.Add(this.label5);
this.groupBox4.Location = new System.Drawing.Point(17, 12);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(554, 84);
this.groupBox4.TabIndex = 5;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "范围";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(142, 51);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(17, 12);
this.label1.TabIndex = 9;
this.label1.Text = "至";
//
// numZoomEnd
//
this.numZoomEnd.Location = new System.Drawing.Point(163, 48);
this.numZoomEnd.Maximum = new decimal(new int[] {
17,
0,
0,
0});
this.numZoomEnd.Name = "numZoomEnd";
this.numZoomEnd.Size = new System.Drawing.Size(50, 21);
this.numZoomEnd.TabIndex = 14;
this.numZoomEnd.Value = new decimal(new int[] {
13,
0,
0,
0});
//
// radioButton2
//
this.radioButton2.AutoSize = true;
this.radioButton2.Location = new System.Drawing.Point(468, 20);
this.radioButton2.Name = "radioButton2";
this.radioButton2.Size = new System.Drawing.Size(71, 16);
this.radioButton2.TabIndex = 13;
this.radioButton2.TabStop = true;
this.radioButton2.Text = "卫星地图";
this.radioButton2.UseVisualStyleBackColor = true;
//
// radioButton1
//
this.radioButton1.AutoSize = true;
this.radioButton1.Checked = true;
this.radioButton1.Location = new System.Drawing.Point(31, 20);
this.radioButton1.Name = "radioButton1";
this.radioButton1.Size = new System.Drawing.Size(71, 16);
this.radioButton1.TabIndex = 12;
this.radioButton1.TabStop = true;
this.radioButton1.Text = "普通地图";
this.radioButton1.UseVisualStyleBackColor = true;
//
// numThread
//
this.numThread.Location = new System.Drawing.Point(303, 48);
this.numThread.Maximum = new decimal(new int[] {
20,
0,
0,
0});
this.numThread.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.numThread.Name = "numThread";
this.numThread.Size = new System.Drawing.Size(99, 21);
this.numThread.TabIndex = 11;
this.numThread.Value = new decimal(new int[] {
2,
0,
0,
0});
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(244, 52);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(53, 12);
this.label6.TabIndex = 10;
this.label6.Text = "下载线程";
//
// numZoom
//
this.numZoom.Location = new System.Drawing.Point(86, 48);
this.numZoom.Maximum = new decimal(new int[] {
17,
0,
0,
0});
this.numZoom.Name = "numZoom";
this.numZoom.Size = new System.Drawing.Size(50, 21);
this.numZoom.TabIndex = 9;
this.numZoom.Value = new decimal(new int[] {
13,
0,
0,
0});
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(29, 52);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(53, 12);
this.label5.TabIndex = 8;
this.label5.Text = "缩放级别";
//
// rchOuput
//
this.rchOuput.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.rchOuput.BackColor = System.Drawing.Color.PapayaWhip;
this.rchOuput.Location = new System.Drawing.Point(8, 21);
this.rchOuput.Name = "rchOuput";
this.rchOuput.ReadOnly = true;
this.rchOuput.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
this.rchOuput.Size = new System.Drawing.Size(535, 187);
this.rchOuput.TabIndex = 0;
this.rchOuput.Text = "";
//
// groupBox5
//
this.groupBox5.Controls.Add(this.button1);
this.groupBox5.Controls.Add(this.txtPath);
this.groupBox5.Location = new System.Drawing.Point(17, 102);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(554, 48);
this.groupBox5.TabIndex = 6;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "保存位置";
//
// button1
//
this.button1.Location = new System.Drawing.Point(468, 17);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 1;
this.button1.Text = "浏览";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// txtPath
//
this.txtPath.Location = new System.Drawing.Point(9, 19);
this.txtPath.Name = "txtPath";
this.txtPath.ReadOnly = true;
this.txtPath.Size = new System.Drawing.Size(441, 21);
this.txtPath.TabIndex = 0;
//
// groupBox2
//
this.groupBox2.Controls.Add(this.rchOuput);
this.groupBox2.Location = new System.Drawing.Point(17, 180);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(554, 216);
this.groupBox2.TabIndex = 4;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "输出";
//
// linkLabel1
//
this.linkLabel1.AutoSize = true;
this.linkLabel1.Location = new System.Drawing.Point(17, 403);
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.Size = new System.Drawing.Size(89, 12);
this.linkLabel1.TabIndex = 8;
this.linkLabel1.TabStop = true;
this.linkLabel1.Text = "合并成大图查看";
this.linkLabel1.Visible = false;
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
//
// MapDownloadDialog
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(592, 427);
this.Controls.Add(this.linkLabel1);
this.Controls.Add(this.button2);
this.Controls.Add(this.groupBox4);
this.Controls.Add(this.groupBox5);
this.Controls.Add(this.groupBox2);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "MapDownloadDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "下载配置";
this.Load += new System.EventHandler(this.MapDownloadDialog_Load);
this.groupBox4.ResumeLayout(false);
this.groupBox4.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numZoomEnd)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numThread)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numZoom)).EndInit();
this.groupBox5.ResumeLayout(false);
this.groupBox5.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button button2;
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.NumericUpDown numThread;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.NumericUpDown numZoom;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.RichTextBox rchOuput;
private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox txtPath;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.RadioButton radioButton2;
private System.Windows.Forms.RadioButton radioButton1;
private System.Windows.Forms.LinkLabel linkLabel1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.NumericUpDown numZoomEnd;
}
}
================================================
FILE: BMap.NET.WindowsForm/MapDownloadDialog.cs
================================================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Net;
using System.Threading;
using BMap.NET.HTTPService;
using System.Collections;
namespace BMap.NET.WindowsForm
{
public partial class MapDownloadDialog : Form
{
LatLngPoint p1; LatLngPoint p2;
ArrayList _waittodownload = new ArrayList(); //待下载图片集合
public MapDownloadDialog(LatLngPoint p1, LatLngPoint p2)
{
InitializeComponent();
this.p1 = p1;
this.p2 = p2;
}
private void button1_Click(object sender, EventArgs e)
{
using (FolderBrowserDialog fb = new FolderBrowserDialog())
{
if (fb.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
txtPath.Text = fb.SelectedPath;
}
}
}
private void button2_Click(object sender, EventArgs e)
{
_path = txtPath.Text;
if (_path.Equals(""))
{
MessageBox.Show("请选择存储路径!");
return;
}
if (numZoom.Value > numZoomEnd.Value)
{
MessageBox.Show("地图级别设置不对!");
return;
}
int zoomStart = (int)numZoom.Value;
int zoomEnd = (int)numZoomEnd.Value;
int thread = (int)numThread.Value;
_waittodownload.Clear();
for (int zoom = zoomStart; zoom <= zoomEnd; ++zoom)
{
PointF point1 = MapHelper.GetLocationByLatLng(p1, zoom); //将第一个点经纬度转换成平面2D坐标
PointF point2 = MapHelper.GetLocationByLatLng(p2, zoom); //将第二个点经纬度转换成平面2D坐标
int startX = (int)point1.X / 256; //起始列
int endX = (int)point2.X / 256; //结束列
if (endX == Math.Pow(2, zoom)) //结束列超出范围
{
endX--;
}
int startY = (int)point1.Y / 256; //起始行
int endY = (int)point2.Y / 256; //结束行
if (endY == Math.Pow(2, zoom)) //结束行超出范围
{
endY--;
}
_totalwidth = (endX - startX + 1) * 256; //合并图的宽度
_totalheight = (endY - startY + 1) * 256; //合并图的高度
int threadId = 0;
for (int y = startY; y <= endY; y++)
{
for (int x = startX; x <= endX; x++)
{
RectInfo ri = new RectInfo();
ri.threadId = threadId; //分别由不同的线程下载
ri.x = x;
ri.y = y;
ri.z = zoom;
ri.bComplete = false;
_waittodownload.Add(ri); //将每个小方块放入待下载集合
threadId = (threadId + 1) % thread; //由thread个不同线程下载图片
}
}
}
if (MessageBox.Show("共有" + _waittodownload.Count + "张图片需要下载,确定下载吗?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.OK)
{
_thread = thread;
_zoom = zoomStart;
_zoomEnd = zoomEnd;
_downloadnum = 0;
_normal = radioButton1.Checked;
button2.Enabled = false;
rchOuput.Clear();
groupBox2.Text = "输出(" + _waittodownload.Count + "张)";
_startTime = DateTime.Now;
for (int i = 1; i <= thread; ++i)
{
Thread t = new Thread(new ParameterizedThreadStart(DownloadThreadProc));
t.Start(i); //开启下载线程
}
}
}
///
/// 下载线程方法
///
///
public void DownloadThreadProc(object param)
{
int threadId = (int)param; //当前线程Id
MapService mapService = new MapService();
this.Invoke((Action)delegate() //输出
{
rchOuput.SelectionColor = Color.Blue;
rchOuput.AppendText(DateTime.Now.ToLongTimeString() + " 第" + threadId + "号线程开始执行\r\n");
});
for (int i = 0; i < _waittodownload.Count; i++)
{
RectInfo ri = (RectInfo)_waittodownload[i];
if ((!ri.bComplete) && (ri.threadId + 1 == threadId))
{
try
{
Bitmap map = mapService.LoadMapTile(ri.x, ri.y, ri.z, _normal ? MapMode.Normal : MapMode.Satellite, LoadMapMode.CacheServer);
string file = _path + "\\" + ri.z.ToString() + "\\" + ri.z.ToString() + "_" + ri.x.ToString() + "_" + ri.y.ToString() + ".jpg";
ri.Bitmap = map;
//文件保存格式 “缩放级别_列_行.jpg”
if (!Directory.Exists(_path + "\\" + ri.z.ToString()))
{
Directory.CreateDirectory(_path + "\\" + ri.z.ToString());
}
map.Save(file, System.Drawing.Imaging.ImageFormat.Jpeg);
this.Invoke((Action)delegate() //输出
{
rchOuput.SelectionColor = Color.Green;
rchOuput.AppendText(DateTime.Now.ToLongTimeString() + " 第" + threadId + "号线程下载图片" + ri.z.ToString() + "_" + ri.x.ToString() + "_" + ri.y.ToString() + ".jpg\r\n");
});
_downloadnum++;
ri.bComplete = true;
}
catch
{
this.Invoke((Action)delegate() //输出
{
rchOuput.SelectionColor = Color.Red;
rchOuput.AppendText(DateTime.Now.ToLongTimeString() + " 第" + threadId + "号线程下载图片" + ri.z.ToString() + "_" + ri.x.ToString() + "_" + ri.y.ToString() + ".jpg失败!\r\n");
});
}
}
}
this.Invoke((Action)delegate() //输出
{
rchOuput.SelectionColor = Color.Blue;
rchOuput.AppendText(DateTime.Now.ToLongTimeString() + " 第" + threadId + "号线程执行完毕\r\n");
});
_thread--; //工作线程数目减一
if (_thread == 0) //所有线程均结束
{
this.Invoke((Action)delegate() //输出
{
rchOuput.SelectionColor = Color.Blue;
rchOuput.AppendText(DateTime.Now.ToLongTimeString() + " 图片下载结束!共下载" + _downloadnum + "张,共耗时" + (DateTime.Now - _startTime).TotalSeconds + "秒");
button2.Enabled = true;
});
}
}
public string _path { get; set; }
public int _thread { get; set; }
public DateTime _startTime { get; set; }
public int _downloadnum { get; set; }
public int _zoom { get; set; }
public bool _normal { get; set; }
private void MapDownloadDialog_Load(object sender, EventArgs e)
{
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
if (_downloadnum == _waittodownload.Count && _downloadnum != 0) //全部下载完毕
{
for (int zoom = _zoom; zoom <= _zoomEnd; ++zoom)
{
Bitmap b = new Bitmap((int)_totalwidth, (int)_totalheight);
Graphics g = Graphics.FromImage(b);
int startx = ((RectInfo)(_waittodownload[0])).x;
int starty = ((RectInfo)(_waittodownload[0])).y;
foreach (RectInfo rf in _waittodownload)
{
g.DrawImage(rf.Bitmap, new Rectangle(new Point((rf.x - startx) * 256, (int)_totalheight - (rf.y - starty + 1) * 256), new Size(256, 256)));
}
g.Dispose();
b.Save(_path + "\\" + _zoom + "_total.jpg");
b.Dispose();
System.Diagnostics.Process.Start(_path + "\\" + _zoom + "_total.jpg");
}
}
}
public int _totalwidth { get; set; }
public int _totalheight { get; set; }
public int _zoomEnd { get; set; }
}
///
/// 地图中每个256*256尺寸的方块
///
public class RectInfo
{
public int serverId; //目标服务器
public int threadId; //目标下载线程
public string url; //下载url
public int x; //列
public int y; //行
public int z; //缩放级别
public bool bComplete; //是否完成
public Bitmap Bitmap; //图片
}
}
================================================
FILE: BMap.NET.WindowsForm/MapDownloadDialog.resx
================================================
text/microsoft-resx
2.0
System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
================================================
FILE: BMap.NET.WindowsForm/MapDownloaderControl.Designer.cs
================================================
namespace BMap.NET.WindowsForm
{
partial class MapDownloaderControl
{
///
/// 必需的设计器变量。
///
private System.ComponentModel.IContainer components = null;
///
/// 清理所有正在使用的资源。
///
/// 如果应释放托管资源,为 true;否则为 false。
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
///
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
///
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
}
#endregion
}
}
================================================
FILE: BMap.NET.WindowsForm/MapDownloaderControl.cs
================================================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BMap.NET.WindowsForm.BMapElements;
using System.Drawing.Drawing2D;
using BMap.NET.HTTPService;
using Newtonsoft.Json.Linq;
using BMap.NET.WindowsForm.FunctionalControls;
using BMap.NET.WindowsForm.DrawingObjects;
namespace BMap.NET.WindowsForm
{
///
/// 百度地图显示控件
///
public partial class MapDownloaderControl : UserControl
{
private const double DISTANCE = 111319.49; //每(经纬)度距离m
#region 属性
private LatLngPoint _center = new LatLngPoint(117.217412, 39.142191); //天津
///
/// 地图显示中心经纬度坐标
///
[Description("地图中心点"), Category("BMap.NET")]
public LatLngPoint Center
{
get
{
return _center;
}
set
{
_center = value;
}
}
private int _zoom = 12;
///
/// 地图缩放级别(3-18)
///
[Description("当前地图缩放级别"), Category("BMap.NET")]
public int Zoom
{
get
{
return _zoom;
}
set
{
_zoom = value;
_tiles.Clear();
Invalidate();
}
}
private MapMode _mode = MapMode.Normal;
///
/// 地图模式
///
[Description("当前地图模式"), Category("BMap.NET")]
public MapMode Mode
{
get
{
return _mode;
}
set
{
_mode = value;
foreach (KeyValuePair p in _tiles)
{
p.Value.Mode = _mode;
}
Invalidate();
}
}
private LoadMapMode _loadmode = LoadMapMode.Cache;
///
/// 地图加载模式
///
[Description("当前地图加载模式"), Category("BMap.NET")]
public LoadMapMode LoadMode
{
get
{
return _loadmode;
}
set
{
_loadmode = value;
foreach (KeyValuePair p in _tiles)
{
p.Value.LoadMode = _loadmode;
}
Invalidate();
}
}
#endregion
#region 字段
///
/// 当前光标
///
private Cursor _current_cursor_cache = Cursors.Arrow;
///
/// 地图中提示
///
private Label _toolTip = new Label();
///
/// 鼠标是否定位
///
private bool _cursor_located = false;
///
/// 鼠标移动前一点缓存
///
private Point _previous_point_cache;
///
/// 鼠标工作方式
///
private MouseType _mouse_type = MouseType.None;
///
/// 当前绘制图形 没有则为null(包括截图矩形)
///
private DrawingObject _current_drawing;
///
/// 地图中瓦片容器
///
private Dictionary _tiles = new Dictionary();
///
/// 地图中普通信息点(POI)容器
///
private Dictionary _pois = new Dictionary();
///
/// 绘制图形容器
///
private Dictionary _drawingObjects = new Dictionary();
///
/// 地图中用户添加的标记点
///
private Dictionary _markers = new Dictionary();
///
/// POI信息显示控件
///
private BPOITipControl _bPOITipControl = new BPOITipControl();
///
/// 标记点信息编辑控件
///
private BMarkerEditorControl _bMarkerEditorControl = new BMarkerEditorControl();
///
/// 标记点信息显示控件
///
private BMarkerTipControl _bMarkerTipControl = new BMarkerTipControl();
///
/// 位置点信息显示控件
///
private BPointTipControl _bPointTipControl = new BPointTipControl();
#endregion
///
/// 构造方法
///
public MapDownloaderControl()
{
InitializeComponent();
//绘制双缓冲
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
UpdateStyles();
}
#region 重写方法
///
/// 控件加载
///
///
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
Init();
}
///
///
///
///
protected override void OnMouseDown(MouseEventArgs e)
{
base.OnMouseDown(e);
//拖拽
if (e.Button == System.Windows.Forms.MouseButtons.Left)
{
// 拖拽地图
_mouse_type = MouseType.DragMap;
_current_cursor_cache = Cursor = Cursors.SizeAll;
_previous_point_cache = e.Location;
//拖拽区域
}
//绘制区域
if (e.Button == System.Windows.Forms.MouseButtons.Right)
{
_current_drawing = new BDownloadRectangle { LeftTop = e.Location, Width = 0, Height = 0 };
_mouse_type = MouseType.DrawDownloadArea;
_current_cursor_cache = Cursor = Cursors.Cross;
_previous_point_cache = e.Location;
}
}
///
///
///
///
protected override void OnMouseMove(MouseEventArgs e)
{
base.OnMouseMove(e);
if (e.Button == System.Windows.Forms.MouseButtons.Left)
{
if (_mouse_type == MouseType.DragMap) //拖拽地图
{
int deltax = e.Location.X - _previous_point_cache.X;
int deltay = e.Location.Y - _previous_point_cache.Y;
LatLngPoint llp = MapHelper.GetLatLngByScreenLocation(new Point(ClientSize.Width / 2 - deltax, ClientSize.Height / 2 - deltay), _center, _zoom, ClientSize);
Center = llp;
_previous_point_cache = e.Location;
}
//
}
if (e.Button == System.Windows.Forms.MouseButtons.Right)
{
if (_mouse_type == MouseType.DrawDownloadArea && _current_drawing as BDownloadRectangle != null) //绘制截图矩形
{
(_current_drawing as BDownloadRectangle).Width = e.Location.X - (_current_drawing as BDownloadRectangle).LeftTop.X;
(_current_drawing as BDownloadRectangle).Height = e.Location.Y - (_current_drawing as BDownloadRectangle).LeftTop.Y;
}
}
Invalidate();
}
///
///
///
///
protected override void OnMouseUp(MouseEventArgs e)
{
base.OnMouseUp(e);
if (_mouse_type == MouseType.DragMap) //拖动地图 鼠标弹起
{
}
if (_mouse_type == MouseType.DrawDownloadArea) //绘制下载区域 弹起鼠标
{
BDownloadRectangle d = _current_drawing as BDownloadRectangle;
if (d != null)
{
LatLngPoint left_down = MapHelper.GetLatLngByScreenLocation(new Point(d.LeftTop.X, d.LeftTop.Y + d.Height), _center, _zoom, ClientSize);
LatLngPoint right_up = MapHelper.GetLatLngByScreenLocation(new Point(d.LeftTop.X + d.Width, d.LeftTop.Y), _center, _zoom, ClientSize);
using (MapDownloadDialog dlg = new MapDownloadDialog(left_down, right_up))
{
if (dlg.ShowDialog() == DialogResult.OK)
{
}
_current_drawing = null;
Invalidate();
}
}
}
_current_cursor_cache = Cursor = Cursors.Arrow;
_mouse_type = MouseType.None;
}
///
///
///
///
protected override void OnMouseWheel(MouseEventArgs e)
{
base.OnMouseWheel(e);
//缩放
int z = _zoom + e.Delta / 100;
if (z >= 3 && z <= 19)
{
LatLngPoint p = MapHelper.GetLatLngByScreenLocation(e.Location, _center, _zoom, ClientSize); //鼠标经纬度坐标
PointF pt = MapHelper.GetLocationByLatLng(p, z); //鼠标像素坐标
PointF pt_center = new PointF(pt.X + (ClientSize.Width / 2 - e.Location.X), pt.Y + (e.Location.Y - ClientSize.Height / 2)); //缩放后中心点像素坐标
LatLngPoint p_center = MapHelper.GetLatLngByLocation(pt_center, z); //像素坐标到经纬度坐标
Center = p_center;
Zoom = z;
Invalidate();
}
}
///
/// 地图重绘
///
///
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
if (!DesignMode) //所有绘制工作均在运行时发生
{
//瓦片
DrawTiles(e.Graphics);
//绘制图形
DrawDrawingObjects(e.Graphics);
//地图元素
DrawMapElements(e.Graphics);
//地图信息
DrawMapInfo(e.Graphics);
}
}
#endregion
#region 功能方法
///
/// 初始化
///
private void Init()
{
if (!DesignMode)
{
}
}
///
/// 初始化瓦片
///
private void InitializeTiles()
{
PointF center = MapHelper.GetLocationByLatLng(_center, _zoom); //中心点像素坐标
PointF left_down = new PointF(center.X - ClientSize.Width / 2, center.Y - ClientSize.Height / 2); //左下角像素坐标
PointF right_up = new PointF(center.X + ClientSize.Width / 2, center.Y + ClientSize.Height / 2); //右上角像素坐标
int tile_left_down_x = (int)Math.Floor((left_down.X) / 256); //左下角瓦片X坐标
int tile_left_down_y = (int)Math.Floor((left_down.Y) / 256); //左下角瓦片Y坐标
int tile_right_up_x = (int)Math.Floor((right_up.X) / 256); //右上角瓦片X坐标
int tile_right_up_y = (int)Math.Floor((right_up.Y) / 256); //右上角瓦片Y坐标
for (int i = tile_left_down_x; i <= tile_right_up_x; ++i)
{
for (int j = tile_left_down_y; j <= tile_right_up_y; ++j)
{
if (!_tiles.ContainsKey(_zoom + "_" + i + "_" + j))
{
_tiles.Add(_zoom + "_" + i + "_" + j, new BTile(i, j, _zoom, this, _mode, _loadmode));
}
}
}
}
///
/// 绘制瓦片
///
///
private void DrawTiles(Graphics g)
{
InitializeTiles();
foreach (KeyValuePair p in _tiles)
{
if (p.Key.StartsWith(_zoom.ToString()))
{
p.Value.Draw(g, _center, _zoom, this.ClientSize);
}
}
}
///
/// 绘制地图左下角的一些附加信息 如当前坐标、地图级别、logo、版权等
///
///
private void DrawMapInfo(Graphics g)
{
using (GraphicsPath gp = MapHelper.CreateRoundedRectanglePath(new Rectangle(10, Height - 100, 250, 90), 6))
{
using (SolidBrush sb = new SolidBrush(Color.FromArgb(180, Color.White)))
{
g.FillPath(sb, gp);
g.DrawPath(Pens.Black, gp);
using (Font f = new Font("微软雅黑", 11))
{
g.DrawString(MapHelper.GetMapModeTitle(_mode) + "," + _zoom + "级," + MapHelper.GetLoadMapModeTitle(_loadmode), f, Brushes.Teal, new PointF(20, Height - 100 + 10));
Point p = PointToClient(Cursor.Position);
if (ClientRectangle.Contains(p))
{
LatLngPoint llp = MapHelper.GetLatLngByScreenLocation(p, _center, _zoom, ClientSize); //当前鼠标经纬度
g.DrawString(Math.Round(llp.Lat, 5) + "," + Math.Round(llp.Lng, 5), f, Brushes.Teal, new PointF(20, Height - 100 + 35));
}
g.DrawString("BMap.NET 2015 by 周见智", f, Brushes.Teal, new PointF(20, Height - 100 + 60));
}
}
}
}
///
/// 绘制鼠标效果
///
///
private void DrawCursor(Graphics g)
{
Point p = PointToClient(Cursor.Position);
if (ClientRectangle.Contains(p))
{
if (_cursor_located) //鼠标定位效果
{
using (Pen pen = new Pen(Color.FromArgb(200, _mode == MapMode.Normal ? Color.Blue : Color.White), 2))
{
pen.DashStyle = DashStyle.Dash;
g.DrawLine(pen, new Point(0, p.Y), new Point(ClientSize.Width, p.Y));
g.DrawLine(pen, new Point(p.X, 0), new Point(p.X, ClientSize.Height));
}
}
if (_mouse_type == MouseType.DrawMarker) //鼠标绘制标记效果
{
Bitmap b = Properties.BMap.ico_marker;
g.DrawImage(b, new Rectangle(p.X - b.Width / 2, p.Y - b.Height, b.Width, b.Height));
}
}
}
///
/// 绘制图形
///
///
private void DrawDrawingObjects(Graphics g)
{
if (_current_drawing != null)
{
_current_drawing.Draw(g, _center, _zoom, ClientSize);
}
foreach (KeyValuePair p in _drawingObjects)
{
p.Value.Draw(g, _center, _zoom, ClientSize);
}
}
///
/// 绘制地图元素
///
///
private void DrawMapElements(Graphics g)
{
}
#endregion
#region 公开方法
///
/// 向地图中增加POI
///
///
internal void AddPlaces(List places)
{
_pois.Clear();
_bPointTipControl.Visible = false;
_bPOITipControl.Visible = false;
_bMarkerEditorControl.Visible = false;
_bMarkerTipControl.Visible = false;
foreach (BPOI poi in places)
{
_pois.Add(poi.Index.ToString(), poi);
}
Invalidate();
}
///
/// 清空地图中所有的POI
///
internal void ClearPlaces()
{
_pois.Clear();
_bPointTipControl.Visible = false;
_bPOITipControl.Visible = false;
_bMarkerEditorControl.Visible = false;
_bMarkerTipControl.Visible = false;
Invalidate();
}
///
/// 刷新瓦片,该方法会删除瓦片缓存
///
public void RefreshTitles()
{
HTTPService.MapService mapService = new HTTPService.MapService();
mapService.ClearTileCache();
_tiles.Clear();
Invalidate();
}
#endregion
#region 事件处理方法
#endregion
}
}
================================================
FILE: BMap.NET.WindowsForm/PointType.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BMap.NET.WindowsForm
{
///
/// 地图中BPoint位置点类型
///
public enum PointType
{
///
/// 路线起点
///
RouteStart,
///
/// 路线终点
///
RouteEnd,
///
/// 未知点
///
Strange
}
}
================================================
FILE: BMap.NET.WindowsForm/Properties/AssemblyInfo.cs
================================================
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("BMap.NET.WindowsForm")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BMap.NET.WindowsForm")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("2543976c-f392-488b-aeb4-f736107f5d81")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
================================================
FILE: BMap.NET.WindowsForm/Properties/BMap.Designer.cs
================================================
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.18444
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
namespace BMap.NET.WindowsForm.Properties {
using System;
///
/// A strongly-typed resource class, for looking up localized strings, etc.
///
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class BMap {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal BMap() {
}
///
/// Returns the cached ResourceManager instance used by this class.
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("BMap.NET.WindowsForm.Properties.BMap", typeof(BMap).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
///
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
///
/// Looks up a localized string similar to 中国|1||0
///黑龙江省|2|1|1
///大兴安岭地区|38|2|2
///黑河市|39|2|2
///伊春市|40|2|2
///齐齐哈尔市|41|2|2
///佳木斯市|42|2|2
///鹤岗市|43|2|2
///绥化市|44|2|2
///双鸭山市|45|2|2
///鸡西市|46|2|2
///七台河市|47|2|2
///哈尔滨市|48|2|2
///牡丹江市|49|2|2
///大庆市|50|2|2
///甘肃省|6|1|1
///嘉峪关市|33|6|2
///金昌市|34|6|2
///白银市|35|6|2
///兰州市|36|6|2
///酒泉市|37|6|2
///张掖市|117|6|2
///武威市|118|6|2
///庆阳市|135|6|2
///定西市|136|6|2
///临夏回族自治州|182|6|2
///天水市|196|6|2
///甘南藏族自治州|247|6|2
///陇南市|256|6|2
///平凉市|359|6|2
///广东省|7|1|1
///东莞市|119|7|2
///东沙群岛|120|7|2
///韶关市|137|7|2
///佛山市|138|7|2
///茂名市|139|7|2
///珠海市|140|7|2
///梅州市|141|7|2
///中山市|187|7|2
///清远市|197|7|2
/// [rest of string was truncated]";.
///
internal static string baidu_citys {
get {
return ResourceManager.GetString("baidu_citys", resourceCulture);
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_blue_point_big {
get {
object obj = ResourceManager.GetObject("ico_blue_point_big", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_blue_point_small {
get {
object obj = ResourceManager.GetObject("ico_blue_point_small", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_bybus {
get {
object obj = ResourceManager.GetObject("ico_bybus", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_bysubway {
get {
object obj = ResourceManager.GetObject("ico_bysubway", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_bytransit {
get {
object obj = ResourceManager.GetObject("ico_bytransit", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_bywalk {
get {
object obj = ResourceManager.GetObject("ico_bywalk", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_cache {
get {
object obj = ResourceManager.GetObject("ico_cache", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_cachefirst {
get {
object obj = ResourceManager.GetObject("ico_cachefirst", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_center_menu {
get {
object obj = ResourceManager.GetObject("ico_center_menu", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_circle {
get {
object obj = ResourceManager.GetObject("ico_circle", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_close {
get {
object obj = ResourceManager.GetObject("ico_close", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_cursor_locate {
get {
object obj = ResourceManager.GetObject("ico_cursor_locate", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_delete_marker {
get {
object obj = ResourceManager.GetObject("ico_delete_marker", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_destination {
get {
object obj = ResourceManager.GetObject("ico_destination", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_distance {
get {
object obj = ResourceManager.GetObject("ico_distance", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_driving_blue {
get {
object obj = ResourceManager.GetObject("ico_driving_blue", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_driving_gray {
get {
object obj = ResourceManager.GetObject("ico_driving_gray", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_eat {
get {
object obj = ResourceManager.GetObject("ico_eat", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_edit_marker {
get {
object obj = ResourceManager.GetObject("ico_edit_marker", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_end_menu {
get {
object obj = ResourceManager.GetObject("ico_end_menu", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_enlarge_menu {
get {
object obj = ResourceManager.GetObject("ico_enlarge_menu", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_exchange {
get {
object obj = ResourceManager.GetObject("ico_exchange", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_happy {
get {
object obj = ResourceManager.GetObject("ico_happy", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_hotel {
get {
object obj = ResourceManager.GetObject("ico_hotel", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_leisure {
get {
object obj = ResourceManager.GetObject("ico_leisure", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_life {
get {
object obj = ResourceManager.GetObject("ico_life", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_line {
get {
object obj = ResourceManager.GetObject("ico_line", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_location {
get {
object obj = ResourceManager.GetObject("ico_location", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_mapshot {
get {
object obj = ResourceManager.GetObject("ico_mapshot", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_marker {
get {
object obj = ResourceManager.GetObject("ico_marker", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_narrow_menu {
get {
object obj = ResourceManager.GetObject("ico_narrow_menu", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_poi_logo {
get {
object obj = ResourceManager.GetObject("ico_poi_logo", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_polygon {
get {
object obj = ResourceManager.GetObject("ico_polygon", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_rectangle {
get {
object obj = ResourceManager.GetObject("ico_rectangle", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_red_point_big {
get {
object obj = ResourceManager.GetObject("ico_red_point_big", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_red_point_small {
get {
object obj = ResourceManager.GetObject("ico_red_point_small", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_removedrawing_menu {
get {
object obj = ResourceManager.GetObject("ico_removedrawing_menu", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_removemark_menu {
get {
object obj = ResourceManager.GetObject("ico_removemark_menu", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_route_end {
get {
object obj = ResourceManager.GetObject("ico_route_end", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_route_start {
get {
object obj = ResourceManager.GetObject("ico_route_start", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_sateshot {
get {
object obj = ResourceManager.GetObject("ico_sateshot", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_screenshot {
get {
object obj = ResourceManager.GetObject("ico_screenshot", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_search {
get {
object obj = ResourceManager.GetObject("ico_search", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_search_cinema {
get {
object obj = ResourceManager.GetObject("ico_search_cinema", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_search_eat {
get {
object obj = ResourceManager.GetObject("ico_search_eat", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_search_hotel {
get {
object obj = ResourceManager.GetObject("ico_search_hotel", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_search_in_bound {
get {
object obj = ResourceManager.GetObject("ico_search_in_bound", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_select {
get {
object obj = ResourceManager.GetObject("ico_select", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_server {
get {
object obj = ResourceManager.GetObject("ico_server", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_service {
get {
object obj = ResourceManager.GetObject("ico_service", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_setmarker {
get {
object obj = ResourceManager.GetObject("ico_setmarker", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_source {
get {
object obj = ResourceManager.GetObject("ico_source", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_start_menu {
get {
object obj = ResourceManager.GetObject("ico_start_menu", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_strange_point {
get {
object obj = ResourceManager.GetObject("ico_strange_point", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_transit_blue {
get {
object obj = ResourceManager.GetObject("ico_transit_blue", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_transit_gray {
get {
object obj = ResourceManager.GetObject("ico_transit_gray", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_travel {
get {
object obj = ResourceManager.GetObject("ico_travel", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_walking_blue {
get {
object obj = ResourceManager.GetObject("ico_walking_blue", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_walking_gray {
get {
object obj = ResourceManager.GetObject("ico_walking_gray", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ico_where_menu {
get {
object obj = ResourceManager.GetObject("ico_where_menu", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}
================================================
FILE: BMap.NET.WindowsForm/Properties/BMap.resx
================================================
text/microsoft-resx
2.0
System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
..\Resources\baidu_citys.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8
..\Resources\ico_blue_point_big.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_blue_point_small.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_bybus.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_bysubway.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_bytransit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_bywalk.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_cache.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_cachefirst.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_center_menu.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_circle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_close.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_cursor_locate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_delete_marker.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_destination.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_distance.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_driving_blue.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_driving_gray.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_eat.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_edit_marker.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_end_menu.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_enlarge_menu.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_exchange.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_happy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_hotel.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_leisure.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_life.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_location.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_mapshot.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_marker.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_narrow_menu.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_poi_logo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_polygon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_rectangle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_red_point_big.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_red_point_small.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_removedrawing_menu.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_removemark_menu.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_route_end.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_route_start.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_sateshot.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_screenshot.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_search.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_search_cinema.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_search_eat.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_search_hotel.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_search_in_bound.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_select.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_server.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_service.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_setmarker.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_source.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_start_menu.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_strange_point.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_transit_blue.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_transit_gray.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_travel.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_walking_blue.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_walking_gray.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ico_where_menu.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
================================================
FILE: BMap.NET.WindowsForm/Properties/Resources.Designer.cs
================================================
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.18444
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
namespace BMap.NET.WindowsForm.Properties {
using System;
///
/// A strongly-typed resource class, for looking up localized strings, etc.
///
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
///
/// Returns the cached ResourceManager instance used by this class.
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("BMap.NET.WindowsForm.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
///
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}
================================================
FILE: BMap.NET.WindowsForm/Properties/Resources.resx
================================================
text/microsoft-resx
2.0
System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
================================================
FILE: BMap.NET.WindowsForm/Resources/baidu_citys.txt
================================================
中国|1||0
黑龙江省|2|1|1
大兴安岭地区|38|2|2
黑河市|39|2|2
伊春市|40|2|2
齐齐哈尔市|41|2|2
佳木斯市|42|2|2
鹤岗市|43|2|2
绥化市|44|2|2
双鸭山市|45|2|2
鸡西市|46|2|2
七台河市|47|2|2
哈尔滨市|48|2|2
牡丹江市|49|2|2
大庆市|50|2|2
甘肃省|6|1|1
嘉峪关市|33|6|2
金昌市|34|6|2
白银市|35|6|2
兰州市|36|6|2
酒泉市|37|6|2
张掖市|117|6|2
武威市|118|6|2
庆阳市|135|6|2
定西市|136|6|2
临夏回族自治州|182|6|2
天水市|196|6|2
甘南藏族自治州|247|6|2
陇南市|256|6|2
平凉市|359|6|2
广东省|7|1|1
东莞市|119|7|2
东沙群岛|120|7|2
韶关市|137|7|2
佛山市|138|7|2
茂名市|139|7|2
珠海市|140|7|2
梅州市|141|7|2
中山市|187|7|2
清远市|197|7|2
湛江市|198|7|2
阳江市|199|7|2
河源市|200|7|2
潮州市|201|7|2
广州市|257|7|2
云浮市|258|7|2
揭阳市|259|7|2
惠州市|301|7|2
江门市|302|7|2
汕头市|303|7|2
肇庆市|338|7|2
汕尾市|339|7|2
深圳市|340|7|2
山东省|8|1|1
莱芜市|124|8|2
枣庄市|172|8|2
日照市|173|8|2
东营市|174|8|2
威海市|175|8|2
临沂市|234|8|2
滨州市|235|8|2
青岛市|236|8|2
济宁市|286|8|2
潍坊市|287|8|2
济南市|288|8|2
泰安市|325|8|2
烟台市|326|8|2
菏泽市|353|8|2
淄博市|354|8|2
聊城市|366|8|2
德州市|372|8|2
吉林省|9|1|1
白城市|51|9|2
松原市|52|9|2
长春市|53|9|2
延边朝鲜族自治州|54|9|2
吉林市|55|9|2
四平市|56|9|2
白山市|57|9|2
通化市|165|9|2
辽源市|183|9|2
山西省|10|1|1
太原市|176|10|2
朔州市|237|10|2
晋中市|238|10|2
晋城市|290|10|2
吕梁市|327|10|2
运城市|328|10|2
大同市|355|10|2
长治市|356|10|2
阳泉市|357|10|2
忻州市|367|10|2
临汾市|368|10|2
青海省|11|1|1
海西蒙古族藏族自治州|65|11|2
西宁市|66|11|2
海北藏族自治州|67|11|2
海南藏族自治州|68|11|2
海东地区|69|11|2
黄南藏族自治州|70|11|2
玉树藏族自治州|71|11|2
果洛藏族自治州|72|11|2
新疆维吾尔自治区|12|1|1
和田地区|82|12|2
喀什地区|83|12|2
克孜勒苏柯尔克孜自治州|84|12|2
阿克苏地区|85|12|2
巴音郭楞蒙古自治州|86|12|2
博尔塔拉蒙古自治州|88|12|2
吐鲁番地区|89|12|2
伊犁哈萨克自治州|90|12|2
哈密地区|91|12|2
乌鲁木齐市|92|12|2
昌吉回族自治州|93|12|2
塔城地区|94|12|2
克拉玛依市|95|12|2
阿勒泰地区|96|12|2
阿拉尔市|731|12|2
石河子市|770|12|2
五家渠市|789|12|2
图木舒克市|792|12|2
西藏自治区|13|1|1
山南地区|97|13|2
林芝地区|98|13|2
昌都地区|99|13|2
拉萨市|100|13|2
那曲地区|101|13|2
日喀则地区|102|13|2
阿里地区|103|13|2
湖北省|15|1|1
鄂州市|122|15|2
襄阳市|156|15|2
荆州市|157|15|2
十堰市|216|15|2
荆门市|217|15|2
武汉市|218|15|2
宜昌市|270|15|2
黄冈市|271|15|2
孝感市|310|15|2
黄石市|311|15|2
咸宁市|362|15|2
随州市|371|15|2
恩施土家族苗族自治州|373|15|2
潜江市|1293|15|2
仙桃市|1713|15|2
天门市|2654|15|2
神农架林区|2734|15|2
福建省|16|1|1
南平市|133|16|2
泉州市|134|16|2
宁德市|192|16|2
龙岩市|193|16|2
厦门市|194|16|2
莆田市|195|16|2
三明市|254|16|2
漳州市|255|16|2
福州市|300|16|2
广西壮族自治区|17|1|1
桂林市|142|17|2
河池市|143|17|2
崇左市|144|17|2
钦州市|145|17|2
来宾市|202|17|2
百色市|203|17|2
防城港市|204|17|2
贺州市|260|17|2
南宁市|261|17|2
北海市|295|17|2
梧州市|304|17|2
柳州市|305|17|2
贵港市|341|17|2
玉林市|361|17|2
江苏省|18|1|1
镇江市|160|18|2
南通市|161|18|2
淮安市|162|18|2
盐城市|223|18|2
苏州市|224|18|2
泰州市|276|18|2
宿迁市|277|18|2
南京市|315|18|2
徐州市|316|18|2
无锡市|317|18|2
扬州市|346|18|2
连云港市|347|18|2
常州市|348|18|2
辽宁省|19|1|1
沈阳市|58|19|2
阜新市|59|19|2
铁岭市|60|19|2
锦州市|166|19|2
大连市|167|19|2
抚顺市|184|19|2
本溪市|227|19|2
盘锦市|228|19|2
朝阳市|280|19|2
营口市|281|19|2
丹东市|282|19|2
葫芦岛市|319|19|2
鞍山市|320|19|2
辽阳市|351|19|2
宁夏回族自治区|20|1|1
中卫市|181|20|2
固原市|246|20|2
吴忠市|322|20|2
石嘴山市|335|20|2
银川市|360|20|2
海南省|21|1|1
三亚市|121|21|2
海口市|125|21|2
定安县|1214|21|2
儋州市|1215|21|2
万宁市|1216|21|2
保亭黎族苗族自治县|1217|21|2
西沙群岛|1218|21|2
中沙群岛|1498|21|2
南沙群岛|1515|21|2
屯昌县|1641|21|2
昌江黎族自治县|1642|21|2
陵水黎族自治县|1643|21|2
五指山市|1644|21|2
琼中黎族苗族自治县|2031|21|2
乐东黎族自治县|2032|21|2
临高县|2033|21|2
琼海市|2358|21|2
白沙黎族自治县|2359|21|2
东方市|2634|21|2
澄迈县|2757|21|2
文昌市|2758|21|2
内蒙古自治区|22|1|1
呼伦贝尔市|61|22|2
兴安盟|62|22|2
锡林郭勒盟|63|22|2
通辽市|64|22|2
乌海市|123|22|2
乌兰察布市|168|22|2
巴彦淖尔市|169|22|2
包头市|229|22|2
阿拉善盟|230|22|2
鄂尔多斯市|283|22|2
赤峰市|297|22|2
呼和浩特市|321|22|2
安徽省|23|1|1
蚌埠市|126|23|2
合肥市|127|23|2
阜阳市|128|23|2
芜湖市|129|23|2
安庆市|130|23|2
亳州市|188|23|2
滁州市|189|23|2
宣城市|190|23|2
淮南市|250|23|2
巢湖市|251|23|2
黄山市|252|23|2
淮北市|253|23|2
六安市|298|23|2
池州市|299|23|2
铜陵市|337|23|2
马鞍山市|358|23|2
宿州市|370|23|2
贵州省|24|1|1
贵阳市|146|24|2
六盘水市|147|24|2
铜仁地区|205|24|2
毕节地区|206|24|2
遵义市|262|24|2
安顺市|263|24|2
黔南布依族苗族自治州|306|24|2
黔东南苗族侗族自治州|342|24|2
黔西南布依族苗族自治州|343|24|2
河北省|25|1|1
秦皇岛市|148|25|2
沧州市|149|25|2
石家庄市|150|25|2
邯郸市|151|25|2
廊坊市|191|25|2
承德市|207|25|2
衡水市|208|25|2
张家口市|264|25|2
唐山市|265|25|2
邢台市|266|25|2
保定市|307|25|2
湖南省|26|1|1
长沙市|158|26|2
衡阳市|159|26|2
常德市|219|26|2
岳阳市|220|26|2
娄底市|221|26|2
株洲市|222|26|2
益阳市|272|26|2
邵阳市|273|26|2
湘西土家族苗族自治州|274|26|2
郴州市|275|26|2
张家界市|312|26|2
湘潭市|313|26|2
永州市|314|26|2
怀化市|363|26|2
陕西省|27|1|1
渭南市|170|27|2
宝鸡市|171|27|2
榆林市|231|27|2
铜川市|232|27|2
西安市|233|27|2
延安市|284|27|2
商洛市|285|27|2
咸阳市|323|27|2
安康市|324|27|2
汉中市|352|27|2
云南省|28|1|1
昆明市|104|28|2
楚雄彝族自治州|105|28|2
玉溪市|106|28|2
红河哈尼族彝族自治州|107|28|2
普洱市|108|28|2
西双版纳傣族自治州|109|28|2
临沧市|110|28|2
大理白族自治州|111|28|2
保山市|112|28|2
怒江傈僳族自治州|113|28|2
丽江市|114|28|2
迪庆藏族自治州|115|28|2
德宏傣族景颇族自治州|116|28|2
文山壮族苗族自治州|177|28|2
曲靖市|249|28|2
昭通市|336|28|2
浙江省|29|1|1
温州市|178|29|2
杭州市|179|29|2
宁波市|180|29|2
衢州市|243|29|2
台州市|244|29|2
舟山市|245|29|2
丽水市|292|29|2
绍兴市|293|29|2
湖州市|294|29|2
金华市|333|29|2
嘉兴市|334|29|2
河南省|30|1|1
新乡市|152|30|2
洛阳市|153|30|2
商丘市|154|30|2
许昌市|155|30|2
濮阳市|209|30|2
开封市|210|30|2
焦作市|211|30|2
三门峡市|212|30|2
平顶山市|213|30|2
信阳市|214|30|2
鹤壁市|215|30|2
安阳市|267|30|2
郑州市|268|30|2
驻马店市|269|30|2
周口市|308|30|2
南阳市|309|30|2
漯河市|344|30|2
济源市|1277|30|2
江西省|31|1|1
南昌市|163|31|2
新余市|164|31|2
景德镇市|225|31|2
抚州市|226|31|2
宜春市|278|31|2
鹰潭市|279|31|2
吉安市|318|31|2
九江市|349|31|2
萍乡市|350|31|2
上饶市|364|31|2
赣州市|365|31|2
四川省|32|1|1
甘孜藏族自治州|73|32|2
德阳市|74|32|2
成都市|75|32|2
雅安市|76|32|2
眉山市|77|32|2
自贡市|78|32|2
乐山市|79|32|2
凉山彝族自治州|80|32|2
攀枝花市|81|32|2
阿坝藏族羌族自治州|185|32|2
宜宾市|186|32|2
巴中市|239|32|2
绵阳市|240|32|2
广安市|241|32|2
资阳市|242|32|2
内江市|248|32|2
南充市|291|32|2
广元市|329|32|2
遂宁市|330|32|2
泸州市|331|32|2
达州市|369|32|2
北京市|131|1|2
怀柔区|1115|131|3
通州区|1116|131|3
门头沟区|1117|131|3
西城区|1118|131|3
延庆县|1548|131|3
石景山区|1550|131|3
东城区|1551|131|3
大兴区|1552|131|3
密云县|1898|131|3
顺义区|1959|131|3
海淀区|1960|131|3
昌平区|2304|131|3
丰台区|2305|131|3
平谷区|2507|131|3
房山区|2603|131|3
朝阳区|2898|131|3
重庆市|132|1|2
奉节县|1119|132|3
开县|1120|132|3
忠县|1121|132|3
潼南县|1122|132|3
彭水苗族土家族自治县|1123|132|3
涪陵区|1124|132|3
北碚区|1125|132|3
永川区|1126|132|3
万盛区|1127|132|3
秀山土家族苗族自治县|1128|132|3
九龙坡区|1129|132|3
云阳县|1553|132|3
梁平县|1554|132|3
合川区|1555|132|3
丰都县|1556|132|3
长寿区|1557|132|3
沙坪坝区|1558|132|3
荣昌县|1559|132|3
酉阳土家族苗族自治县|1560|132|3
南川区|1561|132|3
江津区|1562|132|3
南岸区|1563|132|3
城口县|1900|132|3
万州区|1961|132|3
渝北区|1962|132|3
璧山县|1963|132|3
大足县|1964|132|3
黔江区|1965|132|3
武隆县|1966|132|3
綦江县|1967|132|3
垫江县|1968|132|3
巫溪县|1969|132|3
渝中区|1970|132|3
大渡口区|1971|132|3
石柱土家族自治县|2306|132|3
铜梁县|2307|132|3
巴南区|2308|132|3
巫山县|2523|132|3
江北区|2605|132|3
双桥区|2606|132|3
上海市|289|1|2
宝山区|1422|289|3
闵行区|1423|289|3
金山区|1514|289|3
杨浦区|1839|289|3
普陀区|1840|289|3
松江区|1841|289|3
卢湾区|1842|289|3
浦东新区|2183|289|3
长宁区|2184|289|3
奉贤区|2294|289|3
虹口区|2466|289|3
徐汇区|2467|289|3
闸北区|2694|289|3
嘉定区|2793|289|3
静安区|2826|289|3
青浦区|2892|289|3
黄浦区|2896|289|3
崇明县|2908|289|3
天津市|332|1|2
北辰区|1454|332|3
河西区|1455|332|3
蓟县|1481|332|3
宁河县|1867|332|3
红桥区|1868|332|3
和平区|1869|332|3
静海县|1870|332|3
西青区|2206|332|3
宝坻区|2207|332|3
东丽区|2481|332|3
南开区|2482|332|3
河北区|2700|332|3
津南区|2701|332|3
河东区|2827|332|3
武清区|2899|332|3
滨海新区|8336|332|3
澳门特别行政区|2911|1|2
氹仔岛|2915|2911|3
澳门半岛|2916|2911|3
路氹城|2917|2911|3
路环岛|2918|2911|3
香港特别行政区|2912|1|2
西贡区|2913|2912|3
离岛区|2914|2912|3
屯门区|2919|2912|3
元朗区|2920|2912|3
荃湾区|2921|2912|3
北区|2922|2912|3
大埔区|2923|2912|3
沙田区|2924|2912|3
葵青区|2925|2912|3
九龙城区|2926|2912|3
深水埗区|2927|2912|3
黄大仙区|2928|2912|3
南区|2929|2912|3
中西区|2930|2912|3
湾仔区|2931|2912|3
东区|2932|2912|3
观塘区|2933|2912|3
油尖旺区|2934|2912|3
台湾省|9000|1|1
桃园市|9001|9000|2
台北市|9002|9000|2
南投县|9003|9000|2
嘉义市|9004|9000|2
彰化县|9005|9000|2
新竹县|9006|9000|2
澎湖县|9007|9000|2
台东县|9008|9000|2
宜兰县|9009|9000|2
新北市|9010|9000|2
基隆市|9011|9000|2
屏东县|9012|9000|2
嘉义县|9013|9000|2
云林县|9014|9000|2
花莲县|9015|9000|2
台南市|9016|9000|2
台中市|9017|9000|2
新竹市|9018|9000|2
高雄市|9019|9000|2
苗栗县|9020|9000|2
================================================
FILE: BMap.NET.WindowsForm/RouteType.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BMap.NET.WindowsForm
{
///
/// 地图中导航路线类型
///
public enum RouteType
{
///
/// 公交
///
Transit,
///
/// 驾车
///
Driving,
///
/// 步行
///
Walking
}
}
================================================
FILE: BMap.NET.WinformDemo/BMap.NET.WinformDemo.csproj
================================================
Debug
x86
8.0.30703
2.0
{46DF801A-B0F3-4050-947E-90EB0649A31D}
WinExe
Properties
BMap.NET.WinformDemo
BMap.NET.WinformDemo
v4.0
512
x86
true
full
false
bin\Debug\
DEBUG;TRACE
prompt
4
x86
pdbonly
true
bin\Release\
TRACE
prompt
4
..\BMap.NET\libs\Newtonsoft.Json.dll
Form
MainForm.cs
MainForm.cs
ResXFileCodeGenerator
Resources.Designer.cs
Designer
True
Resources.resx
True
SettingsSingleFileGenerator
Settings.Designer.cs
True
Settings.settings
True
{1B32D6FD-3C74-40DC-9D43-102B19D40785}
BMap.NET.WindowsForm
{AFFEB71C-54B6-4A9B-A445-BB287EDBAC19}
BMap.NET
================================================
FILE: BMap.NET.WinformDemo/MainForm.Designer.cs
================================================
namespace BMap.NET.WinformDemo
{
partial class MainForm
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.bTabControl1 = new BMap.NET.WindowsForm.FunctionalControls.BTabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.bMapControl1 = new BMap.NET.WindowsForm.BMapControl();
this.bPlacesBoard1 = new BMap.NET.WindowsForm.BPlacesBoard();
this.bDirectionBoard1 = new BMap.NET.WindowsForm.BDirectionBoard();
this.bPlaceBox1 = new BMap.NET.WindowsForm.BPlaceBox();
this.button1 = new System.Windows.Forms.Button();
this.bTabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.SuspendLayout();
//
// bTabControl1
//
this.bTabControl1.Alignment = System.Windows.Forms.TabAlignment.Left;
this.bTabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.bTabControl1.Controls.Add(this.tabPage1);
this.bTabControl1.Controls.Add(this.tabPage2);
this.bTabControl1.ItemSize = new System.Drawing.Size(70, 70);
this.bTabControl1.Location = new System.Drawing.Point(0, 82);
this.bTabControl1.Multiline = true;
this.bTabControl1.Name = "bTabControl1";
this.bTabControl1.SelectedIndex = 0;
this.bTabControl1.Size = new System.Drawing.Size(389, 601);
this.bTabControl1.TabIndex = 0;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.bPlacesBoard1);
this.tabPage1.Location = new System.Drawing.Point(74, 4);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(311, 593);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "搜索";
this.tabPage1.UseVisualStyleBackColor = true;
//
// tabPage2
//
this.tabPage2.Controls.Add(this.bDirectionBoard1);
this.tabPage2.Location = new System.Drawing.Point(74, 4);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(311, 593);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "路线";
this.tabPage2.UseVisualStyleBackColor = true;
//
// bMapControl1
//
this.bMapControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.bMapControl1.BDirectionBoard = this.bDirectionBoard1;
this.bMapControl1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bMapControl1.BPlaceBox = this.bPlaceBox1;
this.bMapControl1.BPlacesBoard = this.bPlacesBoard1;
this.bMapControl1.LoadMode = BMap.NET.LoadMapMode.CacheServer;
this.bMapControl1.Location = new System.Drawing.Point(388, 83);
this.bMapControl1.Mode = BMap.NET.MapMode.Normal;
this.bMapControl1.Name = "bMapControl1";
this.bMapControl1.Size = new System.Drawing.Size(632, 599);
this.bMapControl1.TabIndex = 1;
this.bMapControl1.Zoom = 12;
//
// bPlacesBoard1
//
this.bPlacesBoard1.BDirectionBoard = this.bDirectionBoard1;
this.bPlacesBoard1.BMapControl = this.bMapControl1;
this.bPlacesBoard1.CurrentCity = null;
this.bPlacesBoard1.Dock = System.Windows.Forms.DockStyle.Fill;
this.bPlacesBoard1.Location = new System.Drawing.Point(3, 3);
this.bPlacesBoard1.Name = "bPlacesBoard1";
this.bPlacesBoard1.Size = new System.Drawing.Size(305, 587);
this.bPlacesBoard1.TabIndex = 0;
//
// bDirectionBoard1
//
this.bDirectionBoard1.BackColor = System.Drawing.Color.White;
this.bDirectionBoard1.BMapControl = this.bMapControl1;
this.bDirectionBoard1.BPlacesBoard = this.bPlacesBoard1;
this.bDirectionBoard1.CurrentCity = null;
this.bDirectionBoard1.Dock = System.Windows.Forms.DockStyle.Fill;
this.bDirectionBoard1.Location = new System.Drawing.Point(3, 3);
this.bDirectionBoard1.Name = "bDirectionBoard1";
this.bDirectionBoard1.Size = new System.Drawing.Size(305, 587);
this.bDirectionBoard1.TabIndex = 0;
//
// bPlaceBox1
//
this.bPlaceBox1.BPlacesBoard = this.bPlacesBoard1;
this.bPlaceBox1.CurrentCity = null;
this.bPlaceBox1.Enter2Search = true;
this.bPlaceBox1.InputFont = new System.Drawing.Font("Microsoft YaHei", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.bPlaceBox1.Location = new System.Drawing.Point(12, 26);
this.bPlaceBox1.Name = "bPlaceBox1";
this.bPlaceBox1.QueryText = "";
this.bPlaceBox1.Size = new System.Drawing.Size(318, 28);
this.bPlaceBox1.TabIndex = 2;
//
// button1
//
this.button1.Location = new System.Drawing.Point(336, 25);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 30);
this.button1.TabIndex = 3;
this.button1.Text = "搜索";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1021, 683);
this.Controls.Add(this.button1);
this.Controls.Add(this.bPlaceBox1);
this.Controls.Add(this.bMapControl1);
this.Controls.Add(this.bTabControl1);
this.Name = "MainForm";
this.Text = "BMap.NET Demo";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.bTabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage2.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private WindowsForm.FunctionalControls.BTabControl bTabControl1;
private System.Windows.Forms.TabPage tabPage1;
private WindowsForm.BPlacesBoard bPlacesBoard1;
private System.Windows.Forms.TabPage tabPage2;
private WindowsForm.BDirectionBoard bDirectionBoard1;
private WindowsForm.BMapControl bMapControl1;
private WindowsForm.BPlaceBox bPlaceBox1;
private System.Windows.Forms.Button button1;
}
}
================================================
FILE: BMap.NET.WinformDemo/MainForm.cs
================================================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace BMap.NET.WinformDemo
{
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
}
///
/// 点击搜索
///
///
///
private void button1_Click(object sender, EventArgs e)
{
bPlaceBox1.StartSearch();
}
}
}
================================================
FILE: BMap.NET.WinformDemo/MainForm.resx
================================================
text/microsoft-resx
2.0
System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
================================================
FILE: BMap.NET.WinformDemo/Program.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace BMap.NET.WinformDemo
{
static class Program
{
///
/// The main entry point for the application.
///
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
}
}
================================================
FILE: BMap.NET.WinformDemo/Properties/AssemblyInfo.cs
================================================
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("BMap.NET.WinformDemo")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BMap.NET.WinformDemo")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("7bcd7660-e140-43a9-a71c-997c2444f135")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
================================================
FILE: BMap.NET.WinformDemo/Properties/Resources.Designer.cs
================================================
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.18444
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
namespace BMap.NET.WinformDemo.Properties {
using System;
///
/// A strongly-typed resource class, for looking up localized strings, etc.
///
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
///
/// Returns the cached ResourceManager instance used by this class.
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("BMap.NET.WinformDemo.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
///
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}
================================================
FILE: BMap.NET.WinformDemo/Properties/Resources.resx
================================================
text/microsoft-resx
2.0
System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
================================================
FILE: BMap.NET.WinformDemo/Properties/Settings.Designer.cs
================================================
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.18444
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
namespace BMap.NET.WinformDemo.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}
================================================
FILE: BMap.NET.WinformDemo/Properties/Settings.settings
================================================
================================================
FILE: BMap.NET.WinformDemo/app.config
================================================
================================================
FILE: BMap.NET.sln
================================================
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BMap.NET", "BMap.NET\BMap.NET.csproj", "{AFFEB71C-54B6-4A9B-A445-BB287EDBAC19}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BMap.NET.WindowsForm", "BMap.NET.WindowsForm\BMap.NET.WindowsForm.csproj", "{1B32D6FD-3C74-40DC-9D43-102B19D40785}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BMap.NET.WinformDemo", "BMap.NET.WinformDemo\BMap.NET.WinformDemo.csproj", "{46DF801A-B0F3-4050-947E-90EB0649A31D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BMap.NET.DownloadDemo", "BMap.NET.DownloadDemo\BMap.NET.DownloadDemo.csproj", "{7341A85E-0A31-479A-B79E-A8A166DFD649}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{AFFEB71C-54B6-4A9B-A445-BB287EDBAC19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AFFEB71C-54B6-4A9B-A445-BB287EDBAC19}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AFFEB71C-54B6-4A9B-A445-BB287EDBAC19}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{AFFEB71C-54B6-4A9B-A445-BB287EDBAC19}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{AFFEB71C-54B6-4A9B-A445-BB287EDBAC19}.Debug|x86.ActiveCfg = Debug|Any CPU
{AFFEB71C-54B6-4A9B-A445-BB287EDBAC19}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AFFEB71C-54B6-4A9B-A445-BB287EDBAC19}.Release|Any CPU.Build.0 = Release|Any CPU
{AFFEB71C-54B6-4A9B-A445-BB287EDBAC19}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{AFFEB71C-54B6-4A9B-A445-BB287EDBAC19}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{AFFEB71C-54B6-4A9B-A445-BB287EDBAC19}.Release|x86.ActiveCfg = Release|Any CPU
{1B32D6FD-3C74-40DC-9D43-102B19D40785}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1B32D6FD-3C74-40DC-9D43-102B19D40785}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1B32D6FD-3C74-40DC-9D43-102B19D40785}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{1B32D6FD-3C74-40DC-9D43-102B19D40785}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{1B32D6FD-3C74-40DC-9D43-102B19D40785}.Debug|x86.ActiveCfg = Debug|Any CPU
{1B32D6FD-3C74-40DC-9D43-102B19D40785}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1B32D6FD-3C74-40DC-9D43-102B19D40785}.Release|Any CPU.Build.0 = Release|Any CPU
{1B32D6FD-3C74-40DC-9D43-102B19D40785}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{1B32D6FD-3C74-40DC-9D43-102B19D40785}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{1B32D6FD-3C74-40DC-9D43-102B19D40785}.Release|x86.ActiveCfg = Release|Any CPU
{46DF801A-B0F3-4050-947E-90EB0649A31D}.Debug|Any CPU.ActiveCfg = Debug|x86
{46DF801A-B0F3-4050-947E-90EB0649A31D}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{46DF801A-B0F3-4050-947E-90EB0649A31D}.Debug|Mixed Platforms.Build.0 = Debug|x86
{46DF801A-B0F3-4050-947E-90EB0649A31D}.Debug|x86.ActiveCfg = Debug|x86
{46DF801A-B0F3-4050-947E-90EB0649A31D}.Debug|x86.Build.0 = Debug|x86
{46DF801A-B0F3-4050-947E-90EB0649A31D}.Release|Any CPU.ActiveCfg = Release|x86
{46DF801A-B0F3-4050-947E-90EB0649A31D}.Release|Mixed Platforms.ActiveCfg = Release|x86
{46DF801A-B0F3-4050-947E-90EB0649A31D}.Release|Mixed Platforms.Build.0 = Release|x86
{46DF801A-B0F3-4050-947E-90EB0649A31D}.Release|x86.ActiveCfg = Release|x86
{46DF801A-B0F3-4050-947E-90EB0649A31D}.Release|x86.Build.0 = Release|x86
{7341A85E-0A31-479A-B79E-A8A166DFD649}.Debug|Any CPU.ActiveCfg = Debug|x86
{7341A85E-0A31-479A-B79E-A8A166DFD649}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{7341A85E-0A31-479A-B79E-A8A166DFD649}.Debug|Mixed Platforms.Build.0 = Debug|x86
{7341A85E-0A31-479A-B79E-A8A166DFD649}.Debug|x86.ActiveCfg = Debug|x86
{7341A85E-0A31-479A-B79E-A8A166DFD649}.Debug|x86.Build.0 = Debug|x86
{7341A85E-0A31-479A-B79E-A8A166DFD649}.Release|Any CPU.ActiveCfg = Release|x86
{7341A85E-0A31-479A-B79E-A8A166DFD649}.Release|Mixed Platforms.ActiveCfg = Release|x86
{7341A85E-0A31-479A-B79E-A8A166DFD649}.Release|Mixed Platforms.Build.0 = Release|x86
{7341A85E-0A31-479A-B79E-A8A166DFD649}.Release|x86.ActiveCfg = Release|x86
{7341A85E-0A31-479A-B79E-A8A166DFD649}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
================================================
FILE: README.md
================================================
# BMap.NET
a library for operating baidu maps,encapsulating Web Service API
with C# language,also contains a list of controls which can be used in
winform.
see more here(chinese blog): [my cnblogs][0]
---
## overview
the source code contains 3 projects: `BMap.NET`,`BMap.NET.WindowsForm` and
`BMap.NET.WinformDemo`.
- BMap.NET
encapsulates web service api, which return JObject(json.net) object.
- BMap.NET.WindowsForm
contains some controls which can be used in winform.for example:
`BMapControl` which can display baidu map, `BDirectionBoard` is responsible
for navigation, etc.
- BMap.NET.WinformDemo
a demo showing how to use controls in BMap.NET.WindowsForm.
some screenshots below:
1. autocomplete search box
![][2]
2. POIs search
![][3]
3. direction
![][4]
4. add markers and drawing
![][5]
5. search in bounds
![][6]
6. select city
![][7]
## can do and cant do
can do in **BMap.NET**:
- Search places by city, bounds, circle(nearby);
- Place suggestion;
- Geocoding;
- Direction(transit, driving, walking);
- Located by IP;
- Coordinates transofrm;
can do in **BMap.NET.WindowsForm**:
- Display Baidu Map(drag, move, zoom etc);
- Select map mode(normal, satellite, roadnet);
- Set map load mode(cache, cache_first, server);
- Drawing shapes in map;
- Measturing distance;
- Add Markers in map;
- Save map to image (screenshot by selectting a region);
- Autocomplete search box;
- Direction control;
- Places list control;
cant do:
- ~~3D map~~;
- ~~Street view~~;
- ~~Direction according to real-time traffic conditions~~;
In addition, this project is used only for Baidu map, so the `Extension ability`
is so so. you can modify the source code to meet your needs.
## how to use
`BMap.NET` is very simple to use(just some interfaces to get json data
from baidu map server).
`BMap.NET.WindowsForm` only opens 5 controls: `BPlaceBox`, `BMapControl`,
`BPlacesBoard`, `BDirectionBoard` and the `BTabControl`. you can drag them into
form desinger and set few properties to let them build associations like this:
1. BPlaceBox
![][8]
2. BPlacesBoard
![][9]
3. BMapControl
![][10]
4. BDirectionBoard
![][11]
**press F5 without any other writed codes.**
`BTabControl` is only used as a container which contains `BPlacesBoard` and
`BDirectionBoard`.
## thanks
my thanks below:
1. baidu map api documents(http://developer.baidu.com/map/index.php?title=webapi)
2. json.net(https://json.codeplex.com/)
3. json visualization(http://www.bejson.com/)
**all source code follow the [MIT][1] license.**
[0]: http://www.cnblogs.com/xiaozhi_5638/
[1]: https://zh.wikipedia.org/wiki/MIT%E8%A8%B1%E5%8F%AF%E8%AD%89
[2]: https://github.com/sherlockchou86/BMap.NET/blob/master/Asserts/B3.png
[3]: https://github.com/sherlockchou86/BMap.NET/blob/master/Asserts/B1.jpg
[4]: https://github.com/sherlockchou86/BMap.NET/blob/master/Asserts/B2.jpg
[5]: https://github.com/sherlockchou86/BMap.NET/blob/master/Asserts/B4.jpg
[6]: https://github.com/sherlockchou86/BMap.NET/blob/master/Asserts/B5.jpg
[7]: https://github.com/sherlockchou86/BMap.NET/blob/master/Asserts/B6.jpg
[8]: https://github.com/sherlockchou86/BMap.NET/blob/master/Asserts/b14.png
[9]: https://github.com/sherlockchou86/BMap.NET/blob/master/Asserts/b12.png
[10]: https://github.com/sherlockchou86/BMap.NET/blob/master/Asserts/b13.png
[11]: https://github.com/sherlockchou86/BMap.NET/blob/master/Asserts/b15.png
================================================
FILE: licences.txt
================================================
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
MITԴЭ
ȨȨ
ȨȨʹáơġϲ淢ɢȨ/ĸ
豻ӦͬȨΩ
Ȩ
ижϰȨͱ
https://github.com/sherlockchou86