osgeonl / geonetwork-dutch-skin

Dutch styles GeoNetwork
4 stars 5 forks source link

Upgrade the skin to support GeoNetwork 3.10 #62

Open josegar74 opened 4 years ago

josegar74 commented 4 years ago

Trying to use the 3.8.x branch of the skin in GeoNetwork 3.10.x causes the following issue:

Error: [$injector:modulerr] Failed to instantiate module ol.proj.EPSG28992 due to:
TypeError: Cannot read property 'setExtent' of null
    at http://localhost:8080/geonetwork/catalog/views/dutch/javascript/epsg28992.js:25:38

Probably related to the recent upgrade of OpenLayers in GeoNetwork.

Created this issue to create a new branch in the skin 3.10.x and upgrade the code to work with GeoNetwork 3.10.x.

juanluisrp commented 4 years ago

Maybe we need to use register before retrieving the projection. See https://github.com/geonetwork/core-geonetwork/blob/d4b5b12daffe72b85755be45547ba98eb380aae8/web-ui/src/main/resources/catalog/components/common/map/mapsManager.js#L40-L42

            // definition and set it's extent.
            proj4.defs(p.code, p.def);
            ol.proj.proj4.register(proj4);