Esempio n. 1
0
        public GMarkerIcon(PointLatLng p, GMarkerIconType type)
            : base(p)
        {
            Type = type;

            if (type != GMarkerIconType.none)
            {
                LoadBitmap();
            }
        }
Esempio n. 2
0
        public void AddMarker(PointLatLng position, GMarkerIconType iconType, MarkerTooltipMode tooltipMode, string toolTip = "")
        {
            var m = new GMarkerIcon(position, iconType); // GMarkerIconType.green

            m.ToolTipMode = tooltipMode;                 // MarkerTooltipMode.OnMouseOver

            if (!string.IsNullOrEmpty(toolTip))
            {
                m.ToolTipText = toolTip;
            }
            else
            {
                Placemark?         p = null;
                GeocoderStatusCode status;
                var ret = GMapProviders.GoogleMap.GetPlacemark(position, out status);
                if (status == GeocoderStatusCode.Success && ret != null)
                {
                    p = ret;
                }
                m.ToolTipText = (p != null) ? p.Value.Address : position.ToString();
            }

            fObjects.Markers.Add(m);
        }