meta data for this page
How to handle MultiPolygon geometries in N4V for Webi when polygons do not touch
Anonymised summary of support ticket #224876 (2025-12-09)
Symptom
Error 'TypeError: Cannot read properties of undefined (reading 'path')' occurs in Webi when using a GeoJSON file containing a MultiPolygon with non-adjacent polygons. The error persists even after modifying the custom JavaScript file (coa2.js) and clearing the browser cache.
Environment
N4V for Webi (Need4Viz extensions), SAP BusinessObjects Web Intelligence, Tomcat server, GeoJSON files with MultiPolygon geometries.
Resolution
- Ensure the GeoJSON file does not contain MultiPolygon geometries with non-adjacent polygons. If necessary, split the MultiPolygon into individual Polygon features or merge them into a single Polygon if they share the same identifier.
- Validate the custom JavaScript file (e.g., coa2.js) for syntax errors, such as missing or extra commas in JSON-like structures. Use tools like QGIS to verify the geometry integrity before deployment.
- Place the corrected JavaScript file in the Tomcat server's custom elements directory (e.g., webapps/N4VCustomElements/res/js/highcharts/maps_custom).
- Clear the browser cache and refresh the Webi report to force the new map to load. No Tomcat restart is required.
Other resolution
If the issue persists, verify the data filtering in Webi to ensure the correct zone codes are used. Avoid filtering on zones that may not exist in the map data.