-
Notifications
You must be signed in to change notification settings - Fork 362
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
Add support for WMS 1.1.1 + other WMS improvements #6173
Conversation
…` to `LegendTraits`
if (this.invalidLayers.length > 0) | ||
throw new TerriaError({ | ||
sender: this, | ||
title: i18next.t("models.webMapServiceCatalogItem.noLayerFoundTitle"), | ||
message: i18next.t( | ||
"models.webMapServiceCatalogItem.noLayerFoundMessage", | ||
{ name: getName(this), layers: this.invalidLayers.join(", ") } | ||
) | ||
}); | ||
} |
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.
Doubt: So we fail the dataset even if we have valid layers? Is that the intention?
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.
I think for the moment this is fine - as it is what would happen previous to the PR.
But in the future it might be worth showing a warning message for invalid layers, and then just showing valid layers anyway
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.
Great work @nf-s.
Just one comment.
Fixes TerriaJS/neii-viewer#218 #5410 #4777 #2590
useWmsVersion130
trait - Use WMS version 1.3.0. True by default (unlessurl
has"version=1.1.1"
or"version=1.1.0"
), if false, then WMS version 1.1.1 will be used.getFeatureInfoFormat
trait - Format parameter to pass to GetFeatureInfo requests (asinfo_format
query parameter). Defaults to "application/json", "application/vnd.ogc.gml", "text/html" or "text/plain" - depending on GetCapabilities responselegendBackgroundColor
toLegendOwnerTraits
andbackgroundColor
toLegendTraits
sld_version=1.1.0
toGetLegendGraphics
requests"styles","version","format","srs","crs"
conflicting query parameters from WMSurl
styles
,tileWidth
,tileHeight
andcrs
/srs
will use value inurl
if it is defined (similar to existing behavior withlayers
andversion
)layers
(eg if the specifiedlayers
don't exist inGetCapabilities
)Notes about WMS query changes
WMS
Exceptions
application/vnd.ogc.se_xml
is the default value for WMS 1.1.1XML
is the new default for WMS 1.3.0From WMS 1.1.1 spec
From WMS 1.3.0 spec
Add
sld_version
toGetLegendGraphics
requestsAs it is mandatory
From WMS-SLD 1.1.0 spec
Test: WMS 1.1.1 and Legend backgroundColor
Catalog
After vs Before
You can ignore error in
main
CI linkNote in
main
Test: random WMS working before and after
Some random other WMS layers in NationalMap - should be unchanged for both branches
Test: WMS with invalid layers
After vs Before
Checklist
doc/
.