Skip to content

2023.02.00-geOrchestra

Compare
Choose a tag to compare
@dsuren1 dsuren1 released this 08 Feb 11:42
· 13 commits to 2023.02.xx since this release
cb296d6

What's Changed

This release contains updates developed as part of

The MapStore git submodule revision has also been updated to point to the latest stable version of MapStore (2023.02), where the majority of the involved updates have been contributed.

Relevant fixes and enhancements

Documentation update

MapStore documentation**

MapStore latest documentation to use as a reference:

Involved migration guidelines for this RC:

Docker Image

https://hub.docker.com/r/geosolutionsit/mapstore2-georchestra/tags?page=1&name=2023.02.00-geOrchestra

Configuration changes

new.json changes

To configure COG layer as background. A configuration similar to one shown below has to be added to new.json

{
...
"layers":{[
...
+ {
+   "type": "cog",
+   "title": "Cloud optimized geotiff",
+   "visibility": false,
+   "sources": [{
+     "url": "https://example.com/coglayer.tif"
+   }],
+   "group": "background"
+ }
...
]}

localConfig.json changes

If the localConfig.json has been customized:

  • You will have to remove the following entry from initialState.
-        "maptype": {
-            "mapType": "{context.mode === 'desktop' ? 'openlayers' : 'leaflet'}"
-        },
  • To see advanced settings of Share plugin to center and zoom on a map
      "cfg": {
         ...
         "advancedSettings": {
           ....
    +     "centerAndZoom": true
         }
      }
  • To show Delete menu option in Geostory and Dashboard
    • In dashboards
      "dashboards": [{
         ....
      +        "DeleteDashboard"
         ....
      }]
    • In geostory
      "geostory": [{
          ....
      + "DeleteGeoStory"
          ....
      ]}
  • To properly reproject the COG layer, the projectionDefs array must be updated with the projection configuration required for the COG layers
  • Also COG layer can be added as static background service to catalog under initialState.defaultState.catalog.default
{
...
"staticServices": {
  "default_map_backgrounds": {
    ...
    "backgrounds":[{
      ...
+      {
+       "type": "cog",
+       "title": "Cloud optimized geotiff",
+        "visibility": false,
+        "sources": [{
+        "url": "https://example.com/coglayer.tif"
+        }],
+        "group": "background"
+      }
      ...
    }]
  }
}
  • To visualize the catalog service option to add COG layers, the following configuration change has to be made in the MetadataExplorer plugin
{
...
  {
    "name": "MetadataExplorer",
    "cfg": {
        "zoomToLayer": false,
        "wrap": true,
+       "serviceTypes": [
+          { "name": "csw", "label": "CSW" },
+          { "name": "wms", "label": "WMS" },
+          { "name": "wmts", "label": "WMTS" },
+          { "name": "tms", "label": "TMS", "allowedProviders": ["OpenStreetMap", "OpenSeaMap", "Stamen"] },
+          { "name": "wfs", "label": "WFS" },
+          { "name": "3dtiles", "label": "3D Tiles" },
+          { "name": "cog", "label": "COG" }
+        ]
  }
...
  • To enable import and export on Context. Please add the following to context-creator
{
 "context-creator": {
     ...
+    "ContextImport",
+   "ContextExport"
     ...
}
  • To activate the permalink and support redirection functionality, you must add a new permalink section to plugins root object of localConfig.json, as shown below
{
"monitorState": [
...
+ {"name": "userrole", "path": "security.user.role"},
...
],
...
+    "permalink": [
+        "Permalink",
+        "FeedbackMask"
+    ]
...
}
  • To make Permalink tab visible on the Share panel, the following changes has to be made on the respective modes
{
    "desktop": [
        ...
+      "Permalink",
        ...
    ],
    "dashboard": [
        ...
+     "Permalink",
        ...
    ],
    "geostory": [
        ...
+     "Permalink",
        ...
    ]
}

pluginConfig.json changes

  • Add Permalink plugin configuration to the root and modify Share plugin as shown below to allow Permalink in context-creator plugin configuration
{
...
   {
      "name": "Share",
      "glyph": "share",
      "title": "plugins.Share.title",
      "description": "plugins.Share.description",
      "dependencies": [
        "SidebarMenu"
      ],
+    "children": [
+       "Permalink"
+     ],
+    "autoEnableChildren": [
+       "Permalink"
+     ]
    },
+   {
+      "name": "Permalink",
+      "glyph": "link",
+      "title": "plugins.Permalink.title",
+      "description": "plugins.Permalink.description"
+   }
...
}

app.jsx changes

  • The app pages must be updated with a new entry to allow permalink handling and redirection
+ import Permalink from '@mapstore/product/pages/Permalink';
const appConfig = {
    ...
    pages: [
        // my custom pages ...,
+        {
+           name: "permalink",
+           path: "/permalink/:pid",
+           component: Permalink
+       }
    ]
};

Database Update

  • The database of MapStore should be automatically updated with the creation of the new tables and necessary schema changes. If the auto-update of the database do not work (e.g. some database permission issue in some custom installation) apply the migration script here as an alternative

  • Add new category PERMALINK to gs_category table. To update your database you need to apply this SQL scripts to your database

    Note: If the category is missing, MapStore will attempt to create Permalink category when creating the first permalink on the application

    PostgreSQL
    -- New PERMALINK category
    INSERT INTO geostore.gs_category(id, name) VALUES (nextval('geostore.hibernate_sequence'), 'PERMALINK') ON CONFLICT DO NOTHING;
    H2
    -- New PERMALINK category
    INSERT INTO gs_category(name) VALUES ('PERMALINK');
    Oracle
    -- New PERMALINK category
    INSERT INTO gs_category(id, name) VALUES (hibernate_sequence.nextval, ‘PERMALINK');

Log4J migration to Log4j2

  • If the file log4j.properties in data directory has been customized, it is necessary to replace it with a new file having a different name: log4j2.properties.

The new file uses a new syntax.

Here an example of the new syntax. See https://logging.apache.org/log4j/2.x/manual/migration.html for migration gudes.

rootLogger.level = INFO
appenders= console, file


appender.console.type = Console
appender.console.name = LogToConsole
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = %p %d{yyyy-MM-dd HH:mm:ss.SSS} %c::%M:%L - %m%n
rootLogger.appenderRef.stdout.ref = LogToConsole
rootLogger.appenderRef.console.ref = LogToConsole

appender.file.type = File
appender.file.name = LogToFile2
appender.file.fileName=${sys:catalina.base}/logs/mapstore.log
appender.file.layout.type=PatternLayout
appender.file.layout.pattern=%p   %d{yyyy-MM-dd HH:mm:ss.SSS}   %C{1}.%M() - %m %n
rootLogger.appenderRef.file.ref = LogToFile2

logger.restsrv.name=it.geosolutions.geostore.services.rest
logger.restsrv.level=  INFO
logger.hibernate1.name=org.hibernate
logger.hibernate1.level=INFO
logger.trg1.name=com.trg
logger.trg1.level=INFO

Full Changelog
2022.02.02-geOrchestra...2023.02.00-geOrchestra