Activity Not Available
3
I Use This!

News

Analyzed about 1 month ago. based on code collected about 1 month ago.
Posted 14 days ago by ambiente
Hi, This is the way I create the Custom marker Imports System Imports System.Collections.Generic Imports System.Text Imports System.Drawing Imports System.Drawing.Drawing2D Imports System.Diagnostics Imports GMap.NET.WindowsForms Imports GMap.NET ... [More] Namespace GMap.NET.WindowsForms.Markers Public Class GMapMarkerCircle Inherits GMapMarker Public Radius As Integer Public OutlinePen As Pen Public FillBrush As Brush Public Fill As Boolean Dim _point As PointLatLng Public Sub New(p As PointLatLng) MyBase.New(p) _point = p OutlinePen = New Pen(Brushes.Orange, 2) FillBrush = New SolidBrush(Color.FromArgb(60, Color.Orange)) Radius = 0 End Sub Public Overrides Sub OnRender(g As Graphics) g.SmoothingMode = SmoothingMode.AntiAlias Dim R As Integer = CInt((Radius) / Overlay.Control.MapProvider.Projection.GetGroundResolution(CInt(Overlay.Control.Zoom), Position.Lat)) * 2 If Fill = True Then g.FillEllipse(FillBrush, New System.Drawing.Rectangle(LocalPosition.X - R \ 2, LocalPosition.Y - R \ 2, R, R)) End If g.DrawEllipse(OutlinePen, New System.Drawing.Rectangle(LocalPosition.X - R \ 2, LocalPosition.Y - R \ 2, R, R)) End Sub End Class End Namespace And this way I call it Dim CPoint As PointLatLng CPoint = currentMarker.Position Dim cy As New GMapMarkerCircle(CPoint) Using br = New SolidBrush(Color.Orange) br.Color = _cmdDropDownColorPickerOutlineColors.Color cy.Fill = True cy.FillBrush = New SolidBrush(Color.FromArgb(CInt((100 - _cmdSpinnerFillPercent.DecimalValue) * 2.5), _cmdDropDownColorPickerFillColors.Color)) cy.OutlinePen = New Pen(br, CSng(_cmdComboBoxSize.SelectedItem) + 1) Select Case _cmdComboBoxUnits.SelectedItem Case 0 cy.Radius = CInt(_cmdSpinnerRadius.DecimalValue) Case 1 cy.Radius = CInt(_cmdSpinnerRadius.DecimalValue * 1000) Case 2 cy.Radius = CInt(_cmdSpinnerRadius.DecimalValue * 1603) Case 3 cy.Radius = CInt(_cmdSpinnerRadius.DecimalValue / 3.28) End Select cy.Position = CPoint cy.IsVisible = True cy.ToolTipMode = MarkerTooltipMode.OnMouseOver objects.Markers.Add(cy) objects.Markers(objects.Markers.Count - 1).ToolTipText = _cmdSpinnerRadius.DecimalValue.ToString & " " & _cmdComboBoxUnits.StringValue objects.Markers(objects.Markers.Count - 1).Tag = MarkerTagID End Using The strange is if I set cy.ToolTipMode = MarkerTooltipMode.Always all tools tips are shown but cy.ToolTipMode = MarkerTooltipMode.OnMouseOver Nothing is shown on mouse over. [Less]
Posted 14 days ago by ambiente
Hi, This is the way I create the Custom marker Imports System Imports System.Collections.Generic Imports System.Text Imports System.Drawing Imports System.Drawing.Drawing2D Imports System.Diagnostics Imports GMap.NET.WindowsForms Imports GMap.NET ... [More] Namespace GMap.NET.WindowsForms.Markers Public Class GMapMarkerCircle Inherits GMapMarker Public Radius As Integer Public OutlinePen As Pen Public FillBrush As Brush Public Fill As Boolean Dim _point As PointLatLng Public Sub New(p As PointLatLng) MyBase.New(p) _point = p OutlinePen = New Pen(Brushes.Orange, 2) FillBrush = New SolidBrush(Color.FromArgb(60, Color.Orange)) Radius = 0 End Sub Public Overrides Sub OnRender(g As Graphics) g.SmoothingMode = SmoothingMode.AntiAlias Dim R As Integer = CInt((Radius) / Overlay.Control.MapProvider.Projection.GetGroundResolution(CInt(Overlay.Control.Zoom), Position.Lat)) * 2 If Fill = True Then g.FillEllipse(FillBrush, New System.Drawing.Rectangle(LocalPosition.X - R \ 2, LocalPosition.Y - R \ 2, R, R)) End If g.DrawEllipse(OutlinePen, New System.Drawing.Rectangle(LocalPosition.X - R \ 2, LocalPosition.Y - R \ 2, R, R)) End Sub End Class End Namespace And this way I call it Dim CPoint As PointLatLng CPoint = currentMarker.Position Dim cy As New GMapMarkerCircle(CPoint) Using br = New SolidBrush(Color.Orange) br.Color = _cmdDropDownColorPickerOutlineColors.Color cy.Fill = True cy.FillBrush = New SolidBrush(Color.FromArgb(CInt((100 - _cmdSpinnerFillPercent.DecimalValue) * 2.5), _cmdDropDownColorPickerFillColors.Color)) cy.OutlinePen = New Pen(br, CSng(_cmdComboBoxSize.SelectedItem) + 1) Select Case _cmdComboBoxUnits.SelectedItem Case 0 cy.Radius = CInt(_cmdSpinnerRadius.DecimalValue) Case 1 cy.Radius = CInt(_cmdSpinnerRadius.DecimalValue * 1000) Case 2 cy.Radius = CInt(_cmdSpinnerRadius.DecimalValue * 1603) Case 3 cy.Radius = CInt(_cmdSpinnerRadius.DecimalValue / 3.28) End Select cy.Position = CPoint cy.IsVisible = True cy.ToolTipMode = MarkerTooltipMode.OnMouseOver objects.Markers.Add(cy) objects.Markers(objects.Markers.Count - 1).ToolTipText = _cmdSpinnerRadius.DecimalValue.ToString & " " & _cmdComboBoxUnits.StringValue objects.Markers(objects.Markers.Count - 1).Tag = MarkerTagID End Using The strange is if I set cy.ToolTipMode = MarkerTooltipMode.Always all tools tips are shown but cy.ToolTipMode = MarkerTooltipMode.OnMouseOver Nothing is shown on mouse over. [Less]
Posted 14 days ago by radioman
you need to dig and experiment, check core.cs and gmapcontrol.cs for rendering
Posted 14 days ago by radioman
you need to dig and experiment, check core.cs and gmapcontrol.cs for rendering
Posted 14 days ago by hermas
I want to try fix this issue, maybe you can point to me what variables and classes need to append to make this work ? What pieces of code i need to understand ?
Posted 16 days ago by radioman
i refraze, it probably doesnt work ;/
Posted 16 days ago by hermas
Thank You for reply, what that i do open GMap.NET.WindowsForms.csproj with text editod and change ContinuesMapNo to ContinuesMap, than compile GMap.NET.WindowsForms project and change 2 .dll that was in my project, but all that I saw it was blue cross with word debug. May be i do some step wrong ?
Posted 16 days ago by radioman
GMap.NET.WindowsForms TRACE;DEBUG;ContinuesMapNo ContinuesMapNo -> ContinuesMap ..i've done some testing on this, but i'm not sure if all works as expected
Posted 16 days ago by alfradias
Hi, i'm new in gmaps Help me please. i have some project in wpf i must make some object follow this line or gmaproute i create. it's possible to make object follow line or gmaproute in gmaps? can someone tell me how to create that?
Posted 16 days ago by CryptoBoyNG
Hi, dumb question, but did you set a ToolTipText? I'm using a custom marker with tooltip without any issue. Sample code : GMapMarkerImage marker = new GMapMarkerImage(markerImage, new PointLatLng(lat, lon)); if (tooltip != "") { ... [More] marker.ToolTipMode = MarkerTooltipMode.OnMouseOver; marker.ToolTipText = tooltip; } Btw you can also create your own tooltip class, it's pretty easy : create a class that derives from GMapToolTip, and override OnRender (public override void OnRender(Graphics g)). that's it :-) [Less]