| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 536ee85 commit 15d45af
11 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | { | |
| 2 | 2 | "name": "@mapgis/webclient-es6-mapboxgl", | |
| 3 | - "version": "10.5.14", | ||
| 3 | + "version": "15.6.1", | ||
| 4 | 4 | "description": "", | |
| 5 | 5 | "main1": "dist-libs/webclient-mapboxgl-plugin.min.js", | |
| 6 | 6 | "module": "index.js", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | { | |
| 2 | 2 | "name": "@mapgis/webclient-es6-service", | |
| 3 | - "version": "10.5.14", | ||
| 3 | + "version": "15.6.1", | ||
| 4 | 4 | "description": "中地数码基于ES6语法针对igserver的服务封装", | |
| 5 | 5 | "main1": "dist-libs/webclient-es6-service.min.js", | |
| 6 | 6 | "module": "index.js", | |
@@ -12,7 +12,6 @@ | |||
| 12 | 12 | "author": "Wuhan Zondy Cyber Science&Technology Co.Ltd.", | |
| 13 | 13 | "license": "Apache-2.0", | |
| 14 | 14 | "dependencies": { | |
| 15 | - "core-js": "^3.6.5", | ||
| 16 | 15 | "@turf/turf": "^6.5.0", | |
| 17 | 16 | "axios": "^0.26.0", | |
| 18 | 17 | "core-js": "^3.21.1", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,94 @@ | |||
| 1 | + # 原理 | ||
| 2 | + | ||
| 3 | + 国内的图商数据都强制要求数据加密一次火星坐标系 (GCJ-02) ,因此整个地图是产生了偏移。 | ||
| 4 | + | ||
| 5 | + ## 核心原理 | ||
| 6 | + | ||
| 7 | + 1. 通过 **反解析** 火星坐标系 (GCJ-02) 得到 **WGS84(CGCS2000椭球)无偏数据** | ||
| 8 | + 2. 然后根据无偏数据在Cesium的切分模型上进行对应的**纠偏校正处理** | ||
| 9 | + 3.  | ||
| 10 | + | ||
| 11 | + ## 高德 | ||
| 12 | + | ||
| 13 | + 高德相对简单就是基于墨卡托投影的前提下进行简单的位置纠偏 | ||
| 14 | + | ||
| 15 | +  | ||
| 16 | + | ||
| 17 | +  | ||
| 18 | + | ||
| 19 | +  | ||
| 20 | + | ||
| 21 | + | ||
| 22 | + | ||
| 23 | + | 纠偏前 | 纠偏后 | | ||
| 24 | + | ------------------------------ | ----------------------------- | | ||
| 25 | + |  |  | | ||
| 26 | + | ||
| 27 | + ## 百度 | ||
| 28 | + | ||
| 29 | + 分2类:WGS84椭球纠偏和 BD09坐标系的偏移 | ||
| 30 | + | ||
| 31 | + ``` js | ||
| 32 | + this._crs = options.crs || 'BD09'; | ||
| 33 | + if (options.crs === 'WGS84') { | ||
| 34 | + var resolutions = []; | ||
| 35 | + for (var i = 0; i < 19; i++) { | ||
| 36 | + resolutions[i] = 256 * Math.pow(2, 18 - i); | ||
| 37 | + } | ||
| 38 | + this._tilingScheme = new BaiduTilingScheme({ | ||
| 39 | + resolutions: resolutions, | ||
| 40 | + rectangleSouthwestInMeters: new Cartesian2(-20037726.37, -12474104.17), | ||
| 41 | + rectangleNortheastInMeters: new Cartesian2(20037726.37, 12474104.17) | ||
| 42 | + }); | ||
| 43 | + } else { | ||
| 44 | + this._tilingScheme = new WebMercatorTilingScheme({ | ||
| 45 | + rectangleSouthwestInMeters: new Cartesian2(-33554054, -33746824), | ||
| 46 | + rectangleNortheastInMeters: new Cartesian2(33554054, 33746824) | ||
| 47 | + }); | ||
| 48 | + } | ||
| 49 | + ``` | ||
| 50 | + | ||
| 51 | + | ||
| 52 | + | ||
| 53 | + ### BD09坐标系 | ||
| 54 | + | ||
| 55 | + 原理和高德纠偏几乎一致 | ||
| 56 | + | ||
| 57 | +  | ||
| 58 | + | ||
| 59 | + ### WGS84坐标系 | ||
| 60 | + | ||
| 61 | + 基于百度独特的**最后一级256像素**的分辨率机制进行对应的计算 | ||
| 62 | + | ||
| 63 | + | 级别 | 分辨率 resolutions = 256 * Math.pow(2, 18 - level) | | ||
| 64 | + | ---- | ------------------------------------------------------ | | ||
| 65 | + | 0 | 33554432 | | ||
| 66 | + | 1 | 16777216 | | ||
| 67 | + | 2 | 8388608 | | ||
| 68 | + | 3 | 4194304 | | ||
| 69 | + | 4 | 2097152 | | ||
| 70 | + | 5 | 1048576 | | ||
| 71 | + | 6 | 524288 | | ||
| 72 | + | 7 | 262144 | | ||
| 73 | + | 8 | 131072 | | ||
| 74 | + | 9 | 65536 | | ||
| 75 | + | 10 | 32768 | | ||
| 76 | + | 11 | 16384 | | ||
| 77 | + | 12 | 8192 | | ||
| 78 | + | 13 | 4096 | | ||
| 79 | + | 14 | 2048 | | ||
| 80 | + | 15 | 1024 | | ||
| 81 | + | 16 | 512 | | ||
| 82 | + | 17 | 256 | | ||
| 83 | + | ||
| 84 | + 上面的表格对应百度独特的切分模型经纬网,需要建立一个百度特有的网格切分模型**BaiduTilingScheme** | ||
| 85 | + | ||
| 86 | + | 纠偏前 | 纠偏后 | | ||
| 87 | + | ------------------------------ | ----------------------------- | | ||
| 88 | + |  |  | | ||
| 89 | + | ||
| 90 | + | ||
| 91 | + | ||
| 92 | + ## 任意投影 + 瓦片切分规则 | ||
| 93 | + | ||
| 94 | + **已实现,不公开原理** | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments