-
Notifications
You must be signed in to change notification settings - Fork 409
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
#8334 Persist viewer type in the map configuration #8990
Conversation
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.
Generally looks good. A few suggestion for clean up in the inline comments.
notes I asked serveral "use constants" in tests. It is a good practice, anyway I don't want to be to much boring
web/client/components/widgets/builder/wizard/map/enhancers/handleMapSelect.js
Outdated
Show resolved
Hide resolved
@@ -28,7 +29,7 @@ class Manager extends React.Component { | |||
|
|||
static defaultProps = { | |||
items: [], | |||
mapType: "openlayers", | |||
mapType: MapLibraries.OPENLAYERS, |
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.
This can be removed, looks a copy and paste error
@@ -80,7 +81,7 @@ class ManagerMenu extends React.Component { | |||
itemSelected: () => {}, | |||
title: <MenuItem header>Manager</MenuItem>, | |||
controls: [], | |||
mapType: "leaflet", | |||
mapType: MapLibraries.LEAFLET, |
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.
same of the other ToolContainer. it is used in it only. Moreover is set to leaflet and not mapped to the state, so I think it can be removed.
@offtherailz as discussed I'll move visualizationMode inside the map config |
Description
This PR introduces the concept of visualization mode inside mapstore with following changes:
visualizationMode
information inside the saved map configuration to persist the mode every time a map is opened/viewer/openlayers/1
. This change has retrocompatible support by recognizing the visualization mode based on mapType provided in the url and replacing the url with the new format/viewer/1
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x", remove the others)
Issue
What is the current behavior?
#8334
What is the new behavior?
Breaking change
Does this PR introduce a breaking change? (check one with "x", remove the other)
Other useful information