Skip to content
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

[Web] Home page maps broken #48

Open
zachsa opened this issue Nov 3, 2024 · 2 comments
Open

[Web] Home page maps broken #48

zachsa opened this issue Nov 3, 2024 · 2 comments
Assignees

Comments

@zachsa
Copy link
Collaborator

zachsa commented Nov 3, 2024

I had a look at why the home page maps stopped rendering. It looks like the WMS service was switched off in favor of a WMTS service. So in the React code:

This:

const SERVICE_URL = `https://nrt.cmems-du.eu/thredds/wms/cmems_mod_glo_phy-thetao_anfc_0.083deg_P1D-m?request=GetCapabilities&service=WMS`

const TILE_URL = `https://nrt.cmems-du.eu/thredds/wms/cmems_mod_glo_phy-thetao_anfc_0.083deg_P1D-m?REQUEST=GetMap&VERSION=1.3.0&LAYERS=thetao&STYLES=${STYLE}&BBOX={bbox-epsg-3857}&CRS=EPSG:3857&WIDTH=256&HEIGHT=256&FORMAT=image/png&transparent=true&COLORSCALERANGE=${minMax}&NUMCOLORBANDS=${thresholds}`

const LEGEND_URL = `https://nrt.cmems-du.eu/thredds/wms/cmems_mod_glo_phy-thetao_anfc_0.083deg_P1D-m?REQUEST=GetLegendGraphic&LAYER=thetao&PALETTE=${PALETTE}&transparent=true&FORMAT=image/png&COLORSCALERANGE=${minMax}&NUMCOLORBANDS=${thresholds}`

Would need to be come this:

const SERVICE_URL = `https://wmts.marine.copernicus.eu/teroWmts/GLOBAL_ANALYSISFORECAST_PHY_001_024/cmems_mod_glo_phy-thetao_anfc_0.083deg_P1D-m_202406?request=GetCapabilities&service=WMTS`;

const TILE_URL = `https://wmts.marine.copernicus.eu/teroWmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=GLOBAL_ANALYSISFORECAST_PHY_001_024/cmems_mod_glo_phy-thetao_anfc_0.083deg_P1D-m_202406/thetao&STYLE=${STYLE}&FORMAT=image/png&TILEMATRIXSET=EPSG:3857&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&COLORSCALERANGE=${minMax}&NUMCOLORBANDS=${thresholds}`;

const LEGEND_URL = `https://wmts.marine.copernicus.eu/teroWmts?REQUEST=GetLegendGraphic&LAYER=GLOBAL_ANALYSISFORECAST_PHY_001_024/cmems_mod_glo_phy-thetao_anfc_0.083deg_P1D-m_202406/thetao&STYLE=${STYLE}&PALETTE=${PALETTE}&transparent=true&FORMAT=image/png&COLORSCALERANGE=${minMax}&NUMCOLORBANDS=${thresholds}`;

More or less. I tested it - it works, but the legend would need to be redone / removed. Also not sure if the color range and scheme is the same.

Might just be easier to remove the Home page CMEMS maps. You can do this by commenting out the CMEMS WMS layer:

import Div from '../../../components/div'
import MapProvider from './_map-context'
import SaeonModels from './_saeon-models'
import MarineProtectedAreasLayer from './layers/marine-protected-areas'
// import CmemsWMSLayer from './layers/cmems-wms'
import DomainsLayer from './layers/domains'
import CoordinatesLayer from './layers/coordinates'

export default ({ container }) => {
  return (
    container && (
      <Div>
        <MapProvider container={container}>
          <MarineProtectedAreasLayer />
          {/* <CmemsWMSLayer /> */}
          <DomainsLayer />
          <SaeonModels />
          <CoordinatesLayer />
        </MapProvider>
      </Div>
    )
  )
}
@zachsa
Copy link
Collaborator Author

zachsa commented Nov 3, 2024

I think @Marc-Pienaar is doing React these days.

@GilesFearon
Copy link
Collaborator

Thanks Zach
Our new developer working on OCIMS, Dylan Pivo, will be looking into resurrecting your visualisation work soon, with hopefully quite a bit of time dedicated next year. So this work will be picked up again soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants