How to configure custom map shapes
To configure custom map shapes in the Bold Reports® ASP.NET Core Report Designer, place your shape data file in the wwwroot folder, list it in a mapshapes.txt file, and load the map settings in the Startup method.
Create Report Designer ASP.NET Core application
To create a Report Designer ASP.NET Core application, follow Add Report Designer to an ASP.NET Core application.
How do I add a custom map shape file to the ASP.NET Core Report Designer?
To add a custom map shape to the Bold Reports® ASP.NET Core Report Designer, create a folder in the wwwroot folder, copy your shape data file into it, and list the file in a mapshapes.txt file.
In the wwwroot folder of your Report Designer application, create a new folder. For example, ShapeData.

Copy your shape data file and paste it in the ShapeData folder. For example, storelocations.js.

Create a text file inside ShapeData folder. For example, mapshapes.txt.

Open the mapshapes.txt file, add your file name and display name, and save the file.

[{ Name: 'Store Locations', FileName: 'storelocations' }]Load map shape data in application startup
-
Open the code-behind file
Startup.csand add the following using statement.using BoldReports.Web; using Newtonsoft.Json; using System.Reflection; -
Add the following code to load shape data in the
Startupmethod.public Startup(IConfiguration configuration, IWebHostEnvironment _hostingEnvironment) { //Use the below code to load map shape data into report designer ReportConfig.DefaultSettings = new ReportSettings() { MapSetting = this.GetMapSettings(_hostingEnvironment) }; Configuration = configuration; env = _hostingEnvironment; } private BoldReports.Web.MapSetting GetMapSettings(IWebHostEnvironment _hostingEnvironment) { try { string basePath = _hostingEnvironment.WebRootPath; return new MapSetting() { ShapePath = basePath + "\\ShapeData\\", MapShapes = JsonConvert.DeserializeObject<List<MapShape>>(System.IO.File.ReadAllText(basePath + "\\ShapeData\\mapshapes.txt")) }; } catch (Exception ex) { } return null; }
Visualize shape data on map
- Launch the Report Designer application.

- Drag a map into design area from item panel.

- The newly added shape data entry will be listed in the Shapes property drop-down under Basic Settings category.

To visualize shape data and analytical data using the map report item, see Design an RDL report using map.