public IViewComponentResult Invoke(IssueDetailsModel model)
        {
            var viewModel = new MapIssueMarkerComponentViewModel
            {
                ApiKey    = this.configuration.GetSection("Google:MapsApiKey").Value,
                Latitude  = model.Latitude,
                Longitude = model.Longitude,
                Zoom      = ZoomMapIssueDetails.ToString().Replace(",", ".")
            };

            return(this.View(viewModel));
        }
Ejemplo n.º 2
0
        public async Task <IViewComponentResult> InvokeAsync(RegionType region)
        {
            (double mapRegLat, double mapRegLong, double mapRegZoom) = region.GetMapPositions();

            var apiKey = this.configuration.GetSection("Google:MapsApiKey").Value;

            var model = new MapIssueMarkerComponentViewModel
            {
                ApiKey    = apiKey,
                Latitude  = mapRegLat.ToString().Replace(",", "."),
                Longitude = mapRegLong.ToString().Replace(",", "."),
                Zoom      = mapRegZoom.ToString().Replace(",", ".")
            };

            return(this.View(model));
        }