Skip to content

Commit

Permalink
Merge branch 'master' into 9482_guide
Browse files Browse the repository at this point in the history
  • Loading branch information
ElenaGallo authored Dec 4, 2023
2 parents f0d0f61 + 32b4b63 commit f0414a3
Show file tree
Hide file tree
Showing 271 changed files with 9,614 additions and 5,091 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/release_steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ If stable release (YYYY.XX.00) follow these sub-steps:
- [ ] `mapstore-printing.zip` on github release
- [ ] Publish the release
- [ ] create on [ReadTheDocs](https://readthedocs.org/projects/mapstore/) project the version build for `vYYYY.XX.mm` (click on "Versions" and activate the version of the tag, created when release was published)
- [ ] Update `Default version` to point the release version in the `Advanced Settings` menu of the [ReadTheDocs](https://readthedocs.org/dashboard/mapstore/advanced/) admin panel


## Build and publish MapStoreExtension release
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,4 @@ Here below is a small list of organizations using MapStore either directly or th
- [County of Milan - Italy](https://inlineainfrastrutture.cittametropolitana.mi.it/mapstore)
- [Nordeste Municipality - Portugal](https://sigweb.cmnordeste.pt/mapstore/#/)
- [Corvo Muncipality - Portugal](https://geocorvo.pt/mapstore/#/)
- [Lajes das Flores Municipality - Portal](https://sigweb.cmlajesdasflores.pt/#/)
10 changes: 10 additions & 0 deletions docs/developer-guide/mapstore-migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ This is a list of things to check if you want to update from a previous version

## Migration from 2023.02.xx to 2024.01.00

### Removing possibility to add custom fonts to the Map

From this version we limited the load of the font to FontAwesome.

If you have changed the property **fonts** inside Map plugin it will not longer load the font. A possible fix would be to add the font to the `*.html` files in your application.

- make sure that the `localConfig.json` does not have **fonts** property in **Map** plugin

The following css is added automatically if needed `<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"/>` inside the *head* tag.

### Fixing background config

From this version in order to fix default 3d background config a change is needed here:
Expand Down
2 changes: 2 additions & 0 deletions docs/developer-guide/vector-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ The `symbolizer` could be of following `kinds`:
| `opacity` | color opacity | | x |
| `msHeightReference` | reference to compute the distance of the point geometry, one of **none**, **ground** or **clamp** | | x |
| `msHeight` | height of the point, the original geometry is applied if undefined | | x |
| `msTranslateX` | move the model on the x axis with a value in meters (west negative value, east positive value) | | x |
| `msTranslateY` | move the model on the y axis with a value in meters (south negative value, north positive value) | | x |
| `msLeaderLineColor` | color of the leading line connecting the point to the terrain | | x |
| `msLeaderLineOpacity` | opacity of the leading line connecting the point to the terrain | | x |
| `msLeaderLineWidth` | width of the leading line connecting the point to the terrain | | x |
Expand Down
23 changes: 13 additions & 10 deletions docs/user-guide/catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,18 @@ In **general settings of** CSW service the user can specify the title to assign

<img src="../img/catalog/advanced_settings_csw.jpg" class="ms-docimage" style="max-width:600px;"/>

* *Format*: the default image format for the layers added to the map (`png`, `png8`, `jpeg`, `vnd.jpeg-png`, `vnd.jpeg-png8` or `gif`). The format configured through this option will be automatically used for all layers loaded from the involved catalog source (if not configured a default `image/png` is used). For layers already loaded on the map, it is possible to change the format through the [Layer Settings](https://mapstore.readthedocs.io/en/latest/user-guide/layer-settings/#display) tool as usual.

* *Layer tile size*: it represents tile size (width and height) to be used for tiles of all layers added to the map from the catalog source (`256x256` or `512x512`). For layers already loaded on the map, it is possible to change the tile size through the [Layer Settings](https://mapstore.readthedocs.io/en/latest/user-guide/layer-settings/#display) tool as usual.

* *Server Type*: to specify the server type of WMS online resources referred by metadata exposed by the CSW service URL. Possible options are two: `Geoserver` or `No Vendor` which can be for example MapProxy, MapServer or other.

!!! note
If the **No Vendor** is set, then [MapStore](https://mapstore.geosolutionsgroup.com/mapstore/#/) will not use any vendor option supported only by GeoServer in the OGC requests where this source is involved.

* *Format*: to assign the default *Tile* format for the layers added to the map (e.g. `png`, `png8`, `jpeg`, `vnd.jpeg-png`, `vnd.jpeg-png8` or `gif`) and to define the default *Information sheet* format for the layers added to the map (`text/plain`, `text/html` or `application/json`). The list of available formats is automatically retrieved from the ones supported by the WMS server and can be also manually fetched through the **Fetch supported formats** <img src = "../img/button/update_button.jpg" Button = "ms-docbutton" /> button when necessary.

!!! note
The *Tile* and the *Information sheet* configured through this option will be automatically used for all layers loaded from the involved catalog source (if not configured the default *Tile* used is `image/png` and the default *Information sheet* used is`text/plain`). For layers already loaded on the map, it is possible to change the format through the [Layer Settings](https://mapstore.readthedocs.io/en/latest/user-guide/layer-settings) tool as usual.

* *Tile size (WMS)*: it represents tile size (width and height) to be used for tiles of all layers added to the map from the catalog source (`256x256` or `512x512`). For layers already loaded on the map, it is possible to change the tile size through the [Layer Settings](https://mapstore.readthedocs.io/en/latest/user-guide/layer-settings/#display) tool as usual.

* *Set Visibility Limit*: if checked and scale limits present in the WMS Capabilities (eg. MinScaleDenominator and/or MaxScaleDenominator), these will be automatically applied to the layer settings when a layer is added to the map from this source.

* *Show metadata template*: this can be enabled when the user wants to insert in the layer description a text with metadata information
Expand Down Expand Up @@ -220,17 +223,17 @@ Enabling that option, all layers added to the map from this catalog source will

* *Allow not secure layers*: if enabled allows the unsecure catalog URLs to be used (http only). Adding layers from WMS sources with this option active will also force the layer to use the proxy for all the requests, skipping the mixed content limitation of the browser.

* *Format*: the default image format for layers added to the map (`png`, `png8`, `jpeg`, `vnd.jpeg-png`, `vnd.jpeg-png8` or `gif`). The format configured through this option will be automatically used for all layers loaded from the involved catalog source (if not configured a default `image/png` is used). For layers already loaded on the map, it is possible to change the format through the [Layer Settings](layer-settings.md#display) tool as usual.
* *Server Type*: to specify the server type of the used WMS service URL. Possible options are two: `Geoserver` or `No Vendor` which can be for example MapProxy, MapServer or other.

!!! note
In case of WMS services, the list of available formats is retrieved from the WMS server

* *Layer tile size*: it represents tile size (width and height) to be used for tiles of all layers added to the map from the catalog source (`256x256` or `512x512`). For layers already loaded on the map, it is possible to change the tile size through the [Layer Settings](https://mapstore.readthedocs.io/en/latest/user-guide/layer-settings/#display) tool as usual.
If the **No Vendor** is set, then [MapStore](https://mapstore.geosolutionsgroup.com/mapstore/#/) will not use any vendor option supported only by GeoServer in the OGC requests where this source is involved.

* *Server Type*: to specify the server type of the used WMS service URL. Possible options are two: `Geoserver` or `No Vendor` which can be for example MapProxy, MapServer or other.
* *Format*: to define the default *Tile* format for the layers added to the map (`png`, `png8`, `jpeg`, `vnd.jpeg-png`, `vnd.jpeg-png8` or `gif`) and to define the default *Information sheet* format for the layers added to the map (`text/plain`, `text/html` or `application/json`). The list of available formats is automatically retrieved from the ones supported by the WMS server and can be also manually fetched through the **Fetch supported formats** <img src = "../img/button/update_button.jpg" Button = "ms-docbutton" /> button when necessary.

!!! note
If the **No Vendor** is set, then [MapStore](https://mapstore.geosolutionsgroup.com/mapstore/#/) will not use any vendor option supported only by GeoServer in the OGC requests where this source is involved.
The *Tile* and the *Information sheet* configured through this option will be automatically used for all layers loaded from the involved catalog source (if not configured the default *Tile* used is `image/png` and the default *Information sheet* used is`text/plain`). For layers already loaded on the map, it is possible to change the format through the [Layer Settings](https://mapstore.readthedocs.io/en/latest/user-guide/layer-settings) tool as usual.

* *Tile size (WMS)*: it represents tile size (width and height) to be used for tiles of all layers added to the map from the catalog source (`256x256` or `512x512`). For layers already loaded on the map, it is possible to change the tile size through the [Layer Settings](https://mapstore.readthedocs.io/en/latest/user-guide/layer-settings/#display) tool as usual.

* *Domain aliases*: available only for WMS catalogs type. This option is used to improve the performances of the application for tiled layer requests when multiple domains can be defined server side for the configured catalog source in MapStore (domain sharding). The user can configure multiple URLs referring to the same WMS service through the **Add alias** <img src = "../img/button/++.jpg" Button = "ms-docbutton" /> button. Useful information about other kind of performance improvements can be found in the [MapStore online training documentation](https://training.mapstore.geosolutionsgroup.com/administration/best.html#performances).

Expand Down
Binary file modified docs/user-guide/img/catalog/advanced_settings_csw.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user-guide/img/catalog/advanced_settings_wms.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user-guide/img/layer-settings/display-3d-tiles.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion docs/user-guide/layer-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,15 @@ When the *Use cache options* is enabled, more controls are enabled so that it is
!!!Warning
On the *Display* tab, only the following options are available for a **3D Tile** layer:

<img src="../img/layer-settings/display-3d-tiles.jpg" class="ms-docimage" style="max-width:450px;"/>

* The **Visibility limits** to display the layer only within certain scale limits, as reported above.

* The **Height Offset** above the ground.

<img src="../img/layer-settings/display-3d-tiles.jpg" class="ms-docimage" style="max-width:450px;"/>
* The **Format** choosing between `3D Model` and `Point Cloud`. The *Point Cloud* option allows the user to customize the `Maximum Attenuation` of the points based on the distance from the current viewpoint and customize the `Lighting strength` and the `Lighting radius` to improve visualization of the point cloud.

<img src="../img/layer-settings/display-point-cloud.jpg" class="ms-docimage" style="max-width:450px;"/>

## Fields

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@
"eventlistener": "0.0.1",
"file-saver": "1.3.3",
"filtrex": "2.1.0",
"font-awesome": "4.7.0",
"fs-extra": "3.0.1",
"git-revision-webpack-plugin": "5.0.0",
"history": "4.6.1",
Expand Down Expand Up @@ -220,7 +221,7 @@
"lodash": "4.17.21",
"lrucache": "1.0.3",
"md5": "2.3.0",
"moment": "2.21.0",
"moment": "2.29.4",
"node-geo-distance": "1.2.0",
"object-assign": "4.1.1",
"object-fit-images": "3.2.4",
Expand Down
1 change: 0 additions & 1 deletion project/standard/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
</style>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" />
<link rel="shortcut icon" type="image/png" href="https://cdn.jslibs.mapstore2.geo-solutions.it/leaflet/favicon.ico" />
<!--script src="https://maps.google.com/maps/api/js?v=3"></script-->
<!--script src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.10/proj4.js"></script-->
Expand Down
1 change: 0 additions & 1 deletion project/standard/templates/indexTemplate.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
</style>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" />
<link rel="shortcut icon" type="image/png" href="https://cdn.jslibs.mapstore2.geo-solutions.it/leaflet/favicon.ico" />
<!--script src="https://maps.google.com/maps/api/js?v=3"></script-->
<script async type="text/javascript" src="https://unpkg.com/[email protected]/es5.js" onload="checkBrowser()"></script>
Expand Down
4 changes: 2 additions & 2 deletions project/standard/templates/web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
</dependencies>

<build>
<finalName>__PROJECTNAME__</finalName>
<finalName>mapstore</finalName>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
Expand All @@ -91,7 +91,7 @@
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/__PROJECTNAME__</outputDirectory>
<outputDirectory>${basedir}/target/mapstore</outputDirectory>
<encoding>UTF-8</encoding>
<resources>
<resource>
Expand Down
7 changes: 7 additions & 0 deletions web/client/actions/__tests__/catalog-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,13 @@ describe('Test correctness of the catalog actions', () => {
expect(retval).toExist();
expect(retval.type).toBe(ADD_SERVICE);
});
it('addService with options', () => {
const options = {"test": "1"};
var retval = addService(options);
expect(retval).toExist();
expect(retval.type).toBe(ADD_SERVICE);
expect(retval.options).toEqual(options);
});
it('addCatalogService', () => {
var retval = addCatalogService(service);

Expand Down
12 changes: 10 additions & 2 deletions web/client/actions/__tests__/details-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,21 @@ describe('details actions tests', () => {
const a = closeDetailsPanel();
expect(a.type).toBe(CLOSE_DETAILS_PANEL);
});
it('detailsLoaded', () => {
it('detailsLoaded for map', () => {
const mapId = 1;
const detailsUri = "sada/da/";
const a = detailsLoaded(mapId, detailsUri);
expect(a.type).toBe(DETAILS_LOADED);
expect(a.detailsUri).toBe(detailsUri);
expect(a.mapId).toBe(mapId);
expect(a.id).toBe(mapId);
});
it('detailsLoaded for dashboard', () => {
const dashboardId = 1;
const detailsUri = "sada/da/";
const a = detailsLoaded(dashboardId, detailsUri);
expect(a.type).toBe(DETAILS_LOADED);
expect(a.detailsUri).toBe(detailsUri);
expect(a.id).toBe(dashboardId);
});
it('updateDetails', () => {
const a = updateDetails('text');
Expand Down
40 changes: 39 additions & 1 deletion web/client/actions/__tests__/wfsquery-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import expect from 'expect';
import {
LAYER_SELECTED_FOR_SEARCH,
FEATURE_TYPE_SELECTED,
FEATURE_TYPE_LOADED,
FEATURE_TYPE_ERROR,
FEATURE_LOADING,
FEATURE_LOADED,
Expand All @@ -25,6 +26,7 @@ import {
initQueryPanel,
layerSelectedForSearch,
featureTypeSelected,
featureTypeLoaded,
featureTypeError,
featureLoading,
featureLoaded,
Expand All @@ -47,13 +49,36 @@ describe('wfsquery actions', () => {
let {type} = initQueryPanel();
expect(type).toBe(INIT_QUERY_PANEL);
});
it('featureTypeSelected', () => {
it('featureTypeSelected without owner', () => {
let {type, url, typeName, fields} = featureTypeSelected("/geoserver/", "topp:states", [{name: "name", alias: "alias"}]);
expect(type).toBe(FEATURE_TYPE_SELECTED);
expect(url).toBe("/geoserver/");
expect(typeName).toBe("topp:states");
expect(fields).toEqual([{name: "name", alias: "alias"}]);
});

it('featureTypeSelected with owner as parameter', () => {
let {type, url, typeName, fields, owner} = featureTypeSelected("/geoserver/", "topp:states", [{name: "name", alias: "alias"}], "owner");
expect(type).toBe(FEATURE_TYPE_SELECTED);
expect(url).toBe("/geoserver/");
expect(typeName).toBe("topp:states");
expect(fields).toEqual([{name: "name", alias: "alias"}]);
expect(owner).toBe("owner");
});
it('featureTypeLoaded without owner', () => {
let {type, typeName, featureType} = featureTypeLoaded("topp:states", "featureType");
expect(type).toBe(FEATURE_TYPE_LOADED);
expect(typeName).toBe("topp:states");
expect(featureType).toBe("featureType");
});

it('featureTypeLoaded with owner as parameter', () => {
let {type, typeName, featureType, owner} = featureTypeLoaded("topp:states", "featureType", "owner");
expect(type).toBe(FEATURE_TYPE_LOADED);
expect(typeName).toBe("topp:states");
expect(featureType).toBe("featureType");
expect(owner).toBe("owner");
});
it('featureTypeError', () => {
let {type, error, typeName} = featureTypeError("topp:states", "ERROR");
expect(type).toBe(FEATURE_TYPE_ERROR);
Expand All @@ -71,6 +96,12 @@ describe('wfsquery actions', () => {
expect(typeName).toBe("topp:states");
expect(feature).toBe(feature);
});
it('featureLoaded with owner as parameter', () => {
let {type, typeName, feature} = featureLoaded("topp:states", "feature");
expect(type).toBe(FEATURE_LOADED);
expect(typeName).toBe("topp:states");
expect(feature).toBe(feature);
});
it('featureError', () => {
let {type, typeName, error} = featureError("topp:states", "ERROR");
expect(type).toBe(FEATURE_ERROR);
Expand All @@ -95,6 +126,13 @@ describe('wfsquery actions', () => {
expect(searchUrl).toBe("searchUrl");
expect(filterObj).toBe("filterObj");
});
it('createQuery with owner param', () => {
let {type, searchUrl, filterObj, owner} = createQuery("searchUrl", "filterObj", "owner");
expect(type).toBe(QUERY_CREATE);
expect(searchUrl).toBe("searchUrl");
expect(filterObj).toBe("filterObj");
expect(owner).toBe("owner");
});
it('query', () => {
let {type, searchUrl, filterObj} = query("searchUrl", "filterObj");
expect(type).toBe(QUERY);
Expand Down
13 changes: 12 additions & 1 deletion web/client/actions/__tests__/widgets-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,22 @@ import {
toggleTray,
toggleMaximize,
replaceWidgets,
REPLACE
REPLACE,
init, INIT
} from '../widgets';

describe('Test correctness of the widgets actions', () => {

it('init', () => {
const defaults = {ratio_md: {
w: 4,
h: 4
}};
const retval = init(defaults);
expect(retval).toExist();
expect(retval.type).toBe(INIT);
expect(retval.cfg).toEqual(defaults);
});
it('exportCSV', () => {
const data = [{a: "a"}];
const retval = exportCSV({data, title: "TITLE"});
Expand Down
Loading

0 comments on commit f0414a3

Please sign in to comment.