private ViewResult ViewEditLocation(OnlandVisualTrashAssessmentArea onlandVisualTrashAssessmentArea, EditLocationViewModel viewModel)
        {
            var assessmentAreaLayerGeoJson      = onlandVisualTrashAssessmentArea.GetAssessmentAreaLayerGeoJson();
            var transectLineLayerGeoJson        = onlandVisualTrashAssessmentArea.GetTransectLineLayerGeoJson();
            var refineAssessmentAreaMapInitJson = new RefineAssessmentAreaMapInitJson("refineAssessmentAreaMap", null, assessmentAreaLayerGeoJson, transectLineLayerGeoJson);

            var viewData = new EditLocationViewData(CurrentPerson, onlandVisualTrashAssessmentArea, refineAssessmentAreaMapInitJson);

            return(RazorView <EditLocation, EditLocationViewData, EditLocationViewModel>(viewData, viewModel));
        }
        private ViewResult ViewRefineAssessmentArea(OnlandVisualTrashAssessment onlandVisualTrashAssessment, RefineAssessmentAreaViewModel viewModel)
        {
            var observationsLayerGeoJson        = onlandVisualTrashAssessment.OnlandVisualTrashAssessmentObservations.MakeObservationsLayerGeoJson();
            var assessmentAreaLayerGeoJson      = onlandVisualTrashAssessment.GetAssessmentAreaLayerGeoJson(true);
            var transectLineLayerGeoJson        = onlandVisualTrashAssessment.GetTransectLineLayerGeoJson();
            var refineAssessmentAreaMapInitJson = new RefineAssessmentAreaMapInitJson("refineAssessmentAreaMap", observationsLayerGeoJson, assessmentAreaLayerGeoJson, transectLineLayerGeoJson);

            var viewData = new RefineAssessmentAreaViewData(CurrentPerson, OVTASection.RefineAssessmentArea, onlandVisualTrashAssessment, refineAssessmentAreaMapInitJson, NeptuneWebConfiguration.ParcelMapServiceUrl);

            return(RazorView <RefineAssessmentArea, RefineAssessmentAreaViewData, RefineAssessmentAreaViewModel>(
                       viewData, viewModel));
        }
Пример #3
0
        public EditLocationViewData(Person currentPerson, Models.OnlandVisualTrashAssessmentArea ovtaArea, RefineAssessmentAreaMapInitJson mapInitJson) : base(currentPerson, NeptunePage.GetNeptunePageByPageType(NeptunePageType.EditOVTAArea))
        {
            MapInitJson = mapInitJson;
            EntityName  = "OVTA Areas";
            EntityUrl   = SitkaRoute <OnlandVisualTrashAssessmentController> .BuildUrlFromExpression(x => x.Index());

            SubEntityName = ovtaArea.OnlandVisualTrashAssessmentAreaName;
            SubEntityUrl  = SitkaRoute <OnlandVisualTrashAssessmentAreaController> .BuildUrlFromExpression(x => x.Detail(ovtaArea));

            PageTitle = "Edit Location";

            MapFormID    = "editAssessmentAreaMapForm";
            GeoServerUrl = NeptuneWebConfiguration.ParcelMapServiceUrl;
            OnlandVisualTrashAssessmentAreaID = ovtaArea.OnlandVisualTrashAssessmentAreaID;

            ParcelUnionUrl = SitkaRoute <ParcelController> .BuildUrlFromExpression(x => x.Union());

            ParcelsViaTransectUrlTemplate = new UrlTemplate <int>(SitkaRoute <OnlandVisualTrashAssessmentAreaController> .BuildUrlFromExpression(x => x.ParcelsViaTransect(UrlTemplate.Parameter1Int))).UrlTemplateString;
            DetailUrl = ovtaArea.GetDetailUrl();
        }