Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Example Analysis of loading CGCS2000 slices in Cesium Development

Shulou Source: shulou.com Published: 2022-06-01 03:41:17 10月03日 Update

This article shares with you the content of the sample analysis of loading CGCS2000 slices in Cesium development. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Online sky map, there are two kinds of slice projection format, one is the national 2000 coordinate system, the other is the Web Mercator coordinate system, usually when we develop, we use the Web Mercator coordinate system slice.

In Cesium, load the slice of Web Mercator as the base image, and you only need to configure the slice according to certain service form. The code is as follows:

ImageryProvider: new Cesium.WebMapTileServiceImageryProvider ({

Url: "http://t1.tianditu.com/img_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=img&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=",

EnablePickFeatures: false

})

In the above code, it can be loaded directly without setting the parameters of the coordinate system, and the address of the slice will be changed to country 2000, which will cause the problem that the slice is not loaded normally and cannot be loaded in some places. By viewing the API of Cesium, you can set the tilingScheme property of the image layer to the slicing scheme of the sphere, so that you can load non-Web Mercator slices.

_ tileScheme = new Cesium.GeographicTilingScheme ()

However, after this setting, it is found that the request is still wrong, the difference between the map level and the actual slice level is one level, and setting the minimum level of the layer does not work, so it needs further research.

However, I understand the way Cesium slices are set up. At the same time, the main visual difference between CGCS2000 and Web Mercator is that in the case of the whole map, one is rectangular and the other is square. Thank you for reading! This is the end of this article on "sample analysis of loading CGCS2000 slices in Cesium development". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!

Tags: Coordinates coordinate system level development example China plus analysis code content country map form more article wrong good practical minimum function parameter Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Huawei Shulou Technology Shulou Information Linux