Exemple #1
0
        private void LoadPin(Pin pin)
        {
            var overlay = Control.Overlays.FirstOrDefault();

            if (overlay != null)
            {
                var gMapImageMarker = new GMapImageMarker(
                    new PointLatLng(
                        pin.Position.Latitude,
                        pin.Position.Longitude),
                    GMapImageMarkerType.RedDot);

                overlay.Markers.Add(gMapImageMarker);
            }
        }
Exemple #2
0
        private void LoadUserPosition(PointLatLng userCoordinate, bool center)
        {
            if (Control == null || Element == null)
            {
                return;
            }

            if (_userPosition == null)
            {
                _userPosition = new GMapImageMarker(userCoordinate, GMapImageMarkerType.Red);
            }

            var overlay = Control.Overlays.FirstOrDefault();

            if (overlay != null)
            {
                overlay.Markers.Add(_userPosition);
            }

            if (center)
            {
                Control.Position = userCoordinate;
            }
        }