本文整理汇总了C#中GMap.NET.WindowsForms.GMapMarker类的典型用法代码示例。如果您正苦于以下问题:C# GMapMarker类的具体用法?C# GMapMarker怎么用?C# GMapMarker使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GMapMarker类属于GMap.NET.WindowsForms命名空间,在下文中一共展示了GMapMarker类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:28,代码来源:PlaybackSbxjHelper.cs
示例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);
}
}
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:7,代码来源:PointOverLay.cs
示例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;
}
开发者ID:BoonieBear,项目名称:BSS,代码行数:10,代码来源:MapToolTip.cs
示例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;
}
}
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:18,代码来源:PloyLineOverLay.cs
示例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);
}
开发者ID:wrbrooks,项目名称:VB3,代码行数:16,代码来源:VBGMapOverlay.cs
示例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);
}
}
开发者ID:Feliasfogg,项目名称:HomeWorks,代码行数:27,代码来源:GmapForm.cs
示例7: MainMap_OnMarkerEnter
void MainMap_OnMarkerEnter(GMapMarker item) {
curOperation.OnMarkerEnter(item);
}
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:3,代码来源:frmMapCar.cs
示例8: myGMAP1_OnMarkerLeave
private void myGMAP1_OnMarkerLeave(GMapMarker item)
{
if (!mousedown)
onmarker = false;
}
开发者ID:hpuxionghao,项目名称:MissionPlanner,代码行数:5,代码来源:SITL.cs
示例9: MainMap_OnMarkerLeave
void MainMap_OnMarkerLeave(GMapMarker item) {
curOperation.OnMarkerLeave(item);
}
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:3,代码来源:frmMapCar.cs
示例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;
}
}
开发者ID:kkouer,项目名称:PcGcs,代码行数:12,代码来源:GCS.cs
示例11: myGMAP1_OnMarkerEnter
private void myGMAP1_OnMarkerEnter(GMapMarker item)
{
if (!mousedown)
onmarker = true;
}
开发者ID:hpuxionghao,项目名称:MissionPlanner,代码行数:5,代码来源:SITL.cs
示例12: gMapControl1_OnMarkerLeave
void gMapControl1_OnMarkerLeave(GMapMarker item)
{
CurrentGMapMarker = null;
}
开发者ID:Viousa,项目名称:MissionPlanner,代码行数:4,代码来源:FlightData.cs
示例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);
}
//.........这里部分代码省略.........
开发者ID:tatar1nro,项目名称:KKM_iMedia_Server,代码行数:101,代码来源:StatusByBanner.cs
示例14: map_OnMarkerLeave
void map_OnMarkerLeave(GMapMarker item) {
if (item.Overlay == this)
selectedMarker = null;
}
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:4,代码来源:PloyLineOverLay.cs
示例15: map_OnMarkerEnter
void map_OnMarkerEnter(GMapMarker item) {
if (item.Overlay == this)
selectedMarker = item;
}
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:4,代码来源:PloyLineOverLay.cs
示例16: AddUserMarker
public void AddUserMarker(GMapMarker marker)
{
userMarkerOverlay.Markers.Add(marker);
}
开发者ID:kr1schan,项目名称:PresenceSimulator,代码行数:4,代码来源:MapOverlayForm.cs
示例17: GetObjectData
/// <summary>
/// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"/> with the data needed to serialize the target object.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> to populate with data.</param>
/// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"/>) for this serialization.</param>
/// <exception cref="T:System.Security.SecurityException">
/// The caller does not have the required permission.
/// </exception>
public void GetObjectData(SerializationInfo info, StreamingContext context)
{
info.AddValue("Id", this.Id);
info.AddValue("IsVisible", this.IsVisibile);
GMapMarker[] markerArray = new GMapMarker[this.Markers.Count];
this.Markers.CopyTo(markerArray, 0);
info.AddValue("Markers", markerArray);
GMapRoute[] routeArray = new GMapRoute[this.Routes.Count];
this.Routes.CopyTo(routeArray, 0);
info.AddValue("Routes", routeArray);
GMapPolygon[] polygonArray = new GMapPolygon[this.Polygons.Count];
this.Polygons.CopyTo(polygonArray, 0);
info.AddValue("Polygons", polygonArray);
}
开发者ID:prathika3692,项目名称:greatmaps,代码行数:25,代码来源:GMapOverlay.cs
示例18: RemoveUserMarker
public void RemoveUserMarker(GMapMarker marker)
{
userMarkerOverlay.Markers.Remove(marker);
}
开发者ID:kr1schan,项目名称:PresenceSimulator,代码行数:4,代码来源:MapOverlayForm.cs
示例19: NavigationView_Load
private void NavigationView_Load(object sender, EventArgs e)
{
MainMap.Manager.Mode = AccessMode.CacheOnly;
PointLatLng p = new PointLatLng(0.0, 0.0);
// map center
center = new GMapMarkerCross(MainMap.Position);
objects.Markers.Add(center);
MainMap.Position = p;
NodeMarker = new UserMarker(p);
NodeMarker.IsHitTestVisible = true;
objects.Markers.Add(NodeMarker);
NodeMarker.ToolTip = new MapToolTip(NodeMarker);
NodeMarker.ToolTipMode = MarkerTooltipMode.Always;
PointLatLng gpspos = NodeMarker.Position;
string lngstr, latstr;
if (gpspos.Lng > 0)
lngstr = gpspos.Lng.ToString("F06") + " E";
else
lngstr = (-gpspos.Lng).ToString("F06") + " W";
if (gpspos.Lat > 0)
latstr = gpspos.Lat.ToString("F06") + " N";
else
latstr = (-gpspos.Lat).ToString("F06") + " S";
NodeMarker.ToolTipText = "GPS\r\n经度=" + lngstr + "\r\n纬度=" + latstr;
MainMap.MapType = MapType.None;
MainMap.MinZoom = 1;
MainMap.MaxZoom = 18;
MainMap.Zoom = 15;
MainMap.MapName = MapTitle;
ShowTrack.PerformClick();
AutoTrack.PerformClick();
}
开发者ID:BoonieBear,项目名称:BSS,代码行数:34,代码来源:NavigationView.cs
示例20: gmap_OnMarkerClick
private void gmap_OnMarkerClick(GMapMarker item, MouseEventArgs e)
{
Process.Start(item.ToolTipText); // Open up the article
// Search the list of FeedMarkers for this article
}
开发者ID:shank8,项目名称:CPTS-323,代码行数:6,代码来源:MapView.cs
注:本文中的GMap.NET.WindowsForms.GMapMarker类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论