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

docs: update WMTS examples to use https for basemap.nationalmap.gov #12441

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

parthpetkar
Copy link

@parthpetkar parthpetkar commented Jan 19, 2025

Description
I have fixed the issue of #12375 by updating the file packages/engine/Source/Scene/WebMapTileServiceImageryProvider.js. The changes were made at:

Line 60: Changed http to https
Line 74: Changed http to https
After building the code, it is working as expected. Attached is a screenshot demonstrating the successful fix.

image

Issue Number and Link
Fixes #12375.

Testing Plan
Reproduced the issue by running the original code.
Made the updates to replace http with https.
Built and tested the updated code to verify that the issue is resolved.

Author checklist

  • I have submitted a Contributor License Agreement
  • I have added my name to CONTRIBUTORS.md
  • I have updated CHANGES.md with a short summary of my change
  • I have added or updated unit tests to ensure consistent code coverage
  • I have updated the inline documentation, and included code examples where relevant
  • I have performed a self-review of my code

Copy link

Thank you for the pull request, @parthpetkar! Welcome to the Cesium community!

In order for us to review your PR, please complete the following steps:

Review Pull Request Guidelines to make sure your PR gets accepted quickly.

@parthpetkar
Copy link
Author

I have signed the CLA

@ggetz
Copy link
Contributor

ggetz commented Jan 21, 2025

Hi @parthpetkar, thanks for the PR!

@lukemckinstry could you please review?

@lukemckinstry
Copy link
Contributor

The tile service links in the documentation now work again using http without throwing errors. It seems something changed with the data provider. Do you see this too now @parthpetkar? Perhaps switching to https is no longer necessary.

@parthpetkar
Copy link
Author

parthpetkar commented Jan 22, 2025

@lukemckinstry I tried with http for me it still does not work. Here is an image to showcase that

image

This is the code i tried in the sandcastle:

  const viewer = new Cesium.Viewer("cesiumContainer", {
  shouldAnimate: true,
});
// Example 2. USGS shaded relief tiles (RESTful)
const shadedRelief2 = new Cesium.WebMapTileServiceImageryProvider({
    url : 'http://basemap.nationalmap.gov/arcgis/rest/services/USGSShadedReliefOnly/MapServer/WMTS/tile/1.0.0/USGSShadedReliefOnly/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.jpg',
    layer : 'USGSShadedReliefOnly',
    style : 'default',
    format : 'image/jpeg',
    tileMatrixSetID : 'default028mm',
    maximumLevel: 19,
    credit : new Cesium.Credit('U. S. Geological Survey')
});
viewer.imageryLayers.addImageryProvider(shadedRelief2);

But this works with https

image

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

Successfully merging this pull request may close these issues.

Docs should call basemap.nationalmap.gov urls with https
3 participants