Example #1
0
        protected string GetPositionsByAddress(string address, byte qty, GeoDecoder.Lang lang)
        {
            string res = $"Address = { new JavaScriptSerializer().Serialize(new { address })}\n";

            GeoDecoder.Address[] positions = new GeoDecoder(YandexKey).GetPointsByAddress(address, qty, lang);
            res += $"Positions = { new JavaScriptSerializer().Serialize(positions)}\n";
            return(res);
        }
Example #2
0
        protected string GetAddressByPosition(decimal latitude, decimal longitude)
        {
            string res = $"Position = { new JavaScriptSerializer().Serialize(new { latitude, longitude })}\n";

            GeoDecoder.Address address = new GeoDecoder(YandexKey).GetAddressByPoint(latitude, longitude);
            res += $"Address = { new JavaScriptSerializer().Serialize(address)}\n";
            return(res);
        }