Google.Maps.StaticMaps.StaticMapRequest.GetPathEncoded C# (CSharp) Méthode

GetPathEncoded() private static méthode

private static GetPathEncoded ( Path currentPath ) : string
currentPath Path
Résultat string
        private static string GetPathEncoded(Path currentPath)
        {
            IEnumerable<LatLng> latlngPoints;
            try { latlngPoints = currentPath.Points.Cast<LatLng>().ToList(); }
            catch(InvalidCastException ex) { throw new InvalidOperationException("Encountered a point specified as a location.  Encoding only supports all points in LatLng types.", ex); }

            string encodedValue = PolylineEncoder.EncodeCoordinates(latlngPoints);
            return encodedValue;
        }