TypeError: Cannot read property 'getCenterPoint' of undefined
See original GitHub issueBug
Expected Behavior
GIVEN an open map in presenter mode
WHEN hovering over the file percentages (the part next to metrics)

THEN a TypeError is triggered
Actual Behavior
TypeError: Cannot read property 'getCenterPoint' of undefined
at CodeMapMesh.adjustSurroundingBuildingColors (codeMapMesh.ts:98)
at codeMapMesh.ts:87
at Array.forEach (<anonymous>)
at CodeMapMesh.highlightBuilding (codeMapMesh.ts:82)
at ThreeSceneService.highlightBuildings (threeSceneService.ts:61)
at ThreeSceneService.selectBuilding (threeSceneService.ts:85)
at ThreeSceneService.reselectBuilding (threeSceneService.ts:176)
at ThreeSceneService.onRenderMapChanged (threeSceneService.ts:56)
at codeMap.preRender.service.ts:202
at Scope.$broadcast (angular.js:19788)
Specifications
- is released in online-demo: yes
- CodeCharta Version: 1.49.1
- OS: Ubuntu 20.04
- Browser: Chromium
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Problem with React Google Maps API - Uncaught TypeError
The error message means that mapRef has not been assigned yet. It is surprising, because it should have been taken care of by...
Read more >Cannot read property 'getCenter' of undefined at geodirector
I get this error won listing preview page: “Uncaught TypeError: Cannot read property 'getCenter' of undefined at geodirectory.min.js:1” .
Read more >this.map.getCenter() Cannot read property - ionic-v3
getCenter());. I am getting error: main.js:564 TypeError: Cannot read property 'getCenter' of undefined main.js:569
Read more >Resizing the window can result in an error being thrown if the ...
DomUtil.js:247 Uncaught TypeError: Cannot read property '_leaflet_pos' of undefined at getPosition (DomUtil.js:247) at NewClass.
Read more >How to Prevent the TypeError: Cannot Read Property Map of ...
A guide on the root cause of 'cannot read map of undefined' as well as techniques and tools to prevent this error.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

First impression: The error occurs when hovering a distribution like “Other”. It seems that the map has no files/buildings rendered for this distribution. The implementation for this case is broken.
We could not reproduce the error anymore. So closing this issue.