public ProjectLocationDetailViewDataForAngular(MapInitJson mapInitJson, LayerGeoJson editableLayerGeoJson, LayerGeoJson arcGisLayerGeoJson, int annotationMaxLength)
 {
     MapInitJson          = mapInitJson;
     EditableLayerGeoJson = editableLayerGeoJson;
     ArcGisLayerGeoJson   = arcGisLayerGeoJson;
     AnnotationMaxLength  = annotationMaxLength;
     GeospatialAreaMapServiceLayerNames = FirmaWebConfiguration.GetWmsLayerNames();
     ProjectLocationTypeJsons           = ProjectLocationType.GetAllProjectLocationTypeJsons();
 }
        private PartialViewResult ViewEditInteractionEventLocationSimple(EditInteractionEventLocationSimpleViewModel viewModel, InteractionEvent interactionEvent)
        {
            var layerGeoJsons = MapInitJson.GetAllGeospatialAreaMapLayers(LayerInitialVisibility.Hide);
            var mapInitJson   = new MapInitJson($"interactionEvent_{interactionEvent.InteractionEventID}_EditMap", 10, layerGeoJsons, BoundingBox.MakeNewDefaultBoundingBox(), false)
            {
                AllowFullScreen = false, DisablePopups = true
            };

            var mapPostUrl = SitkaRoute <InteractionEventController> .BuildUrlFromExpression(c => c.EditInteractionEventLocation(interactionEvent.PrimaryKey, null));

            var mapFormID     = GetMapLocationFormID(interactionEvent.PrimaryKey);
            var wmsLayerNames = FirmaWebConfiguration.GetWmsLayerNames();
            var mapServiceUrl = FirmaWebConfiguration.WebMapServiceUrl;

            var viewData = new EditInteractionEventLocationSimpleViewData(CurrentPerson, mapInitJson, wmsLayerNames, null, mapPostUrl, mapFormID, mapServiceUrl);

            return(RazorPartialView <EditInteractionEventLocationSimple, EditInteractionEventLocationSimpleViewData, EditInteractionEventLocationSimpleViewModel>(viewData, viewModel));
        }
Ejemplo n.º 3
0
        private PartialViewResult ViewEditProjectLocationSummaryPoint(Project project, ProjectLocationSimpleViewModel viewModel)
        {
            var layerGeoJsons = MapInitJson.GetAllGeospatialAreaMapLayers(LayerInitialVisibility.Hide);
            var mapInitJson   = new MapInitJson($"project_{project.ProjectID}_EditMap", 10, layerGeoJsons, BoundingBox.MakeNewDefaultBoundingBox(), false)
            {
                AllowFullScreen = false, DisablePopups = true
            };
            var mapPostUrl = SitkaRoute <ProjectLocationController> .BuildUrlFromExpression(c => c.EditProjectLocationSimple(project, null));

            var mapFormID = GenerateEditProjectLocationFormID(project.ProjectID);
            var viewData  = new ProjectLocationSimpleViewData(CurrentPerson, mapInitJson, FirmaWebConfiguration.GetWmsLayerNames(), null, mapPostUrl, mapFormID, FirmaWebConfiguration.WebMapServiceUrl);

            return(RazorPartialView <ProjectLocationSimple, ProjectLocationSimpleViewData, ProjectLocationSimpleViewModel>(viewData, viewModel));
        }