예제 #1
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));
        }