Hello,
When using the WebMapServiceImagryProvider, I do not see a way to properly form the BBox in meters from 0,0 reference. It always gives the bbox in lat/lng degrees. How can I get this in meters from an offset? Is there an OOB way to do this?
In example, charts from <![CDATA[S57]]> require the bbox to be in meters from offset. it does not accept lat/lng degrees.
Thanks much,
-Timothy
To clarify, The endpoint requires SRS or CRS = EPSG:3857 which is in meters, I think it needs to be in WebMercator projection. However, by setting the options on the call to CesiumWebMapServiceImageryProvider like
var mapparameters = {
format: format,
version: "1.3.0",
srs: "EPSG:3857",
crs: "EPSG:3857",
transparent: true
};
var ex = new Cesium.WebMapServiceImageryProvider({
url: endpoint,
layers: layerName,
parameters: mapparameters,
});
I get Geo projection, not WebMercator projection.
if I force webmercator projection with
tilingScheme: new Cesium.WebMercatorProjection(),
I get a runtime error from CesiumJS
TypeError: Cannot read properties of undefined (reading ‘east’)
at Gn.intersection (Cesium.js:81:49866)
at new pF (Cesium.js:12530:29433)
at new Fh (Cesium.js:12530:54572)
Any Ideas?
Actually, I need to set :
tilingScheme = new Cesium.WebMercatorTilingScheme();
That was the problem.
I was thinking if I set “EPSG:3857”. that should be enough to inform the Tiling/Projection. This is not immediatly clear in the docs. Is this something that should be updated in the documentation?
Thasnk much,
-Timothy
Hey @timeichfeld-msa, I’m glad you were able to find a solution!
Is this something that should be updated in the documentation?
If you can share a specific place in the documentation that you think needs expanded we can take a look at it. CesiumJS is open source so we’d also be happy to review a PR to update documentation if you feel like contributing the changes yourself!