本文整理汇总了C#中GMap.NET.WindowsForms.GMapOverlay类的典型用法代码示例。如果您正苦于以下问题:C# GMapOverlay类的具体用法?C# GMapOverlay怎么用?C# GMapOverlay使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GMapOverlay类属于GMap.NET.WindowsForms命名空间,在下文中一共展示了GMapOverlay类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: DrawMarkers
public void DrawMarkers()
{
int i002 = 0;
int i003 = 0;
int i004 = 0;
if (points.Count == 0)
{
MessageBox.Show("У маршрута несуществует точек.");
return;
}
overlayOne = new GMapOverlay(gmap, "OverlayOne");
foreach (PointD p in points)
{
int s = getStatus(p.code);
if (s == 0)
{
i002++;
GMapCustomImageMarker a = new GMapCustomImageMarker(new PointLatLng(p.getx(), p.gety()));
a.Tag = p;
overlayOne.Markers.Add(a);
}
if (s == 1)
{
i004++;
GMapCustomImageMarkerRed a = new GMapCustomImageMarkerRed(new PointLatLng(p.getx(), p.gety()));
a.Tag = p;
overlayOne.Markers.Add(a);
}
if (s == 2)
{
i003++;
GMapCustomImageMarkerYellow a = new GMapCustomImageMarkerYellow(new PointLatLng(p.getx(), p.gety()));
a.Tag = p;
overlayOne.Markers.Add(a);
}
if (s == 3)
{
GMapCustomImageMarkerBlue a = new GMapCustomImageMarkerBlue(new PointLatLng(p.getx(), p.gety()));
a.Tag = p;
overlayOne.Markers.Add(a);
}
}
setStatusCount(i002, i003, i004);
DrawRoute();
gmap.Overlays.Clear();
gmap.Overlays.Add(overlayOne);
}
开发者ID:tatar1nro,项目名称:KKM_iMedia_Server,代码行数:53,代码来源:StatusByBanner.cs
示例2: 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
示例3: addPIN
private void addPIN(PointLatLng point)
{
GMapOverlay markersOverlay = new GMapOverlay(gmap, "marker");
this.marker = new GMapMarkerGoogleRed(point);
markersOverlay.Markers.Add(marker);
gmap.Overlays.Add(markersOverlay);
marker.ToolTipText = this.article.mLink;
marker.ToolTipMode = MarkerTooltipMode.Never;
}
开发者ID:shank8,项目名称:CPTS-323,代码行数:10,代码来源:FeedMarker.cs
示例4: cbContrib_CheckedChanged
private void cbContrib_CheckedChanged(object sender, EventArgs e)
{
DataTable dtMapPin = new DataTable();
BusinessLayer.MapPin MapList = new BusinessLayer.MapPin();
int t = 1;
dtMapPin = MapList.getMapPinByType(t);
GMapOverlay mark = new GMapOverlay(gMapControl1, "mark");
if (cbContrib.Checked)
{
for (int j = 0; j < dtMapPin.Rows.Count; j++)
{
int m = Convert.ToInt32(dtMapPin.Rows[j]["CategoryID"]);
if (m == 2)
{
double x = Convert.ToDouble(dtMapPin.Rows[j]["XLOC"]);
double y = Convert.ToDouble(dtMapPin.Rows[j]["YLOC"]);
mark.Markers.Add(new GMap.NET.WindowsForms.Markers.GMapMarkerGoogleRed(new PointLatLng(x, y)));
}
//tell the map to add the overlay
gMapControl1.Overlays.Add(mark);
}
}
else
{
gMapControl1.Overlays.Clear();
}
}
开发者ID:BabbageCodeMonkey,项目名称:CMAS,代码行数:35,代码来源:Map.cs
示例5: SITL
public SITL()
{
InitializeComponent();
if (!Directory.Exists(sitldirectory))
Directory.CreateDirectory(sitldirectory);
homemarker.Position = MainV2.comPort.MAV.cs.HomeLocation;
myGMAP1.Position = homemarker.Position;
myGMAP1.MapProvider = GCSViews.FlightData.mymap.MapProvider;
myGMAP1.MaxZoom = 22;
myGMAP1.Zoom = 16;
myGMAP1.DisableFocusOnMouseEnter = true;
markeroverlay = new GMapOverlay("markers");
myGMAP1.Overlays.Add(markeroverlay);
markeroverlay.Markers.Add(homemarker);
myGMAP1.Invalidate();
try
{
if (simulator != null)
simulator.Kill();
}
catch { }
Utilities.ThemeManager.ApplyThemeTo(this);
MissionPlanner.Utilities.Tracking.AddPage(this.GetType().ToString(), this.Text);
}
开发者ID:kkouer,项目名称:PcGcs,代码行数:34,代码来源:SITL.cs
示例6: Build_Prediction_Marker
public void Build_Prediction_Marker(PointLatLng Base_Position, string ACID, MySqlProvider.PredictionTableNumberType Table_Type, ref GMapOverlay Overlay)
{
MySqlProvider SqlProvider = new MySqlProvider();
System.Collections.Generic.List<MySqlProvider.PredictionDataSetOneRow> Record = SqlProvider.GetOneRecordPerTimeAndACID(Table_Type, SharedData.LookAheadTime, ACID, false);
// If prediction data for the given parameters exists
// then lets add it to the display list.
if (Record.Count > 0)
{
GeoCordSystemDegMinSecUtilities.LatLongClass P_Pont = new GeoCordSystemDegMinSecUtilities.LatLongClass(double.Parse(Record[0].Lat), double.Parse(Record[0].Lon));
PointLatLng PredictedPoint = new PointLatLng(P_Pont.GetLatLongDecimal().LatitudeDecimal, P_Pont.GetLatLongDecimal().LongitudeDecimal);
PredictionMarker PM;
string label = Record[0].ACID + "\n" + Record[0].Time.ToShortTimeString();
switch (Table_Type)
{
case MySqlProvider.PredictionTableNumberType.One:
PM = new PredictionMarker(Base_Position, Color.Magenta, PredictedPoint, label);
Overlay.Markers.Add(PM);
break;
case MySqlProvider.PredictionTableNumberType.Two:
PM = new PredictionMarker(Base_Position, Color.Blue, PredictedPoint, label);
Overlay.Markers.Add(PM);
break;
case MySqlProvider.PredictionTableNumberType.Three:
PM = new PredictionMarker(Base_Position, Color.Orange, PredictedPoint, label);
Overlay.Markers.Add(PM);
break;
}
}
}
开发者ID:akapetanovic,项目名称:MUAC,代码行数:33,代码来源:PredictionBuilder.cs
示例7: GridUIv2
public GridUIv2(GridPluginv2 plugin)
{
this.plugin = plugin;
InitializeComponent();
map.MapProvider = plugin.Host.FDMapType;
map.Position = plugin.Host.FPMenuMapPosition;
map.Zoom = 16;
layerpolygons = new GMapOverlay( "polygons");
map.Overlays.Add(layerpolygons);
plugin.Host.FPDrawnPolygon.Points.ForEach(x => { list.Add(x); });
num_overlap = 50;
num_sidelap = 60;
NUM_altitude.Value = 50;
// set and angle that is good
NUM_angle.Value = (decimal)((getAngleOfLongestSide(list) + 360) % 360);
}
开发者ID:duyisu,项目名称:MissionPlanner,代码行数:25,代码来源:GridUIv2.cs
示例8: Build
public static void Build(ref GMapOverlay OverlayOut)
{
// Here loop through defined sectors and display them on the map
foreach (SystemAdaptationDataSet.SectorBorder Sector in SystemAdaptationDataSet.SectorBorderDataSet)
{
System.Collections.Generic.List<PointLatLng> SectorPointList = new System.Collections.Generic.List<PointLatLng>();
foreach (GeoCordSystemDegMinSecUtilities.LatLongClass SectorPoint in Sector.SectorBorderPoints)
{
SectorPointList.Add(new PointLatLng(SectorPoint.GetLatLongDecimal().LatitudeDecimal, SectorPoint.GetLatLongDecimal().LongitudeDecimal));
}
// Get sector border display attributes
DisplayAttributes.DisplayAttributesType SectorBorderDisplayAttribute = DisplayAttributes.GetDisplayAttribute(DisplayAttributes.DisplayItemsType.SectorBorder);
GMapPolygon SectorPolygon = new GMapPolygon(SectorPointList, Sector.SectorName);
SectorPolygon.Stroke = new Pen(SectorBorderDisplayAttribute.LineColor, SectorBorderDisplayAttribute.LineWidth);
Type brushType = typeof(Brushes);
Brush myBrush = (Brush)brushType.InvokeMember(SectorBorderDisplayAttribute.AreaPolygonColor.Name,
BindingFlags.Public | BindingFlags.Static | BindingFlags.GetProperty,
null, null, new object[] { });
SectorPolygon.Fill = myBrush;
OverlayOut.Polygons.Add(SectorPolygon);
}
}
开发者ID:akapetanovic,项目名称:ASTERIX-ANALYSER-and-DATA-DISPLAY,代码行数:28,代码来源:SectorBorderDisplay.cs
示例9: MainForm
public MainForm()
{
InitializeComponent();
if(!DesignMode)
{
try
{
System.Net.IPHostEntry e = System.Net.Dns.GetHostEntry("www.bing.com");
}
catch
{
mapControl.Manager.Mode = AccessMode.CacheOnly;
MessageBox.Show("No internet connection avaible, going to CacheOnly mode.", "GMap.NET - CloudsDemo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
mapControl.MapProvider = GMapProviders.BingSatelliteMap;
mapControl.OnMapZoomChanged += new MapZoomChanged(mapControl_OnMapZoomChanged);
mainOverlay = new GMapOverlay("top");
mapControl.Overlays.Add(mainOverlay);
clouds = new GMapImage(gtl);
clouds.Image = Properties.Resources.USOverlay;
mainOverlay.Markers.Add(clouds);
}
}
开发者ID:skarlath,项目名称:spaceapps_MIAMI,代码行数:27,代码来源:MainForm.cs
示例10: NavigationView
private double R = 6378137; // WGS-84;
public NavigationView(MainForm mainForm)
{
mf = mainForm;
InitializeComponent();
mainOverlay = new GMapOverlay(MainMap, "map");
MainMap.Overlays.Add(mainOverlay);
//routes = new GMapOverlay(MainMap, "routes");
//MainMap.Overlays.Add(routes);
Net = new GMapOverlay(MainMap, "net");
MainMap.Overlays.Add(Net);
track = new GMapOverlay(MainMap, "polygons");
MainMap.Overlays.Add(track);
objects = new GMapOverlay(MainMap, "objects");
MainMap.Overlays.Add(objects);
rulers = new GMapOverlay(MainMap, "rulers");
MainMap.Overlays.Add(rulers);
DistanceInfo = new GMapOverlay(MainMap, "DistanceInfo");
MainMap.Overlays.Add(DistanceInfo);
infolayers = new GMapOverlay(MainMap, "Info");
MainMap.Overlays.Add(infolayers);
WebNodeLayer = new GMapOverlay(MainMap, "webnode");
MainMap.Overlays.Add(WebNodeLayer);
g = MainMap.CreateGraphics();
}
开发者ID:BoonieBear,项目名称:BSS,代码行数:34,代码来源:NavigationView.cs
示例11: OperationTj
public OperationTj(RMap mapcontrol)
: base(mapcontrol) {
routes = new GMapOverlay(mapcontrol, "qytj");
routes.Markers.CollectionChanged += new GMap.NET.ObjectModel.NotifyCollectionChangedEventHandler(Markers_CollectionChanged);
mapcontrol.Overlays.Add(routes);
}
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:7,代码来源:OperationTj.cs
示例12: Build
public static void Build(ref GMapOverlay OverlayOut)
{
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Display defined radars
//
string FileName = @"C:\ASTERIX\IMAGES\waypoint.jpg";
Image WaypointImage = Image.FromFile(FileName);
DisplayAttributes.DisplayAttributesType WaypointDisplayAttribute = DisplayAttributes.GetDisplayAttribute(DisplayAttributes.DisplayItemsType.Waypoint);
WaypointImage = GraphicUtilities.ResizeImage(WaypointImage, new Size(WaypointDisplayAttribute.ImageSize.Width, WaypointDisplayAttribute.ImageSize.Height), false);
// Here loop through defined waypoints and display them on the map
foreach (SystemAdaptationDataSet.Waypoint Waypoint in SystemAdaptationDataSet.WaypointDataSet)
{
// Image properties
GMapMarkerImage MyMarkerImage =
new GMapMarkerImage(new PointLatLng(Waypoint.WaypointPosition.GetLatLongDecimal().LatitudeDecimal, Waypoint.WaypointPosition.GetLatLongDecimal().LongitudeDecimal), WaypointImage);
MyMarkerImage.ToolTipMode = MarkerTooltipMode.Never;
System.Drawing.SolidBrush myBrush;
myBrush = new System.Drawing.SolidBrush(WaypointDisplayAttribute.TextColor);
WaypointMarker WPT_Marker = new WaypointMarker(new PointLatLng(Waypoint.WaypointPosition.GetLatLongDecimal().LatitudeDecimal, Waypoint.WaypointPosition.GetLatLongDecimal().LongitudeDecimal), Waypoint.WaypointName,
new Font(WaypointDisplayAttribute.TextFont, WaypointDisplayAttribute.TextSize, FontStyle.Regular, GraphicsUnit.Pixel), myBrush);
// Load marker to overlay
OverlayOut.Markers.Add(MyMarkerImage);
OverlayOut.Markers.Add(WPT_Marker);
}
}
开发者ID:akapetanovic,项目名称:ASTERIX-ANALYSER-and-DATA-DISPLAY,代码行数:30,代码来源:WaypointDisplay.cs
示例13: Georefimage
public Georefimage()
{
InitializeComponent();
CHECK_AMSLAlt_Use.Checked = true;
PANEL_TIME_OFFSET.Enabled = false;
useAMSLAlt = CHECK_AMSLAlt_Use.Checked;
JXL_StationIDs = new List<int>();
selectedProcessingMode = PROCESSING_MODE.CAM_MSG;
MissionPlanner.Utilities.Tracking.AddPage(this.GetType().ToString(), this.Text);
myGMAP1.MapProvider = MainV2.instance.FlightData.gMapControl1.MapProvider;
myGMAP1.MinZoom = MainV2.instance.FlightData.gMapControl1.MinZoom;
myGMAP1.MaxZoom = MainV2.instance.FlightData.gMapControl1.MaxZoom;
GMapOverlay overlay = new GMapOverlay();
myGMAP1.Overlays.Add(overlay);
myGMAP1.OnMarkerClick += MyGMAP1_OnMarkerClick;
}
开发者ID:ArduPilot,项目名称:MissionPlanner,代码行数:25,代码来源:georefimage.cs
示例14: buttonShowAllDepartments_Click
private void buttonShowAllDepartments_Click(object sender, EventArgs e)
{
gMapControl1.Overlays.Clear();
foreach (var c in Program.banksSystem.Department)
{
//Создание маркера
GMapOverlay markersOverlay = new GMapOverlay(c.Bank1.Id.ToString());
GMarkerGoogle marker = new GMarkerGoogle(new PointLatLng(c.Сoordinate_y, c.Сoordinate_x), GMarkerGoogleType.green);
//Добавляем описание
marker.ToolTip = new GMapRoundedToolTip(marker);
marker.ToolTipText = c.Bank1.Name + "\n" + c.Name + "\n" + c.Address + "\n" + c.Phone + "\n";
var departmentCurrencies = (from depCurr in Program.banksSystem.DeprtmentsСurrencies
join curr in Program.banksSystem.Сurrency on depCurr.Сurrency equals curr
where depCurr.Department == c.Id
select new
{
Currency = curr.Name,
Buy = depCurr.Buy,
Sell = depCurr.Sell
}).ToList();
foreach (var cur in departmentCurrencies)
{
marker.ToolTipText += cur.Currency + " " + cur.Buy + " " + cur.Sell + "\n";
}
//Добавляем на карту
markersOverlay.Markers.Add(marker);
gMapControl1.Overlays.Add(markersOverlay);
//fix ставим на правильное место
gMapControl1.Position = gMapControl1.Position;
}
}
开发者ID:irinalesina,项目名称:ITStepProjects,代码行数:31,代码来源:Form1.cs
示例15: frmMapCar95
public frmMapCar95() {
InitializeComponent();
barButtonItem11.Alignment = DevExpress.XtraBars.BarItemLinkAlignment.Right;
btFullScrean.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
barSubItem1.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
rMap1 = new RMap();
rMap1.MouseWheelZoomType = MouseWheelZoomType.MousePositionWithoutCenter;
rMap1.Dock = DockStyle.Fill;
Controls.Add(rMap1);
mapview = rMap1;
rMap1.Manager.Mode = GMap.NET.AccessMode.ServerOnly;
GoogleChinaMap map = GoogleChinaMap.Instance;
map.TryCorrectVersion = false;
rMap1.MapProvider = map;
//rMap1.Position = new PointLatLng(46.6, 130);
rMap1.MaxZoom = 16;
rMap1.MinZoom = 9;
mapServer = ClientServer.PlatformServer.GetService<TONLI.MapCore.IMapServer>();
objects = new GMapOverlay(rMap1, "objects");
routes = new GMapOverlay(rMap1, "LineCode");
rMap1.Overlays.Add(routes);
rMap1.Overlays.Add(objects);
routes.Markers.CollectionChanged += new GMap.NET.ObjectModel.NotifyCollectionChangedEventHandler(Markers_CollectionChanged);
oInstances = new OperationInstances(rMap1);
curOperation = oInstances.LineOperation;
curOperation.CanEditMarker = true;
rMap1.OnMapZoomChanged += new MapZoomChanged(rMap1_OnMapZoomChanged);
rMap1.MouseEnter += new EventHandler(rMap1_MouseEnter);
rMap1.MouseMove += new MouseEventHandler(rMap1_MouseMove);
rMap1.MouseMove += new MouseEventHandler(MainMap_MouseMove);
rMap1.MouseDown += new MouseEventHandler(MainMap_MouseDown);
rMap1.MouseUp += new MouseEventHandler(MainMap_MouseUp);
rMap1.OnMarkerEnter += new MarkerEnter(MainMap_OnMarkerEnter);
rMap1.OnMarkerLeave += new MarkerLeave(MainMap_OnMarkerLeave);
rMap1.OnTileLoadStart += new TileLoadStart(MainMap_OnTileLoadStart);
rMap1.OnTileLoadComplete += new TileLoadComplete(MainMap_OnTileLoadComplete);
barButtonItem10.ButtonStyle = DevExpress.XtraBars.BarButtonStyle.Check;
barButtonItem10.AllowAllUp = true;
barButtonItem4.ButtonStyle = DevExpress.XtraBars.BarButtonStyle.Check;
barButtonItem4.DownChanged += new DevExpress.XtraBars.ItemClickEventHandler(测距_DownChanged);
barButtonItem10.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
//加载设备列表
ucLayerCar = new UCLayerCar();
ucLayerCar.Dock = DockStyle.Fill;
dockPanel1_Container.Controls.Add(ucLayerCar);
bxdh = new UCPJ_21gzbxdh();
bxdh.Dock = DockStyle.Fill;
dockPanel2_Container.Controls.Add(bxdh);
bxdh.OnBeginLocation += new ObjectEventHandler<PJ_21gzbxdh>(OnBeginLocation);
bxdh.OnTQLocation += new ObjectEventHandler<PJ_21gzbxdh>(bxdh_OnTQLocation);
this.WindowState = FormWindowState.Maximized;
btGzdj.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
}
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:60,代码来源:frmMapCar95.cs
示例16: gMapControl1_Load_1
private void gMapControl1_Load_1(object sender, EventArgs e)
{
//Set the map provider
gMapControl1.MapProvider = GMap.NET.MapProviders.OpenStreetMapProvider.Instance;
//Set the map center
gMapControl1.Position = new GMap.NET.PointLatLng(41.7149567, -71.4167);
//Create an Overlay to hold marks
GMapOverlay mark = new GMapOverlay(gMapControl1, "mark");
//add the marks
//this needs to populate marks for all the tags
mark.Markers.Add(new GMap.NET.WindowsForms.Markers.GMapMarkerGoogleGreen(new PointLatLng(41.7149967, -71.369163)));
mark.Markers.Add(new GMap.NET.WindowsForms.Markers.GMapMarkerGoogleRed(new PointLatLng(41.7149967, -71.379163)));
//tell the map to add the overlay
gMapControl1.Overlays.Add(mark);
//set the settings for the map
gMapControl1.MinZoom = 1;
gMapControl1.MaxZoom = 17;
gMapControl1.Zoom = 13;
gMapControl1.Dock = DockStyle.Fill;
}
开发者ID:BabbageCodeMonkey,项目名称:CMAS,代码行数:25,代码来源:Map.cs
示例17: Optimize
public static List<FortData> Optimize(FortData[] pokeStops, LatLong latlng, GMapOverlay routeOverlay)
{
List<FortData> optimizedRoute = new List<FortData>(pokeStops);
// NN
FortData NN = FindNN(optimizedRoute, latlng.Latitude, latlng.Longitude);
optimizedRoute.Remove(NN);
optimizedRoute.Insert(0, NN);
for (int i = 1; i < pokeStops.Length; i++)
{
NN = FindNN(optimizedRoute.Skip(i), NN.Latitude, NN.Longitude);
optimizedRoute.Remove(NN);
optimizedRoute.Insert(i, NN);
Visualize(optimizedRoute, routeOverlay);
}
// 2-Opt
bool isOptimized;
do
{
optimizedRoute = Optimize2Opt(optimizedRoute, out isOptimized);
Visualize(optimizedRoute, routeOverlay);
}
while (isOptimized);
return optimizedRoute;
}
开发者ID:CaptDreamer,项目名称:Pokemon-Go-Rocket-API,代码行数:27,代码来源:RouteOptimizer.cs
示例18: OverlayProcessor
public OverlayProcessor(ref Map control, ref GridDataSetManager PointManager)
{
Control = control;
GDSM = PointManager;
Layers = new List<Bitmap>();
mainOverlay = new GMapOverlay();
Control.Overlays.Add(mainOverlay);
}
开发者ID:skarlath,项目名称:spaceapps_MIAMI,代码行数:8,代码来源:OverlayProcessor.cs
示例19: Form1_Load
private void Form1_Load(object sender, EventArgs e)
{
myMap.MapProvider = GMap.NET.MapProviders.GoogleMapProvider.Instance;
GMap.NET.GMaps.Instance.Mode = GMap.NET.AccessMode.ServerOnly;
myMap.Position = new GMap.NET.PointLatLng(46.25, 20.15);
markers = new GMapOverlay("markers");
myMap.Overlays.Add(markers);
}
开发者ID:CsabaBarsony,项目名称:RouteSim,代码行数:8,代码来源:Form1.cs
示例20: DrawPoint
public static void DrawPoint(GMapControl map, decimal latitude, decimal longitude)
{
GMapOverlay overlay = new GMapOverlay(map, "Stop");
overlay.Markers.Add(new GMap.NET.WindowsForms.Markers.GMapMarkerGoogleGreen(new PointLatLng((double)latitude, (double)longitude)));
map.Overlays.Add(overlay);
map.ZoomAndCenterMarkers(overlay.Id);
map.Zoom -= 2;
}
开发者ID:richardpianka,项目名称:Transit,代码行数:8,代码来源:MapUtilities.cs
注:本文中的GMap.NET.WindowsForms.GMapOverlay类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论