private void LoadCurrentRoute(List <RoutePoint> routePoints)
        {
            var line = CreatePolyline(new Route
            {
                Color           = Globals.DefaultColor.ToHex(),
                RoutePointsBlob = CsExtensions.CompactRoutePointList(routePoints)
            });

            MyMap.MapElements.Add(line);
        }
        public Task <int> SaveRoute(List <RoutePoint> wayPoints)
        {
            if (wayPoints == null || wayPoints.Count < 1)
            {
                return(Task.FromResult(0));
            }

            var route = new Route
            {
                Color           = RandColor.ToHex(),
                RoutePointsBlob = CsExtensions.CompactRoutePointList(wayPoints)
            };

            return(Database.InsertAsync(route));
        }