Skip to content

WMS URL encoding issue while using CesiumWebMapServiceRasterOverlay.cs #563

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

Open
Jay-Pandya-3004 opened this issue Apr 6, 2025 · 0 comments

Comments

@Jay-Pandya-3004
Copy link

Unity Version:

  • Unity 6 (6000.0.32f1)

Cesium-Unity Version:

  • 1.15.5

Issue Description:

The WMS raster overlay works correctly in the Unity editor, during Holographic Remoting for Play Mode, and when the Build Configuration is set to Debug. However, when the Build Configuration is set to Release and deployed on HoloLens 2, an error occurs. Upon investigating the error, it appears that the issue lies with the bounding box (bbox) parameter in the URL, which is dynamically generated by Cesium. There seems to be an issue with the URL encoding when the Build Configuration is set to Release.

Error Details:

As per the logs, the WMS URL is formed as follows:
https://www.ncei.noaa.gov/thredds/wms/model-gfs-004-files/202502/20250201/gfs_4_20250201_0600_006.grb2?ELEVATION=2&TIME=2025-02-01T12%3A00%3A00.000Z&TRANSPARENT=true&STYLES=boxfill%2Frainbow&COLORSCALERANGE=234.2%2C313.3&NUMCOLORBANDS=20&LOGSCALE=false&layers=Temperature_height_above_ground&request=GetMap&TRANSPARENT=TRUE&version=1.3.0&service=WMS&format=image%2Fpng&styles=&width=256&height=256&bbox=-90%2C000000,0%2C000000,90%2C000000,180%2C000000&layers=&crs=EPSG:4326

The issue specifically arises with the bbox parameter:
bbox=-90%2C000000,0%2C000000,90%2C000000,180%2C000000

Expected Behavior:

The URL should be formed with the bbox parameter encoded correctly:
https://www.ncei.noaa.gov/thredds/wms/model-gfs-004-files/202502/20250201/gfs_4_20250201_0600_006.grb2?ELEVATION=2&TIME=2025-02-01T12%3A00%3A00.000Z&TRANSPARENT=true&STYLES=boxfill%2Frainbow&COLORSCALERANGE=234.2%2C313.3&NUMCOLORBANDS=20&LOGSCALE=false&layers=Temperature_height_above_ground&request=GetMap&TRANSPARENT=TRUE&version=1.3.0&service=WMS&format=image%2Fpng&styles=&width=256&height=256&bbox=-90%2E000000,0%2E000000,90%2E000000,180%2E000000&layers=&crs=EPSG:4326

Thus, the bbox parameter should be set as:
bbox=-90%2E000000,0%2E000000,90%2E000000,180%2E000000

Screenshot:

Error Screenshot

Additional Information:

Please investigate the encoding issue with the bbox parameter when the Build Configuration is set to Release.

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

1 participant