-
Notifications
You must be signed in to change notification settings - Fork 446
Fix : #11455 Added a new Plugin called CameraPosition. #11514
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
Merged
allyoucanmap
merged 20 commits into
geosolutions-it:master
from
anup39:fix_cameraposition_11455
Jan 29, 2026
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
54bb452
MOCKUP
allyoucanmap 8141b18
Added CameraPosition plugin
anup39 c36bbae
Merge branch 'master' of github.com:geosolutions-it/MapStore2 into fi…
anup39 77dcf15
Added translations
anup39 e24c6a8
Fixes : Testcase
anup39 0bc39f1
Fixes useEffect in Cameraposition
anup39 c552b17
update docma
anup39 7d609c2
Fixed merged conflict
anup39 ba15295
fix: conflict
anup39 1d58fc3
fix: position of camera position
anup39 213c4ce
Refactor and test case added
8859934
Merge branch 'master' of github.com:geosolutions-it/MapStore2 into fi…
5f2f3b5
Removed actions from map related to camera position
2beddc1
Remove empty line
9f3c333
Removed reducers related to camera position
b73039b
Fix import of actions in Camera Position plugin
2cfd8f7
Fix translations for IT
9947c73
Fix styles
47fd809
Reviewed styles
d5f023e
linting issues
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
86 changes: 86 additions & 0 deletions
86
web/client/components/mapcontrols/mouseposition/HeightTypeSelector.jsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| /* | ||
| * Copyright 2025, GeoSolutions Sas. | ||
| * All rights reserved. | ||
| * | ||
| * This source code is licensed under the BSD-style license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ | ||
|
|
||
| import PropTypes from "prop-types"; | ||
| import React from "react"; | ||
| import { ControlLabel, FormControl, FormGroup } from "react-bootstrap"; | ||
| import FlexBox from "../../layout/FlexBox"; | ||
| import { getMessageById } from "../../../utils/LocaleUtils"; | ||
|
|
||
| /** | ||
| * HeightTypeSelector allows to select a height type from a combobox. | ||
| * @memberof components.mousePosition | ||
| * @class | ||
| * @prop {string} id the id of the component | ||
| * @prop {string|object|function} label the label shown next to the combobox (if editHeight is true) | ||
| * @prop {string[]} filterAllowedHeight list of allowed height type in the combobox list. Accepted values are "Ellipsoidal" and "MSL" | ||
| * @prop {string} heightType the current selected height type | ||
| * @prop {boolean} enabled if true shows the component | ||
| * @prop {function} onHeightTypeChange callback when a new height type is selected | ||
| */ | ||
|
|
||
| const HeightTypeSelector = (props, context) => { | ||
| const { | ||
| id, | ||
| label, | ||
| availableHeightTypes, | ||
| heightType, | ||
| enabled, | ||
| onHeightTypeChange | ||
| } = props; | ||
|
|
||
| if (!enabled) { | ||
| return null; | ||
| } | ||
|
|
||
| const options = availableHeightTypes.map(({ value, labelId }) => ( | ||
| <option value={value} key={value}> | ||
| {getMessageById(context.messages, labelId)} | ||
| </option> | ||
| )); | ||
|
|
||
| return ( | ||
| <FlexBox component={FormGroup} centerChildrenVertically gap="sm"> | ||
| <ControlLabel style={{ margin: 0, fontWeight: 'normal', minWidth: 'max-content' }}> | ||
| {label} | ||
| </ControlLabel> | ||
| <FormControl | ||
| componentClass="select" | ||
| id={id} | ||
| value={heightType} | ||
| onChange={(e) => onHeightTypeChange(e.target.value)} | ||
| bsSize="small" | ||
| style={{ borderRadius: 4 }} | ||
| > | ||
| {options} | ||
| </FormControl> | ||
|
Comment on lines
+49
to
+61
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. all inline styles should be inside a less/css file |
||
| </FlexBox> | ||
| ); | ||
| }; | ||
|
|
||
| HeightTypeSelector.propTypes = { | ||
| id: PropTypes.string, | ||
| label: PropTypes.oneOfType([PropTypes.func, PropTypes.string, PropTypes.object]), | ||
| filterAllowedHeight: PropTypes.array, | ||
| heightType: PropTypes.string, | ||
| enabled: PropTypes.bool, | ||
| onHeightTypeChange: PropTypes.func | ||
| }; | ||
|
|
||
| HeightTypeSelector.contextTypes = { | ||
| messages: PropTypes.object | ||
| }; | ||
|
|
||
| HeightTypeSelector.defaultProps = { | ||
| id: "mapstore-heightselector", | ||
| heightType: null, | ||
| onHeightTypeChange: function() {}, | ||
| enabled: false | ||
| }; | ||
|
|
||
| export default HeightTypeSelector; | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please move all the inline styles inside the less theme. Also let's reduce the width of this selector to 90px
