-
Notifications
You must be signed in to change notification settings - Fork 353
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
Thredds palettes #7059
Open
sixlighthouses
wants to merge
36
commits into
main
Choose a base branch
from
thredds-palettes
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Thredds palettes #7059
Changes from 19 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
e09266a
read list of palettes from Thredds server layer metadata service
sixlighthouses 33e4694
temp fix for using availablePalettes trait
sixlighthouses ad99869
use 2 new traits for Thredds Palettes in WebMapServiceCatalogItemTrai…
sixlighthouses f00d68a
Merge remote-tracking branch 'origin/main' into thredds-palettes
sixlighthouses 7e2b20e
Merge remote-tracking branch 'origin/main' into thredds-palettes
sixlighthouses 1db060e
merge main and update CHANGES
sixlighthouses 9eefa33
Update lib/Models/Catalog/Ows/WebMapServiceCapabilitiesStratum.ts
sixlighthouses 1a477f4
Update lib/Models/Catalog/Ows/WebMapServiceCapabilitiesStratum.ts
sixlighthouses 1227d07
Update lib/Models/Catalog/Ows/WebMapServiceCapabilitiesStratum.ts
sixlighthouses ecabd69
fix prettier issue
sixlighthouses dc1a2b5
Merge remote-tracking branch 'origin/main' into thredds-palettes
sixlighthouses 3e23262
remove superfluous anon function
sixlighthouses e9209ff
Merge remote-tracking branch 'origin/main' into thredds-palettes
sixlighthouses 54b4420
if no palette URL is in the style abstract resolve and return [] rath…
sixlighthouses 1d22d63
Merge remote-tracking branch 'origin/main' into thredds-palettes
sixlighthouses 843ab42
remove thredds prefix from traits name, use the uri.clone method to g…
sixlighthouses 086f24b
Merge remote-tracking branch 'origin/main' into thredds-palettes
sixlighthouses edc06b2
wip
sixlighthouses 38c8c9d
Merge remote-tracking branch 'origin/main' into thredds-palettes
sixlighthouses a14d46e
move initial fetchPalettes into forceLoadMetadata
sixlighthouses 0fd38b8
palettes correctly persisting after style change
sixlighthouses 9f91a7d
wip
sixlighthouses 41892d2
correct the check for undefined default style and remove console.logs
sixlighthouses 722db12
run prettier
sixlighthouses 2528d60
Merge remote-tracking branch 'origin/main' into thredds-palettes
sixlighthouses bacefe0
add CHANGES entry
sixlighthouses 0dfd466
Merge branch 'main' into thredds-palettes
sixlighthouses 283bda1
Merge branch 'main' into thredds-palettes
sixlighthouses f8d87f0
wip
sixlighthouses c07fb88
Merge remote-tracking branch 'origin/main' into thredds-palettes
sixlighthouses e8fc7b6
wip
sixlighthouses 2ee6c8f
wip
sixlighthouses d8d11b6
correct the traits for new loadable stratum NCWMSGetMetaDataStratum
sixlighthouses 2ddd71c
remove unused imports
sixlighthouses d06645c
Merge remote-tracking branch 'origin/main' into thredds-palettes
sixlighthouses 545cf4b
wip
sixlighthouses File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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 |
---|---|---|
|
@@ -69,6 +69,16 @@ export class WebMapServiceAvailableLayerStylesTraits extends ModelTraits { | |
styles?: WebMapServiceAvailableStyleTraits[]; | ||
} | ||
|
||
export class WebMapServiceAvailablePaletteTraits extends ModelTraits { | ||
@primitiveTrait({ | ||
type: "string", | ||
name: "URL", | ||
description: | ||
"The URL of the GetMetadata request for the palette. This is used to get the palettes available for a layer." | ||
}) | ||
url?: string; | ||
} | ||
|
||
export class WebMapServiceAvailableDimensionTraits extends ModelTraits { | ||
@primitiveTrait({ | ||
type: "string", | ||
|
@@ -316,6 +326,45 @@ export default class WebMapServiceCatalogItemTraits extends mixTraits( | |
}) | ||
colorScaleMaximum: number = 50; | ||
|
||
// boolean trait showPalettes | ||
@primitiveTrait({ | ||
type: "boolean", | ||
name: "Show Palettes", | ||
description: | ||
"showPalettes is a non-standard property supported by THREDDS servers. This property is ignored unless WebMapServiceCatalogItem's isThredds is true. The default value is false." | ||
}) | ||
showPalettes: boolean = false; | ||
|
||
@primitiveTrait({ | ||
type: "string", | ||
name: "Palette", | ||
description: | ||
"palette is a non-standard property supported by THREDDS servers. This property is ignored unless WebMapServiceCatalogItem's isThredds is true. The default value is 'default'." | ||
}) | ||
palette?: string = "default"; | ||
|
||
@primitiveArrayTrait({ | ||
type: "string", | ||
name: "Palettes", | ||
description: | ||
"Used to store the palettes available for a layer. This is a non-standard property supported by THREDDS servers. This property is ignored unless WebMapServiceCatalogItem's isThredds is true. The default value is ['default']." | ||
}) | ||
palettes?: string[] = []; | ||
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. Can you please rename this to |
||
|
||
@primitiveTrait({ | ||
type: "string", | ||
name: "Default Palette", | ||
description: "The name of the defaultPalette" | ||
}) | ||
defaultPalette?: string; | ||
|
||
@primitiveArrayTrait({ | ||
type: "string", | ||
name: "No Palettes styles", | ||
description: "Styles that do not require palettes" | ||
}) | ||
noPaletteStyles: string[] = []; | ||
|
||
@primitiveTrait({ | ||
type: "boolean", | ||
name: "Use WMS version 1.3.0", | ||
|
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.
The
user
stratum should only be used for user-driven changes to traits. The currentfetchPalettes
implementation makes changes to theuser
stratum - this means that when a share-link is generated, the palettes will be included.Can you please move the
fetchPalettes
logic into a newLoadableStratum
(you can call itNcMWSGetMetadataStratum
) ?