The ESRI map fails to load with a "Cannot read properties of undefined (reading 'CRS')" error in SAS® Visual Investigator


The Environmental Systems Research Institute (ESRI) map fails to load with the following error:

error_handler.ts:46 ERROR Error: Uncaught (in promise): TypeError: Cannot read properties of undefined (reading 'CRS')
TypeError: Cannot read properties of undefined (reading 'CRS')
    at sandMapControl.js:210:53
    at sandMapControl.js:595:31
    at c.invoke (zone.js:368:26)
    at Object.onInvoke (ng_zone.ts:440:29)
    at c.invoke (zone.js:367:52)
    at a.run (zone.js:129:43)
    at zone.js:1257:36

When you try to import maps that contain an associated CRS (coordinate reference system), the presence of window.L.Proj (that is, an extension plugin for the Leaflet JavaScript mapping library) is required.

A change was made where leaflet and its associated helper or extension libraries had to be explicitly imported in apps that consumed nexus. As a result, SAS Visual Investigator can no longer rely on automatically 'inheriting' them from nexus.

There is no work around for this issue.