====== How to integrate custom maps in N4V for Webi using GeoJSON files ====== //Anonymised summary of support ticket #737745 (2023-12-21)// ===== Symptom ===== Custom maps fail to load or display incorrectly in Webi after adding a new map, with errors related to JSON encoding or configuration files. ===== Environment ===== N4V for Webi (Need4Viz extensions for SAP BusinessObjects Web Intelligence), Tomcat, QGIS, GeoJSON files. ===== Resolution ===== - %%Use QGIS to create or modify GeoJSON files for custom maps (e.g., France regions or departments). Ensure the GeoJSON includes required fields: 'code', 'name', 'longitude', 'latitude', 'hc-middle-x', and 'hc-middle-y'.%% - %%Validate the GeoJSON structure and correct any duplicate or missing codes (e.g., 'DIPJJ SUD EST' and 'DIPJJ SUD').%% - For the first map integration, provide the corrected GeoJSON to support for setup generation. The setup includes the map and keys for additional custom maps. - %%Ensure JSON files in the N4V configuration folders (e.g., _list_genmaps.json in ce_settings\lang_EN and ce_settings\lang_FR) are encoded in UTF-8 without BOM. Use tools like Notepad++ to re-encode if necessary.%% - %%After modifying configuration files, refresh Webi settings without restarting services. For subsequent maps, copy the following files to all N4V environments: 'list_maps_conf.js', 'list_drillmaps_conf.js', 'list_maps_codes.js' (in ce_libs\resources), and the corresponding '.js' map files (e.g., 'mju1.js') in 'highcharts\maps_custom'. Restart N4V services for changes to take effect.%% - %%For pie chart positioning, use QGIS functions like x($geometry) to extract coordinates. Adjust label positions manually using 'hc-middle-x' and 'hc-middle-y' values or via live testing in Chrome's console (disable cache) by editing the map's JS file directly.%% ===== Other resolution ===== %%For automatic coordinate extraction in QGIS, refer to the provided tutorial. Ensure the 'name' attribute is used in GeoJSON for proper map display. Backup original map files (e.g., 'mju1.js') before modifications.%%