Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of loading CGCS2000 slices in Cesium Development

2025-04-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report