您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

GoogleImageryProvider.js 863B

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * @Author: Caven
  3. * @Date: 2020-01-21 16:06:14
  4. */
  5. import { Cesium } from '@dc-modules/namespace'
  6. import ImageryType from '../ImageryType'
  7. const ELEC_URL =
  8. 'http://mt{s}.google.cn/vt/lyrs=m@207000000&hl=zh-CN&gl=CN&src=app&x={x}&y={y}&z={z}&s=Galile'
  9. const IMG_URL =
  10. 'http://mt{s}.google.cn/vt/lyrs=s&hl=zh-CN&x={x}&y={y}&z={z}&s=Gali'
  11. const TER_URL =
  12. 'http://mt{s}.google.cn/vt/lyrs=t@131,r@227000000&hl=zh-CN&gl=cn&x={x}&y={y}&z={z}&s=Galile'
  13. class GoogleImageryProvider extends Cesium.UrlTemplateImageryProvider {
  14. constructor(options = {}) {
  15. options['url'] =
  16. options.style === 'img'
  17. ? IMG_URL
  18. : options.style === 'ter'
  19. ? TER_URL
  20. : ELEC_URL
  21. options['subdomains'] = options.subdomains || ['1', '2', '3']
  22. super(options)
  23. }
  24. }
  25. ImageryType.GOOGLE = 'google'
  26. export default GoogleImageryProvider