本文整理汇总了C#中GMap.NET.WindowsForms.GMapMarker类的典型用法代码示例。如果您正苦于以下问题:C# GMapMarker类的具体用法?C# GMapMarker怎么用?C# GMapMarker使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GMapMarker类属于GMap.NET.WindowsForms命名空间,在下文中一共展示了GMapMarker类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PlaybackSbxjHelper
public PlaybackSbxjHelper(RMap map,IContainer c) {
_map = map;
playOverlay = map.FindOverlay("play");
if (playOverlay == null) {
playOverlay = new GMapOverlay(map, "play");
map.Overlays.Add(playOverlay);
playRoute = new GMapRoute(new List<GMap.NET.PointLatLng>(), "play");
playRoute.Stroke.Color = Color.Red;
playRoute.Stroke.Width = 3;
playOverlay.Routes.Add(playRoute);
}
car = new GMapMarkerGoogleGreen(new GMap.NET.PointLatLng(0, 0));
car.ToolTipMode = MarkerTooltipMode.Always;
car.ToolTipText = "man";
car.ToolTip.Format.Alignment = StringAlignment.Near;
playOverlay.Markers.Add(car);
queue_pos = new Queue<gps_position>();
dataTimer = new Timer();
dataTimer.Tick += new EventHandler(dataTimer_Tick);
dataTimer.Interval = 1;
playTimer = new Timer();
playTimer.Tick += new EventHandler(playTimer_Tick);
playTimer.Interval = 1000;
}
示例2: OnMarkerChanged
public virtual void OnMarkerChanged(GMapMarker marker) {
GMapMarkerVector markerv = marker as GMapMarkerVector;
if (markerv.Polygon != null) {
markerv.Polygon.UpdateRoutePostion(markerv);
control.UpdatePolygonLocalPosition(markerv.Polygon);
}
}
示例3: MapToolTip
public MapToolTip(GMapMarker marker)
: base(marker)
{
Stroke = new Pen(Color.FromArgb(120, Color.Black));
Stroke.Width = 1;
this.Stroke.LineJoin = LineJoin.Round;
this.Stroke.StartCap = LineCap.RoundAnchor;
Fill = Brushes.Azure;
Foreground = Brushes.Black;
}
示例4: Update
/// <summary>
/// 更新数据库
/// </summary>
/// <param name="marker"></param>
public void Update(GMapMarker marker) {
if (iobusy) return;
GMapMarkerPoint p = marker as GMapMarkerPoint;
if (p != null && p.Polygon!=null && p.Polygon.Tag is TX_Polygon) {
iobusy = true;
try {
(p.Polygon.Tag as TX_Polygon).Points = pointstostring();
Client.ClientHelper.PlatformSqlMap.Update<TX_Polygon>(p.Polygon.Tag);
} catch { }
iobusy = false;
}
}
示例5: DrawToolTip
protected override void DrawToolTip(Graphics g, GMapMarker m, int x, int y)
{
GraphicsState s = g.Save();
g.SmoothingMode = SmoothingMode.AntiAlias;
System.Drawing.Size st = g.MeasureString(m.ToolTipText, TooltipFont).ToSize();
System.Drawing.Rectangle rect = new System.Drawing.Rectangle(x, y, st.Width + Control.TooltipTextPadding.Width, st.Height + Control.TooltipTextPadding.Height);
rect.Offset(m.ToolTipOffset.X, m.ToolTipOffset.Y);
g.DrawLine(TooltipPen, x, y, rect.X + rect.Width / 2, rect.Y + rect.Height / 2);
g.FillRectangle(TooltipBackground, rect);
g.DrawRectangle(TooltipPen, rect);
g.DrawString(m.ToolTipText, TooltipFont, Brushes.Navy, rect, TooltipFormat);
g.Restore(s);
}
示例6: GMapControl1OnOnMarkerClick
/// <summary>
/// show info form about exchanger
/// </summary>
/// <param name="item"></param>
/// <param name="mouseEventArgs"></param>
private void GMapControl1OnOnMarkerClick(GMapMarker item, MouseEventArgs mouseEventArgs) {
try {
if(item.Tag == null) {
throw new ArgumentNullException("CurrencyExchanger.Id is null");
}
//костыль, когда я подсвечиваю маркер синим в findNearestToolStripMenuItem_Click,
//я по сути не меняю цвет маркера(ненашел как, маразм честно говоря иметь возможность поставить маркер но неиметь возхможности изменить цвет)
//а доабвляю новый слой с маркером поверх старого,
//потому при нажатии на него выскакивло две формочки INFO, и был поставлен костыль, который проверяет не входит ли синий маркер в
//первый массив маркеров, а он не входит.
if(!objMarkersOverlay.Markers.Contains(item)) return;
var objInfoForm = new InfoForm((int)item.Tag);
objInfoForm.ShowDialog();
UpdateMarkers();
}
catch(Exception ex) {
MessageBox.Show(ex.Message);
}
}
示例7: MainMap_OnMarkerEnter
void MainMap_OnMarkerEnter(GMapMarker item) {
curOperation.OnMarkerEnter(item);
}
示例8: myGMAP1_OnMarkerLeave
private void myGMAP1_OnMarkerLeave(GMapMarker item)
{
if (!mousedown)
onmarker = false;
}
示例9: MainMap_OnMarkerLeave
void MainMap_OnMarkerLeave(GMapMarker item) {
curOperation.OnMarkerLeave(item);
}
示例10: groupmarkeradd
void groupmarkeradd(GMapMarker marker)
{
groupmarkers.Add(int.Parse(marker.Tag.ToString()));
if (marker is GMapMarkerWP)
{
((GMapMarkerWP)marker).selected = true;
}
if (marker is GMapMarkerRect)
{
((GMapMarkerWP)((GMapMarkerRect)marker).InnerMarker).selected = true;
}
}
示例11: myGMAP1_OnMarkerEnter
private void myGMAP1_OnMarkerEnter(GMapMarker item)
{
if (!mousedown)
onmarker = true;
}
示例12: gMapControl1_OnMarkerLeave
void gMapControl1_OnMarkerLeave(GMapMarker item)
{
CurrentGMapMarker = null;
}
示例13: gmap_OnMarkerClick
private void gmap_OnMarkerClick(GMapMarker item, MouseEventArgs e)
{
Cursor.Current = Cursors.WaitCursor;
this.pictureBox1.Image = null;
this.groupBox1.Visible = true;
PointD p = (PointD)item.Tag;
this.pt = p;
try
{
if (isInMeta(p.code))
{
foreach (MetaD m in meta)
{
if (m.code.Equals(p.code))
{
this.tTime.Text = Global.GetTime(m.time);
this.tWho.Text = m.uin;
// Image newImage;
// byte[] imageData = this.getImage(m.id);
// using (MemoryStream ms = new MemoryStream(imageData, 0, imageData.Length))
// {
// ms.Write(imageData, 0, imageData.Length);
// newImage = Image.FromStream(ms, true);
// }
//pictureBox1.Image = newImage;
var request = WebRequest.Create("http://imedia.tatar1n.org/img.php?id=" + m.id + "&base=" + Global.baseSQL + "");
using (var response = request.GetResponse())
using (var stream = response.GetResponseStream())
{
pictureBox1.Image = Bitmap.FromStream(stream);
}
}
}
}
else if (isInPass(p.code))
{
foreach (PassD m in pass)
{
if (m.code.Equals(p.code))
{
this.tTime.Text = Global.GetTime(m.time);
this.tWho.Text = "";
Image newImage;
string pId = this.getImagePass(m.code, m.banner);
var request = WebRequest.Create("http://imedia.tatar1n.org/img.php?id=" + pId + "&base=" + Global.baseSQL + "");
using (var response = request.GetResponse())
using (var stream = response.GetResponseStream())
{
pictureBox1.Image = Bitmap.FromStream(stream);
}
}
}
}
else
{
this.tTime.Text = "";
this.tWho.Text = "";
}
}
catch (Exception) { }
this.tCode.Text = p.code;
this.tAdress.Text = "ул. " + p.street + " д. " + p.house + " п. " + p.porch;
int s = getStatus(p.code);
if (s == 0)
{
this.tStatus.Text = "Установка";
this.tMessage.Text = "Баннер установлен!";
}
else if (s == 1)
{
foreach (SmsD m in sms)
if (m.code.Equals(p.code))
{
this.tStatus.Text = "Поломка";
this.tMessage.Text = Global.getSms(m.msg);
this.tTime.Text = Global.GetTime(m.time);
}
}
else if (s == 2)
{
foreach (PassD ms in pass)
if (ms.code.Equals(p.code))
{
this.tStatus.Text = "Пропуск";
this.tMessage.Text = Global.getPass(ms.banner);
this.tTime.Text = Global.GetTime(ms.time);
}
//.........这里部分代码省略.........
示例14: map_OnMarkerLeave
void map_OnMarkerLeave(GMapMarker item) {
if (item.Overlay == this)
selectedMarker = null;
}
示例15: map_OnMarkerEnter
void map_OnMarkerEnter(GMapMarker item) {
if (item.Overlay == this)
selectedMarker = item;
}