Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Add wmts (#1571)" #1577

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

## [Unreleased]

### Added

- WMTS Services are now supported as custom user layers.

### Changed

- Updated the style of bulk edit form.
Expand Down
51 changes: 0 additions & 51 deletions src/client/cypress/e2e/settings/mapSettings.cy.js

This file was deleted.

6 changes: 0 additions & 6 deletions src/client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"@mui/system": "^5.16.5",
"@mui/x-data-grid": "^7.11.1",
"@react-hook/resize-observer": "^1.2.6",
"@types/proj4": "^2.5.5",
"axios": "^1.7.1",
"d3": "^7.9.0",
"date-fns": "^2.30.0",
Expand Down
2 changes: 0 additions & 2 deletions src/client/public/locale/de/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,6 @@
"nothingToShow": "Nichts zu zeigen",
"np": "Keine Angabe",
"oneSelected": "Ein Bohrung ausgewählt",
"onlyEPSG2056Supported": "Nur EPSG:2056 wird unterstützt.",
"onlyWmsAndWmtsSupported": "Nur Web Map Services (WMS) und Web Map Tile Services (WMTS) werden unterstützt.",
"openBorehole": "offenes Bohrloch",
"order": "Reihenfolge",
"organic_component": "Organische Komponenten",
Expand Down
2 changes: 0 additions & 2 deletions src/client/public/locale/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,6 @@
"nothingToShow": "Nothing to display",
"np": "Not specified",
"oneSelected": "One borehole selected",
"onlyEPSG2056Supported": "Only EPSG:2056 is supported",
"onlyWmsAndWmtsSupported": "Sono supportati solo i servizi WMS (Web Map Services) e WMTS (Web Map Tile Services).",
"openBorehole": "open hole",
"order": "Order",
"organic_component": "Organic components",
Expand Down
2 changes: 0 additions & 2 deletions src/client/public/locale/fr/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,6 @@
"nothingToShow": "Rien à montrer",
"np": "Sans indication",
"oneSelected": "Un forage sélectionné",
"onlyEPSG2056Supported": "Seulement le système de coordonnées EPSG:2056 est pris en charge.",
"onlyWmsAndWmtsSupported": "Seulement Web Map Services (WMS) et Web Map Tile Services (WMTS) sont pris en charge.",
"openBorehole": "forage ouvert",
"order": "Ordre",
"organic_component": "Composants organiques",
Expand Down
2 changes: 0 additions & 2 deletions src/client/public/locale/it/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,6 @@
"nothingToShow": "Niente da mostrare",
"np": "Senza indicazioni",
"oneSelected": "Una perforazione selezionata",
"onlyEPSG2056Supported": "È supportato solo EPSG:2056.",
"onlyWmsAndWmtsSupported": "Seulement Web Map Services (WMS) et Web Map Tile Services (WMTS) sont pris en charge.",
"openBorehole": "perforazione aperta",
"order": "Ordine",
"organic_component": "Componenti organici",
Expand Down
1 change: 0 additions & 1 deletion src/client/src/api-lib/ReduxStateInterfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export interface Setting {
}

export interface SettingData {
efilter: string;
map: {
explorer: string;
};
Expand Down
2 changes: 1 addition & 1 deletion src/client/src/api-lib/actions/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function patchSettings(tree, value, key = null) {
tree: tree,
value: value,
};
if (key) {
if (key !== null) {
payload.key = key;
}
return fetch("/setting", payload);
Expand Down
3 changes: 3 additions & 0 deletions src/client/src/components/map/mapComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { Cluster } from "ol/source";
import TileWMS from "ol/source/TileWMS";
import VectorSource from "ol/source/Vector";
import WMTS from "ol/source/WMTS";
import WMTSTileGrid from "ol/tilegrid/WMTS";
import proj4 from "proj4";
import PropTypes from "prop-types";
import { getGeojson } from "../../api-lib";
Expand Down Expand Up @@ -222,6 +223,8 @@ class MapComponent extends React.Component {
opacity: 1,
source: new WMTS({
...layer.conf,
projection: getProjection(layer.conf.projection),
tileGrid: new WMTSTileGrid(layer.conf.tileGrid),
}),
zIndex: layer.position + 1,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,18 @@ import TranslationText from "../../../../components/legacyComponents/translation
import * as Styled from "./styles";

const EditorSettingList = props => {
const { data, toggleFilter, attribute, toggleField, listName, codes, toggleFieldArray, toggleFilterArray } = props;
const {
data,
toggleFilter,
attribute,
toggleField,
listName,
geocode,
codes,
toggleFieldArray,
toggleFilterArray,
type,
} = props;

const { t } = useTranslation();

Expand All @@ -22,8 +33,15 @@ const EditorSettingList = props => {
for (let idx = 0; idx < codes.data.layer_kind.length; idx++) {
const element = codes.data.layer_kind[idx];

if (element.code === "Geol") {
return element.conf.fields[field];
if (element.code === geocode) {
if (type === "editor" && _.isObject(element.conf) && _.has(element.conf, `fields.${field}`)) {
return element.conf.fields[field];
}
if (type === "viewer" && _.isObject(element.conf) && _.has(element.conf, `viewerFields.${field}`)) {
return element.conf.viewerFields[field];
} else {
return false;
}
}
}
}
Expand Down
Loading
Loading