Beispiel #1
0
        public static string GetMapJson(VMemberGeolocation input)
        {
            VMemberGeolocationMapJson[] array = new VMemberGeolocationMapJson[]
            {
                new VMemberGeolocationMapJson(input)
            };

            return(GetMapJson(array));
        }
Beispiel #2
0
            public VMemberGeolocationMapJson(VMemberGeolocation info)
            {
                RegisteredCoordinates = new string[]
                {
                    (info.RegisteredLatitude.HasValue ? info.RegisteredLatitude.Value : 0.0m).ToString(),
                    (info.RegisteredLongitude.HasValue ? info.RegisteredLongitude.Value : 0.0m).ToString()
                };
                Country  = info.Country;
                Username = info.Username;



                AvatarUrl = info.AvatarUrl.StartsWith("http") ?
                            info.AvatarUrl :
                            info.AvatarUrl.Replace("~", AppSettings.Site.Url);

                Flag = String.Format("{0}/Images/Flags/{1}.png", AppSettings.Site.Url, info.CountryCode.ToLower());
            }