Overview
Version
Report Server Version | Functional Change |
11.0 | / |
11.0.6 | Supported two more projection methods for the custom TileLayer. For details, see section "Notes." |
Functions
Third-party maps may limit the number of accesses. If the access volume exceeds the limit, the layers may not be displayed correctly.
In this case, you can use the custom TileLayer function.
FineReport allows you to customize the TileLayer only for the current template map in the designer. It also allows you to customize the TileLayer under Map Configuration > Custom GIS Layer in the decision-making platform, which can be applied to all templates in the current report server.
FineReport provides eight types of TileLayer for use, as shown in the following figure.
Example
You can generate a layer URL on the official website of Mapbox, a map supplier, and copy it to the URL editing box of TileLayer on the Custom GIS Layer tab page.
Generating a URL Link
1. Open the official website of Mapbox. If you do not have an account, click the button to register. If you already have an account, log in to the website.
2. After login, click the dropdown button in the upper right corner of the personal center and select Studio.
3. Click New style on the newly opened page to create a custom layer.
4. Select any layer template, such as Outdoors, and click Customize Outdoors to go to the layer editing page.
5. You can set layer attributes as needed on the left side of the layer editing page.
6. Follow the steps in the following figure to generate a third-party sharing URL. Click to copy the URL.
Creating a Custom Amap Layer
1. In the designer, choose Server > Map Configuration, log in to the decision-making system, and you are redirected to the map configuration page.
2. Select Custom GIS Layer, create a directory, and name it. Select the created directory, click TileLayer, and paste the prepared URL.
URL in this example: https://api.mapbox.com/styles/v1/leotsai/ckdskdlj810ve19nvkvkbpdig/tiles/256/{z}/{x}/{y}@2x?access_token=pk.eyJ1IjoibGVvdHNhaSIsImEiOiJja2RzaTQzNG8wZjE2MnJxczh0b2xnM2djIn0.-VMQ4r1GsulAVcZS9nM7rQ
Click Load Layer. Then the customized map layer style appears on the right.
Click Save in the upper right corner. Then the customized TileLayer takes effect in the designer.
Applying GIS Layer to Template Map
After synchronizing geographic files, you can select the created TileLayer layer under Type > Basic > GIS Layer > Custom in any template of the designer.
The map layer effect during preview is shown in the following figure.
The template can be previewed on the app/HTML5 terminal. The map layer effect is shown in the following figure.
Customizing TileLayer in a Single Template
You can set the custom TileLayer separately for the current template.
In GIS Layer, choose Custom > Custom TileLayer, and paste the prepared URL.
Notes
1. The {r} parameter is not supported in the URL of custom layers. If this parameter exists in the URL, the layer is not displayed during frontend preview. To solve this problem, simply remove the {r} parameter from the URL.
2. In FineReport versions before V11.0.6, only the projection method EPSG:3857 is supported by the custom TileLayer. In FineReport versions after V11.0.6, three projection methods (EPSG:3857, EPSG:4326, and EPSG:3395) are supported.