Skip to content
Open
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
5 changes: 3 additions & 2 deletions web/client/components/TOC/fragments/settings/Display.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,14 @@ export default class extends React.Component {
{this.props.element.type === "flatgeobuf" && <Row>
<Col xs={12}>
<FormGroup>
<ControlLabel><Message msgId="layerProperties.maxFeaturesInView" /></ControlLabel>
<ControlLabel>
<Message msgId="layerProperties.maxFeaturesInView" />&nbsp;<InfoPopover text={<Message msgId="layerProperties.maxFeaturesInViewTooltip" />} />
</ControlLabel>
<IntlNumberFormControl
data-qa="display-max-features-in-view"
type="number"
min={1}
step={1}
placeholder="layerProperties.maxFeaturesInViewPlaceholder"
value={this.props.element.maxFeaturesInView === undefined ? '' : this.props.element.maxFeaturesInView}
onChange={this.onMaxFeaturesInViewChange}/>
</FormGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ describe('test Layer Properties Display module component', () => {
const maxFeaturesInView = document.querySelector('[data-qa="display-max-features-in-view"]');
expect(maxFeaturesInView).toBeTruthy();
expect(maxFeaturesInView.value).toBe('7');
expect(document.querySelector('.mapstore-info-popover')).toBeTruthy();
ReactTestUtils.Simulate.change(maxFeaturesInView, { target: { value: '15' } });
expect(spyOn.calls[0].arguments).toEqual([ 'maxFeaturesInView', 15 ]);
ReactTestUtils.Simulate.change(maxFeaturesInView, { target: { value: '' } });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ import { FormGroup, Checkbox, ControlLabel, FormControl } from "react-bootstrap"

import Message from "../../../I18N/Message";
import InfoPopover from '../../../widgets/widget/InfoPopover';
import localizedProps from '../../../misc/enhancers/localizedProps';

const LocalizedFormControl = localizedProps('placeholder')(FormControl);

const parseMaxFeaturesInView = (event) => {
const maxFeaturesInView = Number(event?.target?.value);
Expand Down Expand Up @@ -65,13 +62,14 @@ export default ({
</FormGroup>}
{!isNil(service.type) && service.type === "flatgeobuf" &&
<FormGroup className="form-group" controlId="maxFeaturesInView" key="maxFeaturesInView">
<ControlLabel><Message msgId="layerProperties.maxFeaturesInView" /></ControlLabel>
<LocalizedFormControl
<ControlLabel>
<Message msgId="layerProperties.maxFeaturesInView" />&nbsp;<InfoPopover text={<Message msgId="layerProperties.maxFeaturesInViewTooltip" />} />
</ControlLabel>
<FormControl
data-qa="catalog-max-features-in-view"
type="number"
min={1}
step={1}
placeholder="layerProperties.maxFeaturesInViewPlaceholder"
value={service.layerOptions?.maxFeaturesInView === undefined ? '' : service.layerOptions?.maxFeaturesInView}
onChange={(e) => onChangeServiceProperty("layerOptions", {
...service.layerOptions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ describe('Test common advanced settings', () => {
const maxFeaturesInView = document.querySelector("[data-qa='catalog-max-features-in-view']");
expect(maxFeaturesInView).toBeTruthy();
expect(maxFeaturesInView.value).toBe('7');
expect(document.querySelector('.mapstore-info-popover')).toBeTruthy();
TestUtils.Simulate.change(maxFeaturesInView, { "target": { "value": '15' }});
expect(spyOn.calls[0].arguments).toEqual([
'layerOptions',
Expand Down
2 changes: 1 addition & 1 deletion web/client/translations/data.de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
"heightOffset": "Höhenversatz (m)",
"wmsLayerTileSize": "Kachelgröße (WMS)",
"maxFeaturesInView": "Maximale Anzahl von Features in der Ansicht",
"maxFeaturesInViewPlaceholder": "Wenn der Wert undefiniert ist, funktioniert die aktuelle Funktionalität wie gewohnt (d. h. alle Features laden)",
"maxFeaturesInViewTooltip": "Wenn der Wert undefiniert ist, funktioniert die aktuelle Funktionalität wie gewohnt (d. h. alle Features laden)",
"serverType": "Servertyp",
"formatError": "Es war nicht möglich, Format und Informationsblattformat vom konfigurierten Dienst abzurufen. Wahrscheinlich verwenden Sie einen No-Vendor-Dienst und dieser wird nicht unterstützt (z. B. GeoNetwork).",
"serverTypeOption": {
Expand Down
2 changes: 1 addition & 1 deletion web/client/translations/data.en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
"heightOffset": "Height offset (m)",
"wmsLayerTileSize": "Tile size (WMS)",
"maxFeaturesInView": "Max features in view",
"maxFeaturesInViewPlaceholder": "When the value is undefined current functionality works as usual(i.e. load all features)",
"maxFeaturesInViewTooltip": "When the value is undefined current functionality works as usual (i.e. load all features)",
"serverType": "Server Type",
"formatError": "It was not possible to fetch format and information sheet format from the service configured. Probably you are using a No Vendor service and this is not supported (e.g. GeoNetwork)",
"serverTypeOption": {
Expand Down
2 changes: 1 addition & 1 deletion web/client/translations/data.es-ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
"heightOffset": "Desplazamiento de altura (m)",
"wmsLayerTileSize": "Tamaño del mosaico (WMS)",
"maxFeaturesInView": "Número máximo de entidades en la vista",
"maxFeaturesInViewPlaceholder": "Cuando el valor es indefinido, la funcionalidad actual funciona como de costumbre (es decir, cargar todas las entidades)",
"maxFeaturesInViewTooltip": "Cuando el valor es indefinido, la funcionalidad actual funciona como de costumbre (es decir, cargar todas las entidades)",
"serverType": "Tipo de servidor",
"formatError": "No fue posible recuperar el formato y el formato de la hoja de información del servicio configurado. Probablemente esté utilizando un servicio sin proveedor y no es compatible (por ejemplo, GeoNetwork)",
"serverTypeOption": {
Expand Down
2 changes: 1 addition & 1 deletion web/client/translations/data.fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
"heightOffset": "Décalage en hauteur (m)",
"wmsLayerTileSize": "Taille de la tuile (WMS)",
"maxFeaturesInView": "Nombre maximal d'entités dans la vue",
"maxFeaturesInViewPlaceholder": "Lorsque la valeur est indéfinie, la fonctionnalité actuelle fonctionne comme d'habitude (c'est-à-dire charger toutes les entités)",
"maxFeaturesInViewTooltip": "Lorsque la valeur est indéfinie, la fonctionnalité actuelle fonctionne comme d'habitude (c'est-à-dire charger toutes les entités)",
"serverType": "Type de serveur",
"formatError": "Il n'a pas été possible de récupérer le format et le format de la fiche d'information à partir du service configuré. Vous utilisez probablement un service No Vendor et celui-ci n'est pas pris en charge (par exemple GeoNetwork)",
"serverTypeOption": {
Expand Down
2 changes: 1 addition & 1 deletion web/client/translations/data.it-IT.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
"heightOffset": "Spostamento in altezza (m)",
"wmsLayerTileSize": "Dimensione tile (WMS)",
"maxFeaturesInView": "Numero massimo di feature in vista",
"maxFeaturesInViewPlaceholder": "Quando il valore è indefinito, la funzionalità attuale funziona come di consueto (cioè carica tutte le feature)",
"maxFeaturesInViewTooltip": "Quando il valore è indefinito, la funzionalità attuale funziona come di consueto (cioè carica tutte le feature)",
"serverType": "Tipo di Server",
"formatError": "Non è stato possibile recuperare le informazioni sui formati dal servizio configurato. Probabilmente stai usando un servizio \"No Vendor\" e questo non è supportato (es. GeoNetwork)",
"serverTypeOption": {
Expand Down
Loading