geosolutions-it / MapStore2

The solution to create and share maps, dashboards, geostories with 3D support on the web. And it is open-source too!
https://mapstore.geosolutionsgroup.com/
Other
511 stars 398 forks source link

Map used in geostory throws error if the projection is not supported #4456

Closed MV88 closed 5 years ago

MV88 commented 5 years ago

Description

When media editor for maps is available try to load terrestris map which has a custom projection (EPSG:31468)

since its proj definition is missing a red error page appears

Error is because it never runs this line

In case of Bug (otherwise remove this paragraph)

Browser Affected (use this site: https://www.whatsmybrowser.org/ for non expert users)

Browser Version Affected

Steps to reproduce

Expected Result

Current Result

Other useful information (optional):

I think we should handle projection dynamically, @mbarto @offtherailz do you agree?

Map.jsx?31cc:314 Uncaught TypeError: Cannot read property 'degrees' of undefined
    at OpenlayersMap.eval [as getResolutions] (Map.jsx?31cc:314)
    at OpenlayersMap.UNSAFE_componentWillReceiveProps (Map.jsx?31cc:257)
    at callComponentWillReceiveProps (react-dom.development.js?61bb:14333)
    at updateClassInstance (react-dom.development.js?61bb:14546)
    at updateClassComponent (react-dom.development.js?61bb:18357)
    at beginWork$1 (react-dom.development.js?61bb:20108)
    at HTMLUnknownElement.callCallback (react-dom.development.js?61bb:362)
    at Object.invokeGuardedCallbackDev (react-dom.development.js?61bb:411)
    at invokeGuardedCallback (react-dom.development.js?61bb:466)
    at beginWork$$1 (react-dom.development.js?61bb:25730)
    at performUnitOfWork (react-dom.development.js?61bb:24638)
    at workLoopSync (react-dom.development.js?61bb:24614)
    at performSyncWorkOnRoot (react-dom.development.js?61bb:24182)
    at eval (react-dom.development.js?61bb:12238)
    at unstable_runWithPriority (scheduler.development.js?3069:815)
    at runWithPriority$2 (react-dom.development.js?61bb:12188)
MV88 commented 5 years ago

duplication of https://github.com/geosolutions-it/MapStore2/issues/4299