internal void DrawLocation(LocationItemViewModel locationItemViewModel)
        {
            var itemsTemp = new ObservableCollection <ILocationViewModel>();

            itemsTemp.Add(locationItemViewModel);
            Items = itemsTemp;
        }
        public override void OnNavigatingTo(NavigationParameters parameters)
        {
            SelectedPlace = (PlaceModel)parameters["SelectedPlace"];

            var itemsTemp = new ObservableCollection <ILocationViewModel>();
            var item      = new LocationItemViewModel()
            {
                Title     = SelectedPlace.Name,
                Latitude  = Convert.ToDouble(SelectedPlace.Latitude.Replace(".", ",")),
                Longitude = Convert.ToDouble(SelectedPlace.Longitude.Replace(".", ",")),
                Command   = OpenWazeCommand
            };

            itemsTemp.Add(item);
            Items = itemsTemp;

            base.OnNavigatingTo(parameters);
        }
        public ActionResult Index(Models.LocationItemPage currentPage)
        {
            var model = new LocationItemViewModel(currentPage);

            if (!ContentReference.IsNullOrEmpty(currentPage.Image))
            {
                model.Image = _contentRepository.Get <ImageData>(currentPage.Image);
            }

            var contentReferences = _contentLoader.GetDescendents(ContentReference.StartPage);

            model.LocationNavigation.ContinentLocations = contentReferences.Select(x => _contentLoader.Get <IContent>(x))
                                                          .OfType <Models.LocationItemPage>()
                                                          .Where(x => x.Continent == currentPage.Continent & x.ParentLink != currentPage.ParentLink)
                                                          .OrderBy(x => x.Name)
                                                          .Take(100);

            //model.LocationNavigation.CloseBy = SearchClient.Instance
            //    .Search<LocationItemPage>()
            //    .Filter(x => x.Continent.Match(currentPage.Continent)
            //                 & !x.PageLink.Match(currentPage.PageLink))
            //    .PublishedInCurrentLanguage()
            //    .FilterForVisitor()
            //    .OrderBy(x => x.Coordinates)
            //    .DistanceFrom(currentPage.Coordinates)
            //    .Take(5)
            //    .StaticallyCacheFor(new System.TimeSpan(0, 10, 0))
            //    .GetContentResult();

            //if (currentPage.Categories != null)
            //{
            //    model.Tags = currentPage.Categories.Select(x => _contentRepository.Get<StandardCategory>(x));
            //}

            //var editingHints = ViewData.GetEditHints<LocationItemViewModel, LocationItemPage>();
            //editingHints.AddFullRefreshFor(p => p.Image);
            //editingHints.AddFullRefreshFor(p => p.Categories);

            return(View(model));
        }